Device position determination method and device, storage medium and electronic equipment

By determining the central ray and target coordinates in the target coordinate system, the problem of low efficiency in the arrangement of components on printed circuit boards is solved, and efficient and accurate automatic arrangement of components is achieved.

CN120874735APending Publication Date: 2025-10-31ZHEJIANG DAHUA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510975588.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-15
Publication Date
2025-10-31

AI Technical Summary

Technical Problem

In the existing technology, the component placement efficiency of printed circuit boards (PCBs) is low, and the manual layout process is complex and time-consuming.

Method used

In the target coordinate system, a pre-arrangement operation is performed on the largest device to determine the center ray of each arrangement area. Based on the target device to be arranged, the target pin of the center device is determined, and the target coordinates are determined according to the intersection coordinates of the target connecting line where the target pin is located and the target center ray, thereby determining the arrangement position of the target device.

Benefits of technology

It significantly improves the efficiency and accuracy of device placement, reduces computational complexity, and realizes an automated device placement process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120874735A_ABST
    Figure CN120874735A_ABST
Patent Text Reader

Abstract

The invention discloses a device position determination method and device, a storage medium and electronic equipment. The method comprises the steps that pre-arrangement operation is carried out on a maximum device in a target coordinate system to determine a central ray of each arrangement area, the coordinate origin of the target coordinate system is determined by the central point of a central device, the coordinate axis of the target coordinate system is determined by the edge of the central device, and the central device is connected with a device to be arranged through each device pin; the starting point of the central ray is determined by the central point of the maximum device, and the ray direction of the central ray is the same as or opposite to the direction indicated by the coordinate axis; determining a target pin of the central device based on a target device in the to-be-arranged devices, and determining a target coordinate according to an intersection point coordinate of a target connecting line where the target pin is located and a target central ray; and determining the arrangement position of the target device based on the target coordinate. The technical problems that the process of manually arranging the printed circuit board is complex, and the device arrangement efficiency is low are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computers, and more specifically, to a method and apparatus for determining the location of a device, a storage medium, and an electronic device. Background Technology

[0002] As electronic devices become smaller and more integrated, the number and density of components on printed circuit boards (PCBs) have increased significantly. Due to the complexity of manual placement, designers need to carefully arrange components while considering component performance, signal integrity, and physical constraints. This process is too time-consuming, resulting in low component placement efficiency in existing technologies.

[0003] There is currently no effective solution to the above problems. Summary of the Invention

[0004] This application provides a method and apparatus for determining the location of a device, a storage medium, and an electronic device, to at least solve the technical problem of low object recognition accuracy.

[0005] According to one aspect of the embodiments of this application, a method for determining the position of a device is provided, comprising: performing a pre-arrangement operation on the largest device in a target coordinate system, determining the center ray of each arrangement area, wherein the largest device is the device with the largest size among the devices to be arranged around the already arranged center device, the origin of the target coordinate system is determined by the center point of the center device, the coordinate axes of the target coordinate system are determined by the edges of the center device, the center device is connected to the devices to be arranged through various device pins, the starting point of the center ray is determined by the center point of the largest device, and the ray direction of the center ray is the same as the positive or negative direction of the coordinate axes of the target coordinate system; determining the target pin of the center device based on the target device among the devices to be arranged, and determining the target coordinates according to the coordinates of the intersection point of the target connecting line where the target pin is located and the target center ray, wherein the target connecting line is perpendicular to the target center ray, the target center ray is the center ray with the shortest perpendicular distance to the target pin among all the center rays, and the center device is connected to the target device through the target pin; and determining the arrangement position of the target device based on the target coordinates.

[0006] According to another aspect of the embodiments of this application, a device for determining device position is also provided, comprising: a pre-arrangement module, configured to perform a pre-arrangement operation on the largest device in a target coordinate system, and determine the center ray of each arrangement region, wherein the largest device is the device with the largest size among the devices to be arranged around the already arranged center device, the origin of the target coordinate system is determined by the center point of the center device, the coordinate axes of the target coordinate system are determined by the edges of the center device, the center device is connected to the devices to be arranged through various device pins, and the starting point of the center ray is determined by the center point of the largest device. The ray direction is the same as the positive or negative direction of the coordinate axis of the target coordinate system; the execution module is used to determine the target pin of the center device based on the target device in the devices to be arranged, and to determine the target coordinates according to the coordinates of the intersection of the target connecting line where the target pin is located and the target center ray, wherein the target connecting line is perpendicular to the target center ray, and the target center ray is the center ray with the shortest perpendicular distance to the target pin among all the center rays, and the center device is connected to the target device through the target pin; the determination module is used to determine the arrangement position of the target device based on the target coordinates.

[0007] As an optional embodiment, the device is used to perform a pre-arrangement operation on the largest device in a target coordinate system to determine the center ray of each arrangement region by: sequentially determining each of the arrangement regions as the current arrangement region; performing the following operations on the largest device to determine the center ray of the current arrangement region: obtaining the pre-arrangement coordinates of the current arrangement region that are shortest to the origin of the coordinate system; arranging the largest device to the position corresponding to the pre-arrangement coordinates; determining the current starting point based on the center point of the largest device, and obtaining the relative position information of the current arrangement region and the center device; determining the current ray direction based on the relative position information, wherein the current ray direction is the same as the positive or negative direction of the coordinate axis of the target coordinate system; and determining the center ray of the current arrangement region based on the current starting point and the current ray direction.

[0008] As an optional embodiment, the device is used to determine the placement position of the target device as the position corresponding to the target coordinates after determining the target coordinates based on the intersection coordinates of the target connection line where the target pin is located and the target center ray, in the case where only the center device is arranged on the target coordinate system; and to determine the placement position of the target device based on the target coordinates and the placement position of at least one of the devices to be arranged, in the case where at least one of the center device and the devices to be arranged has been arranged on the target coordinate system.

[0009] As an optional embodiment, the device is used to determine the placement position of the target device based on the target coordinates and the placement position of at least one of the devices to be placed, when the central device and at least one of the devices to be placed are arranged on the target coordinate system in the following manner: If all coordinates in the first set of already arranged coordinates satisfy the non-interference condition with the target coordinates, the placement position of the target device is determined to be the position corresponding to the target coordinates, wherein one coordinate in the first set of already arranged coordinates corresponds to one of the devices to be placed that has been arranged in the target coordinate system; If at least one coordinate in the first set of already arranged coordinates does not satisfy the non-interference condition with the target coordinates, the target coordinates are adjusted by a preset step size to obtain a first updated coordinate, and the placement position of the target device is determined to be the position corresponding to the first updated coordinate, wherein all coordinates in the first set of already arranged coordinates satisfy the non-interference condition with the first updated coordinate.

[0010] As an optional embodiment, the device is used to adjust the target coordinates by a preset step size to obtain updated target coordinates when at least one coordinate in the first set of arranged coordinates and the target coordinates do not satisfy the non-interference condition, in the following manner: when at least one coordinate in the first set of arranged coordinates and the target coordinates do not satisfy the non-interference condition, an adjustment direction is determined according to the ray direction indicated by the target center ray; the target coordinates are moved by N preset step sizes according to the adjustment direction to obtain the updated target coordinates, where N is a positive integer.

[0011] As an optional embodiment, the device is further configured to: determine that the target coordinates and the first coordinates satisfy the non-interference condition when the target coordinates and the first coordinates are in different arrangement areas, wherein the first set of arranged coordinates includes the first coordinates; and, when the target coordinates and the first coordinates are in the same arrangement area and the first device has been arranged to the position corresponding to the first coordinates, obtain the target distance between the target coordinates and the first coordinates, and determine whether the target coordinates and the first coordinates satisfy the non-interference condition based on the target distance.

[0012] As an optional embodiment, the device is used to determine whether the target coordinates and the first coordinates satisfy the non-interference condition based on the target distance in the following manner: if the target distance is greater than an interference distance threshold, the target coordinates and the first coordinates are determined to satisfy the non-interference condition, wherein the interference distance threshold is determined by the size of the target device and the size of the first device; if the target distance is less than or equal to the interference distance threshold, the target coordinates and the first coordinates are determined not to satisfy the non-interference condition.

[0013] As an optional embodiment, the device is further configured to: after determining the arrangement position of the target device based on the target coordinates, determine the first pin of the central device based on the second device among the devices to be arranged, and determine the second coordinates according to the coordinates of the intersection of the first connecting line and the first central ray where the first pin is located, wherein the first connecting line is perpendicular to the first central ray, the first central ray is the central ray with the shortest perpendicular distance to the first pin among all the central rays, and the central device is connected to the second device through the first pin; and determine the arrangement position of the second device based on the second coordinates.

[0014] As an optional embodiment, the device is used to determine the arrangement position of the second device based on the second coordinate in the following manner: when all coordinates in the second set of already arranged coordinates satisfy the non-interference condition with the second coordinate, the arrangement position of the second device is determined to be the position corresponding to the second coordinate, wherein one coordinate in the second set of already arranged coordinates corresponds to one of the devices to be arranged that has been arranged in the target coordinate system, and the second set of already arranged coordinates includes the target coordinate; when at least one coordinate in the second set of already arranged coordinates does not satisfy the non-interference condition with the second coordinate, the second coordinate is adjusted according to a preset step size to obtain a second updated coordinate, and the arrangement position of the second device is determined to be the position corresponding to the second updated coordinate, wherein all coordinates in the second set of already arranged coordinates satisfy the non-interference condition with the second updated coordinate.

[0015] As an optional embodiment, the device is further configured to: perform a pre-arrangement operation on the largest device in the target coordinate system; before determining the center ray of each arrangement region, establish the target coordinate system with the center point of the central device as the origin, wherein the first coordinate axis of the target coordinate system is determined by the horizontal rightward direction of the central device, and the second coordinate axis of the target coordinate system is determined by the vertical upward direction of the central device; determine a no-arrangement region based on the length offset value and width offset value of the central device; determine the arrangement region based on the no-arrangement region, wherein the no-arrangement region is adjacent to the arrangement region and the central device, respectively.

[0016] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, wherein a computer program is stored in the computer-readable storage medium, and the computer program is configured to execute the above-described method for determining the location of the device when it is run.

[0017] According to another aspect of the embodiments of this application, a computer program product or computer program is provided, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the device location determination method described above.

[0018] According to another aspect of the embodiments of this application, an electronic device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the above-described method for determining the location of a device through the computer program.

[0019] In this embodiment, a pre-arrangement operation is performed on the largest device in the target coordinate system to determine the center ray of each arrangement area. The largest device is the one with the largest size among the devices to be arranged around the already arranged center device. The origin of the target coordinate system is determined by the center point of the center device. The first coordinate axis of the target coordinate system is determined by the horizontal direction to the right of the center device, and the second coordinate axis is determined by the vertical direction upward of the center device. The center device is connected to the devices to be arranged through various device pins. The starting point of the center ray is determined by the center point of the largest device. The ray direction of the center ray is related to the positive direction of the first coordinate axis, the negative direction indicated by the first coordinate axis, and the direction of the second coordinate axis. The positive direction and the opposite direction indicated by the second coordinate axis are the same. Based on the target device among the devices to be arranged, the target pin of the central device is determined, and the target coordinates are determined according to the intersection coordinates of the target connecting line where the target pin is located and the target central ray. The target connecting line is perpendicular to the target central ray, and the target central ray is the central ray with the shortest perpendicular distance to the target pin among all central rays. The central device is connected to the target device through the target pin. This method of determining the placement position of the target device based on the target coordinates, by using the largest device as the starting point and reference for the layout, provides a clear direction and spatial range for the subsequent automatic placement of devices through the establishment of the target coordinate system and the determination of the central ray. Determining the target pin of the central device based on the target device among the devices to be arranged, and determining the target coordinates according to the intersection coordinates of the target connecting line where the target pin is located and the target central ray, reduces the computational complexity of device placement. It eliminates the need for a full search or simulation; only the perpendicular distance from the pin to the central ray needs to be calculated, thus significantly improving the efficiency of device placement. This achieves the technical effect of improving the efficiency and accuracy of device placement, thereby solving the technical problem of low object recognition accuracy. Attached Figure Description

[0020] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0021] Figure 1 This is a schematic diagram of an application environment for an optional method for determining the location of a device according to an embodiment of this application;

[0022] Figure 2 This is a flowchart illustrating an optional method for determining the location of a device according to an embodiment of this application;

[0023] Figure 3 This is a schematic diagram of an optional target coordinate system according to an embodiment of this application;

[0024] Figure 4This is a schematic diagram of an optional no-discharge zone according to an embodiment of this application;

[0025] Figure 5 This is a schematic diagram of an optional arrangement area according to an embodiment of this application;

[0026] Figure 6 This is a schematic diagram of an optional method for determining the location of a device according to an embodiment of this application;

[0027] Figure 7 This is a schematic diagram of another optional method for determining the position of a device according to an embodiment of this application;

[0028] Figure 8 This is a schematic diagram of another optional method for determining the position of a device according to an embodiment of this application;

[0029] Figure 9 This is a schematic diagram of another optional method for determining the position of a device according to an embodiment of this application;

[0030] Figure 10 This is a schematic diagram of an optional device position determination apparatus according to an embodiment of this application. Detailed Implementation

[0031] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0032] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0033] The present application will be described below with reference to embodiments:

[0034] According to one aspect of the embodiments of this application, a method for determining the location of a device is provided. Optionally, in this embodiment, the method for determining the location of a device can be applied to, for example, Figure 1 The hardware environment shown consists of server 101 and terminal device 103. For example... Figure 1 As shown, server 101 is connected to terminal device 103 via a network and can be used to provide services to terminal device or application 107 installed on terminal device. The application can be video application, instant messaging application, browser application, educational application, game application, etc. Database 105 can be set up on the server or independently of the server to provide data storage services for server 101, such as a game data storage server. The network mentioned above can include, but is not limited to, wired networks and wireless networks. The wired network includes local area networks, metropolitan area networks, and wide area networks. The wireless network includes Bluetooth, WIFI, and other networks that enable wireless communication. Terminal device 103 can be a terminal configured with an application, and can include, but is not limited to, at least one of the following: mobile phones (such as Android phones, iOS phones, etc.), laptops, tablets, handheld computers, MID (Mobile Internet Devices), PADs, desktop computers, smart TVs, smart voice interaction devices, smart home appliances, vehicle terminals, aircraft, virtual reality (VR) terminals, augmented reality (AR) terminals, mixed reality (MR) terminals, and other computer devices. The server mentioned above can be a single server, a server cluster composed of multiple servers, or a cloud server.

[0035] Combination Figure 1 As shown, the method for determining the location of the aforementioned device can be executed by an electronic device, which can be a terminal device or a server. The method for determining the location of the aforementioned device can be implemented by the terminal device or the server respectively, or by the terminal device and the server together.

[0036] The above is merely an example, and this embodiment does not impose any specific limitations.

[0037] Alternatively, as an alternative implementation method, such as Figure 2 As shown, the method for determining the location of the aforementioned device includes:

[0038] S202, Perform a pre-arrangement operation on the largest device in the target coordinate system, and determine the center ray of each arrangement area. The largest device is the device with the largest size among the devices to be arranged around the already arranged center device. The origin of the target coordinate system is determined by the center point of the center device, and the coordinate axes of the target coordinate system are determined by the edges of the center device. The center device is connected to the devices to be arranged through each device pin. The starting point of the center ray is determined by the center point of the largest device, and the ray direction of the center ray is the same as the positive or negative direction of the coordinate axis of the target coordinate system.

[0039] Optionally, in the embodiments of this application, the aforementioned largest device refers to the device with the largest area value calculated based on its length and width dimensions among the devices to be arranged, including but not limited to large integrated circuit chips, large-size capacitors or resistors, etc.

[0040] Optionally, in this embodiment, the aforementioned layout area refers to a pre-defined area surrounding the central or largest device, based on its size and the spatial layout of the PCB, used to guide the automatic placement of each device among the devices to be arranged. For example, in a two-dimensional target coordinate system, with the central device positioned at the origin, the aforementioned layout area can be subdivided into a top area, a right area, a bottom area, and a left area around the origin, corresponding to different pin and device layout directions, respectively.

[0041] Optionally, in the embodiments of this application, such as Figure 3 As shown, the target coordinate system mentioned above includes, but is not limited to, a Cartesian coordinate system with the center point of the central device as the origin and the horizontal and vertical directions as positive directions. This coordinate system aims to provide a unified reference frame to facilitate the calculation and determination of the device layout.

[0042] Optionally, in the embodiments of this application, the devices to be arranged include, but are not limited to, electronic components such as integrated circuit chips, capacitors, resistors, transistors, and connectors.

[0043] Optionally, in the embodiments of this application, the aforementioned central device refers to a device that serves as the core of the PCB layout strategy, which establishes electrical connections with multiple devices to be arranged through its pins, thereby affecting the structure and performance of the entire PCB layout. The central device may be a signal processing chip, a microprocessor, a power management module, etc.

[0044] It should be noted that the central device is not limited to a single device; it can be a composite device or module connected to a group of devices to be arranged via multiple pins. Similarly, the definition of the largest device can vary depending on different design requirements and application scenarios. For example, in some cases, the largest device may be a device that is given priority in placement due to signal transmission or heat dissipation requirements. This application does not limit this.

[0045] It should also be noted that there is a no-displacement zone between the layout area and the central device, such as... Figure 4 As shown, J1 represents the length offset of the central component, J2 represents the width offset of the central component, and thus, the arrangement area is as follows: Figure 5 As shown, the layout areas (A), (B), (C), and (D) are determined based on the offset values ​​(P1), (P2), (P3), and (P4) in the length and width directions of the prohibited area.

[0046] For example, if the X-axis of the target coordinate system represents the horizontal direction and the Y-axis represents the vertical direction, then a horizontal central ray (positive Y-axis direction) will be drawn in the arrangement area at the top of the largest device, a vertical central ray (positive X-axis direction) will be drawn in the arrangement area on the right, a horizontal central ray (negative Y-axis direction) will be drawn in the arrangement area at the bottom of the largest device, and a vertical central ray (negative X-axis direction) will be drawn in the arrangement area on the left.

[0047] It should also be noted that the target coordinate system mentioned above is not limited to a two-dimensional coordinate system, and its coordinate axes are not limited to the X-axis and Y-axis. For example, for three-dimensional PCB design or multi-layer circuit board layout, the target coordinate system can be extended to a three-dimensional coordinate system, introducing the Z-axis as an additional coordinate axis, so as to more accurately define the arrangement position of components on different levels or spatial dimensions.

[0048] S204, determine the target pin of the center device based on the target device in the device to be arranged, and determine the target coordinates according to the coordinates of the intersection of the target connecting line where the target pin is located and the target center ray. The target connecting line is perpendicular to the target center ray, and the target center ray is the center ray with the shortest perpendicular distance to the target pin among all center rays. The center device is connected to the target device through the target pin.

[0049] Optionally, in the embodiments of this application, the target device refers to the device to be arranged that has an electrical connection with the central device, including but not limited to electronic components such as integrated circuit chips, resistors, capacitors, and transistors.

[0050] Optionally, in this embodiment, the target connection line refers to a line extending from the target pin and perpendicular to the target center ray. This line is used to determine the coordinates of the intersection point between the target pin and the target center ray, thereby determining the arrangement position of the target device relative to the center device. The length of the target connection line is determined by the perpendicular distance from the target pin to the target center ray, ensuring the accuracy of device arrangement and the efficiency of the layout algorithm.

[0051] Optionally, in this embodiment, the aforementioned target center ray refers to a ray determined based on the center point of the largest device during the pre-arrangement operation. This ray has the same or opposite direction to the coordinate axes of the target coordinate system and is used to guide the arrangement of the devices. The starting point of this target center ray is located at the center point of the largest device, and its ray direction is consistent with or opposite to the direction indicated by the coordinate axes in the target coordinate system, providing a clear reference axis for the automatic arrangement of devices.

[0052] For example, in a two-dimensional coordinate system, the direction of the central ray can be positive or negative X-axis or positive or negative Y-axis.

[0053] It should be noted that in practical applications, the central device can be connected to the target device through multiple pins, and these pins can be in different directions. The selection of the target pin can be based on various factors such as signal integrity, wiring convenience, or physical constraints between devices.

[0054] For example, when the pins of the target device and the pins of the center device are about to establish a connection, the perpendicular distance between the pins of the target device and the central rays of each arrangement area is first determined. Then, the central ray with the smallest perpendicular distance to the target pin is selected as the target central ray. Next, starting from the target pin, a line perpendicular to the target central ray is drawn as the target connection line, and the coordinates of the intersection point of the target connection line and the target central ray are obtained.

[0055] Furthermore, the method for determining the coordinates of the intersection point between the target connecting line and the central ray can also be adjusted according to specific design requirements and device characteristics, and this application does not impose any limitations on this.

[0056] S206, determine the arrangement position of the target device based on the target coordinates.

[0057] Optionally, in the embodiments of this application, the above-mentioned target coordinates refer to the positioning coordinates of the target device relative to the center device in the devices to be arranged, which are used to determine the precise arrangement position of the target device on the PCB.

[0058] It should be noted that the target coordinates can be fine-tuned based on design constraints, device properties, or user-defined rules to meet specific circuit performance or manufacturing process requirements. This application does not impose any limitations on this.

[0059] For example, a pre-layout operation is first performed on the largest device in the target coordinate system, where the largest device is selected from the devices to be laid out. The origin of the target coordinate system is located at the center point of the central device, which is connected to the devices to be laid out via pins. Subsequently, a central ray is determined for each layout area, starting from the center point of the largest device, with the ray direction being the same as or opposite to one of the coordinate axes of the target coordinate system, thereby providing a reference for the subsequent layout of devices.

[0060] Furthermore, based on the target device among the devices to be arranged, the target pin on the central device is determined. The target pin intersects the target central ray through the target connecting line, where the target connecting line is perpendicular to the target central ray, and the perpendicular distance between the target central ray and the target pin is the shortest, i.e., less than the perpendicular distance between other central rays and the same target pin. By calculating the coordinates of the intersection point of the target connecting line and the target central ray, the target coordinates are determined, and these coordinates are used to determine the arrangement position of the target device on the PCB.

[0061] In an exemplary embodiment, taking a high-frequency signal processing circuit board application scenario as an example, the central device and the largest device are first determined. The central device is typically the core chip for signal processing, while the largest device is a large integrated circuit or high-frequency antenna module. In the target coordinate system, the pre-arrangement operation of the largest device establishes the central rays of four arrangement areas. Next, a target device (such as a high-frequency filter) is selected as the object of the next operation. Based on the pin layout of the target device, a target pin of the central device is determined. By drawing a target connecting line from the target pin along a direction perpendicular to the target central ray, the coordinates of the intersection point of the target connecting line and the target central ray are found. Finally, based on these intersection coordinates, the arrangement position of the target device (high-frequency filter) on the PCB is determined, ensuring the shortest signal transmission path between devices and maximizing signal integrity.

[0062] In this embodiment, a pre-arrangement operation is performed on the largest device in a target coordinate system to determine the center ray of each arrangement area. The largest device is the one with the largest size among the devices to be arranged around the already arranged center device. The origin of the target coordinate system is determined by the center point of the center device. The first coordinate axis of the target coordinate system is determined by the horizontal direction to the right of the center device, and the second coordinate axis is determined by the vertical direction upward of the center device. The center device is connected to the devices to be arranged through various device pins. The starting point of the center ray is determined by the center point of the largest device. The ray direction of the center ray is related to the positive direction of the first coordinate axis, the negative direction indicated by the first coordinate axis, and the direction of the second coordinate axis. The positive direction and the opposite direction indicated by the second coordinate axis are the same. Based on the target device among the devices to be arranged, the target pin of the central device is determined, and the target coordinates are determined according to the intersection coordinates of the target connecting line where the target pin is located and the target central ray. The target connecting line is perpendicular to the target central ray, and the target central ray is the central ray with the shortest perpendicular distance to the target pin among all central rays. The central device is connected to the target device through the target pin. This method of determining the placement position of the target device based on the target coordinates, by using the largest device as the starting point and reference for layout, provides a clear direction and spatial range for the automatic placement of subsequent devices through the establishment of the target coordinate system and the determination of the central ray. Determining the target pin of the central device based on the target device among the devices to be arranged, and determining the target coordinates according to the intersection coordinates of the target connecting line where the target pin is located and the target central ray, reduces the computational complexity of device placement. It eliminates the need for a comprehensive search or simulation; only the perpendicular distance from the pin to the central ray needs to be calculated, thus significantly improving the efficiency of device placement. This achieves the technical effect of improving the efficiency and accuracy of device placement, thereby solving the technical problems of complex manual layout of printed circuit boards and low device placement efficiency.

[0063] As an optional approach, a pre-arrangement operation is performed on the largest device in the target coordinate system to determine the center ray of each arrangement region. This includes: sequentially determining each of the aforementioned arrangement regions as the current arrangement region, and performing the following operations on the largest device to determine the center ray of the current arrangement region: obtaining the pre-arrangement coordinates in the current arrangement region that are shortest to the origin of the coordinate system; arranging the largest device at the position corresponding to the pre-arrangement coordinates; determining the current starting point based on the center point of the largest device, and obtaining the relative position information between the current arrangement region and the center device; determining the direction of the current ray based on the relative position information, wherein the direction of the current ray is the same as the positive or negative direction of the coordinate axis of the target coordinate system; and determining the center ray of the current arrangement region based on the current starting point and the current ray direction.

[0064] Optionally, in this embodiment, the aforementioned current arrangement area refers to a specific electronic component arrangement area defined in the target coordinate system, including but not limited to four arrangement areas: top, bottom, left, and right. The pre-arrangement coordinates are a series of candidate coordinates within the current arrangement area used for preliminary positioning of the largest device. The largest device refers to the device with the largest length and width dimensions among the devices to be arranged. Relative position information is information about the relationship between the current arrangement area and the central device, including considerations of direction and distance, used to guide the determination of the central ray.

[0065] It should be noted that the selection of the largest device, the design of the pre-arranged coordinates, and the method of determining the central ray can all be adjusted according to the specific design environment and objectives.

[0066] For example, the selection of the largest device can be based on device size, number of pins, or signal transmission requirements; the pre-arrangement coordinates can be pre-calculated optimized positions or preliminary placement points based on simple rules. This application does not limit this.

[0067] For example, the central ray of the arrangement area is determined in the target coordinate system. Taking the largest device as the center, the pre-arrangement coordinates of the device closest to the center in the current arrangement area are obtained, and the largest device is placed at that coordinate position. The starting point and direction of the central ray are further determined, laying the foundation for the accurate layout of subsequent devices.

[0068] In an exemplary embodiment, taking a high-density multilayer PCB design application scenario as an example, assume there is a group of integrated circuits, resistors, capacitors, and other components of different sizes to be arranged, where the largest component is a large processor chip, and the central component is a memory chip closely connected to the processor. In the target coordinate system (with the center of the memory chip as the origin), regions A, B, C, and D are sequentially determined as the current arrangement areas, such as... Figure 6 As shown, m1 is the largest device in terms of both length and width among all devices.

[0069] Furthermore, the pre-arrangement coordinates of the closest memory chip center in the region are obtained, and the processor chip is initially placed at that position. Subsequently, the starting point of the current arrangement region is determined based on the center of the processor chip, and the current ray direction (consistent with the coordinate axis direction) is determined based on the relative position information of the processor and memory. The center rays of each arrangement region are determined in sequence, providing guidance for subsequent device layout.

[0070] Specifically, taking area A as the current arrangement area as an example, the relative position information indicates that the ray direction of the center ray of area A is towards the positive X-axis. Therefore, it is placed in the center and on the far left of area A (pre-arrangement coordinates). Similarly, it is placed in the center and on the top of area B (pre-arrangement coordinates), in the center and on the far right of area C (pre-arrangement coordinates), and in the center and on the bottom of area D (pre-arrangement coordinates).

[0071] like Figure 6 As shown, a-center-line is the central ray of region A, with its starting point being the center point of region m1; b-center-line is the central ray of region B, with its starting point being the center point of region m1; c-center-line is the central ray of region C, with its starting point being the center point of region m1; and d-center-line is the central ray of region D, with its starting point being the center point of region m1.

[0072] It should be noted that after determining each central ray, the largest device arranged in each area can be deleted. That is, the final arrangement position of the largest device is not necessarily any of the above-mentioned pre-arranged positions. In other words, the final arrangement position of the largest device may be within the currently preset arrangement area, or it may be adjusted to other more suitable positions according to the needs of the overall layout of the circuit board, so as to achieve the optimization of the circuit board design, including but not limited to reducing signal delay, improving signal integrity, and optimizing heat dissipation path.

[0073] Through the embodiments of this application, the center ray of the layout area is determined by the pre-layout operation based on the largest size device. This achieves the technical effects of optimizing the device layout path, reducing wiring conflicts, improving circuit board design efficiency and signal integrity, and realizing the purpose of automatically and efficiently determining the device layout position in PCB design. It is especially suitable for high-density circuit design and improves the automation level and design quality of the overall design.

[0074] As an optional approach, after determining the target coordinates based on the intersection coordinates of the target connection line where the target pin is located and the target center ray, the method further includes: when only the center device is arranged on the target coordinate system, determining the arrangement position of the target device as the position corresponding to the target coordinates; when at least one of the center device and the device to be arranged is arranged on the target coordinate system, determining the arrangement position of the target device based on the target coordinates and the arrangement position of at least one of the devices to be arranged.

[0075] Optionally, in this embodiment, the target pin refers to a specific pin on the central device used to connect to the target device, including but not limited to signal input pins, signal output pins, power supply pins, and ground pins. The target connection line is a line perpendicular to the target central ray and passing through the target pin, used to calculate the target coordinates. The target central ray represents the guide line for the device layout in the arrangement area, and its origin and direction are determined by the center point of the largest device and the axis of the target coordinate system.

[0076] It's important to note that the final placement of the target device is determined not only based on the target coordinates but also considering its interactions with already placed devices, such as signal interference, power distribution, and thermal management, to ensure optimal layout. When only the central device is placed in the target coordinate system, the target device can be directly placed at its corresponding position, simplifying the layout process. However, if the central device and at least one other device are already placed in the target coordinate system, the placement of the target device needs to be adjusted based on the target coordinates and the position information of already placed devices to avoid interference between devices and ensure PCB performance.

[0077] For example, once the target coordinates are determined, the current device layout in the target coordinate system is further considered. Figure 7 As shown, if only the central device is arranged, the target device can be directly arranged at the position corresponding to the target coordinates. Conversely, if the central device and other devices are already arranged on the target coordinate system, the arrangement position of the target device needs further analysis to ensure that it does not conflict with the already arranged devices, while meeting circuit design specifications, such as signal path length and pin alignment.

[0078] In an exemplary embodiment, taking a multi-layer PCB design application scenario as an example, assume the central device is a high-performance processor, and the target device is a high-speed memory connected to it. When only the processor is arranged on the target coordinate system, the memory's placement is directly determined based on the target coordinates, and it is arranged at the position corresponding to the target coordinates. If the processor and other devices (such as power management chips) are already arranged on the target coordinate system, then when determining the memory's placement, in addition to considering the target coordinates, it is also necessary to analyze the mutual influence between the memory and the already arranged devices such as power management chips, such as signal path length and power line distribution, to ensure that the memory's placement meets the connection requirements with the processor while avoiding signal interference or power conflicts with other devices, ultimately determining the optimal placement position.

[0079] Through the embodiments of this application, a device layout control strategy based on target coordinates and current layout status is adopted, which realizes the technical effect of flexibly adjusting the layout position of target devices at different layout stages, avoiding signal interference and resource conflicts between devices, and achieving the purpose of optimizing circuit board layout, improving design efficiency and circuit performance.

[0080] As an optional approach, when at least one of the central device and the devices to be arranged is arranged in the target coordinate system, the arrangement position of the target device is determined based on the target coordinates and the arrangement position of at least one of the devices to be arranged. The method further includes: when all coordinates in the first set of arranged coordinates satisfy the non-interference condition with the target coordinates, the arrangement position of the target device is determined as the position corresponding to the target coordinates, wherein one coordinate in the first set of arranged coordinates corresponds to one of the devices to be arranged that has been arranged in the target coordinate system; when at least one coordinate in the first set of arranged coordinates does not satisfy the non-interference condition with the target coordinates, the target coordinates are adjusted according to a preset step size to obtain a first updated coordinate, and the arrangement position of the target device is determined as the position corresponding to the first updated coordinate, wherein all coordinates in the first set of arranged coordinates satisfy the non-interference condition with the first updated coordinate.

[0081] Optionally, in this embodiment, the "no-interference condition" refers to ensuring that, when arranging devices in the target coordinate system, the target device and the already arranged devices meet the requirements of minimum safe distance, no signal line crossing, and reasonable power and ground line allocation, so as to avoid physical conflicts, signal interference, or power problems. The preset step size refers to the fixed, small movement distance used when adjusting the coordinates, used to find a new position that meets the no-interference condition when there is interference between the target coordinates and the already arranged devices. The first set of already arranged coordinates includes the coordinates of those devices that have been positioned in the target coordinate system based on the central device and the central ray. The target coordinates are the coordinates calculated from the intersection of the target pin and the central ray, serving as a preliminary arrangement reference for the target devices.

[0082] It should be noted that during the process of determining the placement of the target device, if all coordinates in the first set of already arranged coordinates satisfy the non-interference condition with the target coordinates, i.e., there is no physical or signal conflict, the target device can be directly placed at the position corresponding to the target coordinates. However, in actual design, due to factors such as device size, pin distribution, and signal paths, interference may occur between the target coordinates and the positions of the already arranged devices. In this case, the target coordinates are adjusted according to a preset step size until the first updated coordinates that satisfy the non-interference condition are found, thereby determining the placement of the target device. The specific details of the preset step size, adjustment direction, and non-interference condition can be flexibly adjusted according to design requirements and the characteristics of the circuit board, and this application does not limit them.

[0083] For example, when a central device and some devices to be arranged are pre-set, the arrangement position of the target device is determined by checking whether the interval between the target coordinates and the already arranged devices meets the non-interference condition. If it does, the arrangement position of the target device is directly determined; if it does not, the target coordinates are adjusted by a preset step size until a new coordinate that meets the non-interference condition is found, thereby ensuring that the arrangement of the target device follows the design rules and avoids conflicts with the already arranged devices.

[0084] In an exemplary embodiment, taking the PCB design application scenario of an electronic product as an example, assume that the central component (such as a processor) and several other components (such as memory, power management chips, etc.) have been arranged on the target coordinate system according to the central ray, and the target component is a high-speed network interface chip. When determining the placement of the target component, the target coordinates between it and the central component are first calculated. If, through inspection, it is found that the distances between the target coordinates and the already arranged processor and power management chip all meet the minimum safe distance requirements, and there are no signal line intersections, then the target component can be directly placed at the position corresponding to the target coordinates. However, if... Figure 8 As shown, if interference with a certain arranged device is detected, such as the distance between the device and the memory being too close, the target coordinates will be moved in small steps in the X-axis or Y-axis direction according to a preset step size (e.g., 1 mm) until the first updated coordinate that meets the interference-free condition is found. The target device will then be arranged at this coordinate, thereby achieving precise layout control of the target device and avoiding physical conflicts and signal interference.

[0085] Through the embodiments of this application, a device arrangement strategy based on non-interference conditions and preset step size adjustment is adopted to achieve automatic adjustment of device arrangement positions in complex environments with already arranged devices. This ensures that the circuit board design meets signal integrity requirements without violating physical design rules (such as minimum safety distance, wiring rules, etc.), thereby achieving the goal of improving layout efficiency, ensuring design quality, and circuit performance in high-density PCB design.

[0086] As an optional approach, when at least one coordinate in the first set of arranged coordinates and the target coordinates do not meet the interference-free condition, adjusting the target coordinates according to a preset step size to obtain updated target coordinates includes: determining the adjustment direction based on the ray direction indicated by the target center ray when at least one coordinate in the first set of arranged coordinates and the target coordinates do not meet the interference-free condition; moving the target coordinates N preset step sizes according to the adjustment direction to obtain updated target coordinates, where N is a positive integer.

[0087] Optionally, in this embodiment, the adjustment direction refers to determining the direction in which the target coordinates move within the target coordinate system based on the direction indicated by the target's central ray. The preset step size is a predetermined small distance unit used to control the distance moved each time the target coordinates are adjusted. A positive integer N represents the number of times the target coordinates need to move along a specific direction when interference exists between the target coordinates and the already arranged coordinate set. This determines the target's updated coordinates, ensuring that the arrangement of the target device meets the interference-free condition.

[0088] It should be noted that the direction of adjustment, the size of the preset step size, and the value of the positive integer N can all be adjusted according to the specific circuit board design environment and design requirements.

[0089] For example, the adjustment direction can be forward or reverse along the ray indicated by the target center ray. The preset step size may vary between 0.1 mm and 5 mm depending on the accuracy requirements of the circuit board and the size of the components. The value of N depends on the shortest non-interference distance between the target coordinates and the components in the first set of already arranged coordinates. This application does not limit the specific selection and adjustment of the values, but aims to provide a flexible component layout adjustment mechanism.

[0090] For example, when there is interference between the target coordinates and the coordinates in the first set of arranged coordinates, such as Figure 9 As shown, the technical solution of this application embodiment will determine the direction of target coordinate adjustment according to the direction of the target center ray, and move continuously N times in a preset step size until a target update coordinate that meets the non-interference condition is found, so as to guide the final arrangement of the target device.

[0091] In an exemplary embodiment, taking multi-layer PCB design, particularly high-density circuit layout, as an example, assume the target device is a large-sized filter, and the target center ray points in the direction of the power line emanating from the central device (such as a processor). If the initially calculated target coordinates interfere with the coordinates of the already arranged power management chips, the adjustment direction is determined based on the ray direction of the target center ray by continuously moving along the ray direction by a preset step size (e.g., 0.2 mm) until the first target updated coordinate that does not interfere with all the already arranged devices is found. At this point, the filter is placed at that coordinate position, thereby achieving precise device layout, avoiding signal line crossings and power line interference, and optimizing the layout density and signal integrity on the circuit board.

[0092] Through the embodiments of this application, the target coordinates are adjusted based on the direction of the target center ray, combined with a movement strategy of preset step size and positive integer N. This achieves the technical effect of automatically adjusting the coordinates of the devices to be arranged when pre-arranged devices are present, so as to meet the technical effect of no interference conditions. This achieves the purpose of improving the automation and accuracy of layout in complex circuit design, and optimizing circuit board performance and design quality.

[0093] As an optional approach, the method further includes: determining that the target coordinates and the first coordinates satisfy the interference-free condition when the target coordinates and the first coordinates are in different arrangement areas, wherein the first set of arranged coordinates includes the first coordinates; and obtaining the target distance between the target coordinates and the first coordinates when the target coordinates and the first coordinates are in the same arrangement area and the first device has been arranged to the position corresponding to the first coordinates, and determining whether the target coordinates and the first coordinates satisfy the interference-free condition based on the target distance.

[0094] Optionally, in this embodiment, the arrangement area can be four specific areas, A, B, C, and D, defined based on the length and width offset values ​​of the central device, used to guide the initial arrangement of the devices. The target coordinates and the first coordinates represent the positions of the target device and the first arranged device in the target coordinate system, respectively. The no-interference condition refers to the minimum safe distance between devices, wiring rules, signal integrity requirements, etc., in the circuit board layout design to ensure that the device arrangement meets circuit performance and manufacturing feasibility requirements.

[0095] It should be noted that the division of the layout area, the determination of the target coordinates and the first coordinate, and the evaluation of the non-interference condition may vary depending on different circuit board designs, device types, and circuit performance requirements.

[0096] For example, the size and location of the layout area can be adjusted according to the specific size of the central device and the surrounding wiring environment. The setting of no-interference conditions can also be customized according to the signal frequency, voltage level and thermal management requirements. This application does not limit this.

[0097] For example, when determining that the target coordinates and the first coordinates meet the interference-free condition, if the target coordinates and the first coordinates are located in different arrangement areas, it is directly confirmed that they meet the interference-free condition; however, if they are in the same arrangement area and there is a first arranged device, the actual distance between the target coordinates and the first coordinates, i.e., the target distance, will be calculated, and then based on the target distance and the preset interference-free condition, it will be evaluated whether the two meet the interference-free requirement.

[0098] In one exemplary embodiment, a central device (such as a CPU) has been designated into four layout regions based on its length and width offsets. The target device is a connector, and the first deployed device is a voltage regulator; both are located in region B. When deploying the connector, the system first calculates the coordinates of the intersection point between the connector's target pin and the central ray of region B, i.e., the target coordinates. Then, it checks the target distance between the target coordinates and the deployed coordinates of the voltage regulator (the first coordinates) to confirm whether they meet the minimum safe distance requirements and signal path length specifications, thereby determining the final placement of the connector.

[0099] Through the embodiments of this application, an interference-free condition evaluation strategy based on device layout area and target distance is adopted. This achieves the technical effect of automatically and accurately determining whether the device layout meets the interference-free condition in different layout areas and in the same layout area, thereby achieving the purpose of optimizing device layout, improving circuit board design efficiency and circuit performance.

[0100] As an optional approach, determining whether the target coordinates and the first coordinates satisfy the interference-free condition based on the target distance includes: determining that the target coordinates and the first coordinates satisfy the interference-free condition when the target distance is greater than the interference distance threshold, wherein the interference distance threshold is determined by the size of the target device and the size of the first device; and determining that the target coordinates and the first coordinates do not satisfy the interference-free condition when the target distance is less than or equal to the interference distance threshold.

[0101] Optionally, in this embodiment, the interference distance threshold refers to the minimum distance required to ensure that the target device and the first device meet interference-free conditions such as minimum safety distance, signal path length control, and thermal management requirements when the target coordinates and the first coordinates are located in the same layout area. The dimensions of the target device and the first device include, but are not limited to, the width, length, height, and pin configuration of the devices, which are used to calculate the interference distance threshold to ensure the rationality of the device layout.

[0102] It should be noted that the determination of the interference distance threshold and the size evaluation of the target device and the first device vary depending on the specific circuit board design, device type and application scenario.

[0103] For example, in high-frequency signal processing circuits, the interference distance threshold needs to be more stringent to avoid crosstalk between signals; while in high-power system design, more attention is paid to the thermal isolation requirements between devices.

[0104] Furthermore, the dimensions of the target device and the first device may be affected by the packaging type, thus affecting the calculation of the interference distance threshold. This application does not impose any limitations on this.

[0105] For example, when the target coordinates and the first coordinates are in the same arrangement area, the target distance between the target coordinates and the first coordinates will be calculated. If the target distance is greater than the interference distance threshold calculated based on the dimensions of the target device and the first device, it will be automatically confirmed that the target coordinates and the first coordinates meet the no-interference condition, allowing the devices to be arranged accordingly. Conversely, if the target distance is less than or equal to the interference distance threshold, it is determined that there is potential physical or signal interference between the target coordinates and the first coordinates, and the target coordinates need to be adjusted to an updated position that meets the no-interference condition.

[0106] In an exemplary embodiment, the target device is a high-speed memory chip, and the first device is another memory chip, both located in arrangement region B. When initially determining the preliminary arrangement position (target coordinates) of the target device, the system calculates the target distance between this position and the first device (already arranged at the first coordinate). This target distance is compared with an interference distance threshold calculated based on the size of the high-speed memory chip. If the target distance is greater than the interference distance threshold, it indicates that the target device can be arranged at the target coordinates without causing signal path length deviation, thermal interference, or other physical conflicts with the first device. Conversely, if the target distance is less than or equal to the interference distance threshold, the system identifies a risk of interference between the devices and requires adjustment of the target coordinates until the interference-free condition is met.

[0107] This application's embodiments employ a device layout strategy based on target distance and interference distance thresholds. This strategy automatically determines whether the layout meets the no-interference condition when the target device and the first device are located in the same area, avoiding physical conflicts and signal interference between devices. This achieves the goal of optimizing circuit board design, improving layout efficiency, and enhancing circuit performance. This strategy is not only applicable to high-density circuit layouts but can also flexibly adjust the interference distance threshold and device size evaluation criteria according to different design requirements, ensuring high performance and high reliability of the circuit board in various application scenarios.

[0108] As an optional approach, after determining the arrangement position of the target device based on the target coordinates, the method further includes: determining the first pin of the central device based on the second device among the devices to be arranged, and determining the second coordinates according to the coordinates of the intersection of the first connecting line and the first central ray where the first pin is located, wherein the first connecting line is perpendicular to the first central ray, the first central ray is the central ray with the shortest perpendicular distance to the first pin among all the central rays, and the central device is connected to the second device through the first pin; and determining the arrangement position of the second device based on the second coordinates.

[0109] Optionally, in this embodiment, the second device refers to another device besides the target device among the devices to be arranged, which also needs to establish an electrical connection with the central device through the pins of the central device. The first pin is a specific pin on the central device that is directly connected to the second device and is used to calculate the second coordinate. The first connecting line is perpendicular to the first central ray and passes through the first pin, and is used to determine the position of the second coordinate relative to the first central ray. The first central ray is a reference straight line that starts from the central device and guides the direction of device arrangement; its selection is based on the minimum perpendicular distance between it and the first pin. The second coordinate is calculated from the intersection of the first pin and the first central ray and is used to determine the arrangement position of the second device.

[0110] It should be noted that the selection of the first pin, the construction of the first connecting line, the positioning of the first central ray, and the calculation of the second coordinate can all be adjusted according to different circuit design requirements, device connection relationships, and physical constraints.

[0111] For example, the first pin may be located at the edge or center of the central device, and the first central ray may be determined based on factors such as the layout of the circuit board, signal flow, or power distribution.

[0112] Meanwhile, the calculation accuracy of the first connection line and the second coordinate must ensure that it meets the specifications of the circuit board design, such as wiring density, signal integrity and thermal management requirements.

[0113] For example, when the placement of a second device in a layout needs to be determined, starting from the first pin of the central device, a second coordinate is calculated by constructing a first connecting line and selecting a first central ray. The first central ray is selected based on the minimum vertical distance to the first pin, ensuring that the second coordinate closely follows the position of the first pin and finds the optimal placement position in the space surrounding the central device. Based on the second coordinate, the second device can be accurately positioned where it should be placed, while avoiding physical interference and signal interference with other existing devices.

[0114] In one exemplary embodiment, the central device is a baseband signal processor, and the target device has been connected to the central device via a specific pin and positioned optimally. Next, a second device, serving as another high-precision clock synchronization module, needs to establish an electrical connection with the central device via another pin (the first pin). A vertical first connection line is constructed based on the position of the first pin, and the first central ray with the shortest vertical distance from the first pin is selected from multiple central rays emanating from the central device. By calculating the coordinates of the intersection point (second coordinates) of the first pin and the first central ray, the placement of the second device is determined, achieving an effective connection with the central device while maintaining a reasonable circuit board layout and avoiding additional wiring conflicts and signal integrity issues.

[0115] As an optional approach, determining the arrangement position of the second device based on the second coordinate includes: when all coordinates in the second set of already arranged coordinates satisfy the non-interference condition with the second coordinate, determining the arrangement position of the second device as the position corresponding to the second coordinate, wherein one coordinate in the second set of already arranged coordinates corresponds to one device in the device to be arranged that has been arranged in the target coordinate system, and the second set of already arranged coordinates includes the target coordinate; when at least one coordinate in the second set of already arranged coordinates does not satisfy the non-interference condition with the second coordinate, adjusting the second coordinate by a preset step size to obtain a second updated coordinate, and determining the arrangement position of the second device as the position corresponding to the second updated coordinate, wherein all coordinates in the second set of already arranged coordinates satisfy the non-interference condition with the second updated coordinate.

[0116] Optionally, in this embodiment, the second set of already arranged coordinates refers to the coordinates of the set of devices whose positions have been determined in the target coordinate system. It encompasses the coordinate information of all previously arranged devices, including the target coordinates. The "no-interference condition" ensures that newly arranged devices meet design rules such as minimum safe distance, no signal line crossing, and reasonable power and ground allocation with existing devices to avoid physical conflicts, signal interference, or power problems. The preset step size is a small, fixed distance unit used to adjust the coordinates. When the second coordinate does not meet the no-interference condition with a coordinate in the second set of already arranged coordinates, the system adjusts the second coordinate according to the preset step size until a position that meets the no-interference condition is found, thus obtaining the second updated coordinate.

[0117] It should be noted that the selection of the preset step size, the direction of the second coordinate adjustment, and the specific details of the interference-free conditions can all be flexibly adjusted according to the actual circuit board design environment, the type of components, and performance requirements.

[0118] For example, the preset step size may vary between 0.1 mm and 1 mm depending on the accuracy requirements of the circuit board, wiring rules, and component dimensions. The adjustment direction can be forward or reverse along the X-axis or Y-axis of the target coordinate system. The setting for interference-free conditions may be customized based on signal frequency, voltage level, and thermal management requirements to ensure the rationality of the layout and the reliability of circuit performance. This application does not limit this.

[0119] For example, when determining the placement of the second device, it is first checked whether the second coordinate and all coordinates in the second set of already arranged coordinates satisfy the non-interference condition. If they do, the second device is directly placed at the position corresponding to the second coordinate. However, if interference is detected between the second coordinate and a coordinate in the second set of already arranged coordinates, the second coordinate is adjusted by a preset step size (e.g., 0.5 mm) until a new second updated coordinate that satisfies the non-interference condition is found, and the second device is placed at the position of the updated coordinate.

[0120] In an exemplary embodiment, taking the PCB design process of a smartphone motherboard as an example, the central component is the processor, and the first component is the memory module, already arranged on the target coordinates. Next, the second component to be arranged is the power management chip, whose placement is determined by the second coordinates calculated from the processor's power pins and the corresponding central ray. When determining the second coordinates, it is first checked whether its coordinates, along with those of the processor, memory module, and other already arranged components, meet the non-interference condition, such as a minimum safe distance of 2mm. If the distance between the second coordinate and the processor's signal pins is found to be less than 2mm, the second coordinate is adjusted by a preset step size (e.g., 1mm) until a new coordinate greater than or equal to 2mm is found—the second updated coordinate—and then the power management chip is arranged on this updated coordinate. This not only avoids physical conflicts with the already arranged components but also ensures signal integrity and circuit performance.

[0121] As an optional approach, before performing the pre-arrangement operation on the largest device in the target coordinate system and determining the center ray of each arrangement region, the method further includes: establishing the target coordinate system with the center point of the central device as the origin, wherein the first coordinate axis of the target coordinate system is determined by the horizontal rightward direction of the central device, and the second coordinate axis of the target coordinate system is determined by the vertical upward direction of the central device; determining the forbidden area based on the length offset value and width offset value of the central device; and determining the arrangement region based on the forbidden area, wherein the forbidden area is adjacent to the arrangement region and the central device, respectively.

[0122] Optionally, in this embodiment, the length offset and width offset values ​​are the offset distances of the central device relative to the boundary of its arrangement area, used to define the size and position of the forbidden area. The target coordinate system is a Cartesian coordinate system with the center point of the central device as the origin, used to determine the precise position of the device arrangement. The forbidden area is a specific area surrounding the central device, where devices will not be arranged to avoid direct contact or signal interference with the central device. The arrangement area is the available arrangement space outside the forbidden area, used to guide the automatic arrangement of other devices.

[0123] It should be noted that the establishment of the target coordinate system, the determination of the restricted area, the division of the layout area, and the setting of the offset value can all be flexibly adjusted according to the specific circuit board design requirements, the type and size of the central component, and the minimum safe distance requirements between components.

[0124] For example, length and width offset values ​​may vary from a few millimeters to tens of millimeters depending on the wiring density, signal frequency, and thermal management requirements of the circuit board. The size of the no-display area can be adapted to the heat dissipation requirements and signal integrity requirements of the central components. The division of the display area may be adjusted according to the overall size and layout rules of the circuit board to ensure a reasonable layout and performance optimization of the entire circuit board. This application does not limit this.

[0125] Exemplary, the technical solution of this application embodiment first establishes a target coordinate system with the center point of the central device as the origin before starting the device pre-layout operation. This ensures that subsequent device placement can be based on a unified coordinate system, thereby improving the accuracy and consistency of the layout. Next, based on the length and width offset values ​​of the central device, the range of the no-layout area is determined to ensure a safe distance around the central device and its critical pins, preventing physical conflicts and signal interference in the layout. Finally, based on the determined no-layout area, placement areas are further divided. These placement areas will guide the automatic placement of subsequent devices, ensuring the efficiency and rationality of the layout.

[0126] In one exemplary embodiment, the central device is a multi-core processor with dimensions of 60mm × 40mm. When establishing the target coordinate system, the center point of the processor is used as the origin (X = 0, Y = 0), ensuring layout symmetry and the dominant position of the central device. The no-displacement zone is determined based on the processor's length and width, offset by 10mm along both the X and Y axes (length offset 10mm, width offset 10mm). No other devices will be placed within a 10mm radius around the processor to avoid signal interference and heat dissipation issues. The no-displacement zone further defines the placement area, i.e., the available placement space around the processor, which will guide the automatic placement of peripheral devices such as capacitors, resistors, and connectors.

[0127] Through the embodiments of this application, by establishing a target coordinate system with the center point of the central device as the origin, determining the no-displacement area based on the length and width offset values, and dividing the layout area based on the no-displacement area, the technical effect of automatically and efficiently laying out peripheral devices in complex circuit board designs is achieved, thereby optimizing circuit board layout, improving design efficiency and circuit performance.

[0128] In an exemplary embodiment, the inputs are the length and width of the chip (center device): (L) (length), (W) (width), and pin coordinates: a set of coordinates relative to the chip center ((x...). i, y i, )), Length and width of target pins and target device: (d i, l i, w i ), where (d i ) is the target device associated with the target pin, (l i ) and (w i These are the length and width of the target device, respectively. The offset values ​​in the length and width directions of the chip's no-show area are: (J) 1, J2), the offset values ​​in the length and width directions of the chip device arrangement area: (P1, P2, P3, P4). After using the device position determination method proposed in this application, the arrangement coordinates of the target device ((x) can be obtained. i ′ y i ′ )).

[0129] Exemplary examples include, but are not limited to:

[0130] S1, chip positioning and coordinate system establishment involves placing the chip horizontally with the chip center as the coordinate origin;

[0131] S2, set the coordinate axis direction: the right side of the horizontal direction is the positive direction of the (X) axis, and the top of the vertical direction is the positive direction of the (Y) axis.

[0132] S3, Determining the no-discharge area: Based on the chip's length and width offset values ​​(J 1, J2), determine the no-emission zone around the chip.

[0133] S4, Layout area determination: Based on the offset values ​​of the prohibited areas ((P1,P2,P3,P4)), determine the layout areas (A), (B), (C), and (D). Area (A) is located at the top of the chip, area (B) is located on the right side of the chip, area (C) is located at the bottom of the chip, and area (D) is located on the left side of the chip.

[0134] S5, Determine the starting point of the central ray: In the four regions (A), (B), (C), and (D), find the center of the largest device at the leftmost, topmost, rightmost, and bottommost position, respectively, as the starting point of the central ray for each region.

[0135] S6, Central Ray Drawing: Using the starting point of the central ray of each arrangement area, draw the central rays of (A), (B), (C), and (D).

[0136] S7, Intersection Calculation: For each pin, draw a perpendicular line to the center ray of regions (A), (B), (C), and (D), and calculate the coordinates of the intersection point of the perpendicular line and the center ray. Adjust the target coordinates according to the position of the intersection point to ensure that the intersection point is in the correct direction of the starting point of the center ray.

[0137] S7, Device Layout: Arrange the target devices with pins on the intersection coordinates. Devices in areas (A) and (C) are arranged horizontally, and devices in areas (B) and (D) are arranged vertically.

[0138] S8, Interference Analysis: If interference exists, adjust the device position according to the region until there is no interference.

[0139] S9 outputs the final set of coordinates of all associated devices after the layout ((x...)). i ′ y i ′ )).

[0140] For example, when calculating the distance from the pin to the new coordinates of the device in each region, only the device coordinates of the region with the smallest distance can be retained as the target coordinates mentioned above.

[0141] In yet another exemplary embodiment, taking a chip as the central device, the embodiment includes, but is not limited to:

[0142] S1, Chip Positioning: The chip is placed horizontally.

[0143] S2, Coordinate system establishment: The center of the chip is the origin of the coordinate system, the right side of the chip in the horizontal direction is the positive direction of the (X) axis, and the top of the chip in the vertical direction is the positive direction of the (Y) axis.

[0144] S3, Determine the no-discharge area: Determine the no-discharge area based on the chip's length and width offsets (J1) and (J2).

[0145] S4, Layout area determination: Based on the length and width offset values ​​(P1), (P2), (P3), and (P4) of the prohibited layout area, the layout areas (A), (B), (C), and (D) are determined. Among them, area (A) is located at the top of the chip, area (B) is located on the right side of the chip, area (C) is located at the bottom of the chip, and area (D) is located on the left side of the chip, forming an alternating layout.

[0146] S5, Determination of the central ray: In the four regions (A), (B), (C), and (D), the center of the largest device at the leftmost, topmost, rightmost, and bottommost position is taken as the starting point of the central ray for each region.

[0147] S6, Central Ray Drawing: Draw the center line of each region starting from the center line of each region.

[0148] S7, Intersection Calculation:

[0149] Draw perpendicular lines from the needle to the center lines of regions (A), (B), (C), and (D) in sequence, and calculate the coordinates of the intersection points of the perpendicular lines with the center lines of each region.

[0150] If the x-coordinate of the intersection point of region (A) is less than the x-coordinate of the starting point of the center line, the intersection point moves slightly in the positive direction of the (X) axis until it reaches or exceeds the x-coordinate of the starting point of the center line.

[0151] If the y-value of the intersection point of region (B) is greater than the y-value of the starting point of the center line, the intersection point will move slightly in the negative direction of the (Y) axis until it is equal to or less than the y-value of the starting point of the center line.

[0152] If the x-value of the intersection point of region (C) is greater than the x-value of the starting point of the center line, then the intersection point moves slightly in the negative direction of the (X) axis until it is equal to or less than the x-value of the starting point of the center line.

[0153] If the y-value of the intersection point of region (D) is less than the y-value of the starting point of the center line, the intersection point will move slightly in the positive direction of the (Y) axis until it is equal to or greater than the y-value of the starting point of the center line.

[0154] S8, Component Arrangement: Arrange the associated components of the pins on the coordinates of each intersection point. Components in areas (A) and (C) are arranged horizontally, and components in areas (B) and (D) are arranged vertically.

[0155] S9, Interference Analysis:

[0156] If interference exists in region (A), the current device moves in the positive direction of the (X) axis.

[0157] If interference exists in region (B), the current device moves in the negative direction of the (Y) axis.

[0158] If interference exists in region (C), the current device moves in the negative direction of the (X) axis.

[0159] If interference exists in region (D), the current device moves in the positive direction of the (Y) axis.

[0160] Interference analysis can be performed again after each step of movement until there is no interference, and the new coordinates of each device in each region can be recorded.

[0161] S10, Distance Calculation: Calculate the distance from the pin to the new coordinates of the device in each region, retain the device in the region with the smallest distance, and delete the device in other regions.

[0162] S11, Output: After all the associated devices of the pins are arranged, output the coordinates of the associated devices of the chip.

[0163] For example, a Cartesian coordinate system can be established with the chip center as the origin. The horizontal direction to the right of the chip is defined as the positive X-axis, and the vertical upward direction is set as the positive Y-axis. The layout areas A, B, C, and D are defined as device layout areas, with their boundaries determined by the boundary offsets P1, P2, P3, and P4 of the forbidden zones, respectively. m1 is the device with the largest length and width among all devices. It is placed centered and on the far left in area A, centered and on the top in area B, centered and on the far right in area C, and centered and on the bottom in area D. Devices of m1 placed in each area are deleted. For the placement of the first device, the distances and intersection points from point x1 to a-center-line, b-center-line, c-center-line, and d-center-line are measured and calculated. Then, devices with associated pins are placed at these intersection points. In areas AC, devices should be placed vertically; in areas BD, devices should be placed horizontally. Select the component with the smallest distance from the pin to the center line (as shown by the bold red solid line in the figure), and delete components in other areas.

[0164] Secondly, regarding the placement of the second component, firstly, measure and calculate the distances and intersections from point x2 to a-center-line, b-center-line, c-center-line, and d-center-line, respectively. Then, arrange the components at these intersections. Within the AC area, the components should be placed vertically; within the BD area, the components should be placed horizontally. Select the component with the smallest distance from its pin to the center line, and delete components placed in other areas.

[0165] Since the second device may interfere with the first device, interferometry analysis is required in this region. If interference exists in this region, the device is moved in small increments within that region: region A along the positive X-axis, region B along the negative Y-axis, region C along the positive X-axis, and region D along the positive Y-axis. After each iteration, the interferometry analysis is repeated until the devices in this region no longer interfere.

[0166] This application's embodiments achieve PCB chip layout optimization. By defining the layout area, center line, and no-layout zone, the connection between pins and devices is transformed into a vertical line intersection problem. Simultaneously, a micro-step adjustment technique in a specified direction is used to avoid physical conflicts, enabling automatic device placement. Based on the chip size, pin position, and device size, the no-layout zone and layout area are determined, a center line is established, and the intersection point of the pin and the center line is calculated. The micro-step adjustment technique in a specified direction ensures no physical conflicts between devices, ultimately outputting the coordinates of the devices associated with the pins. This achieves the technical effects of defining the device layout range, reducing the computational space, and improving computational efficiency. Furthermore, it only requires calculating the shortest distance from the chip pin to the layout area, using micro-step movement in a specified direction to avoid device interference, resulting in low algorithm complexity and easy convergence.

[0167] It is understood that in the specific embodiments of this application, data such as user information are involved. When the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of related data must comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0168] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0169] According to another aspect of the embodiments of this application, a device position determination apparatus for implementing the above-described device position determination method is also provided. For example... Figure 10 As shown, the device includes:

[0170] The pre-arrangement module 1002 is used to perform a pre-arrangement operation on the largest device in the target coordinate system and determine the center ray of each arrangement area. The largest device is the device with the largest size among the devices to be arranged around the already arranged center device. The origin of the target coordinate system is determined by the center point of the center device, and the coordinate axes of the target coordinate system are determined by the edges of the center device. The center device is connected to the devices to be arranged through each device pin. The starting point of the center ray is determined by the center point of the largest device, and the ray direction of the center ray is the same as the positive or negative direction of the coordinate axis of the target coordinate system.

[0171] The execution module 1004 is used to determine the target pin of the center device based on the target device in the device to be arranged, and to determine the target coordinates according to the coordinates of the intersection of the target connecting line and the target center ray where the target pin is located. The target connecting line is perpendicular to the target center ray, and the target center ray is the center ray with the shortest perpendicular distance to the target pin among all center rays. The center device is connected to the target device through the target pin.

[0172] The determination module 1006 is used to determine the arrangement position of the target device based on the target coordinates.

[0173] As an optional solution, the above-mentioned device is used to perform a pre-arrangement operation on the largest device in the target coordinate system and determine the center ray of each arrangement area by: sequentially determining each of the above-mentioned arrangement areas as the current arrangement area, and performing the following operations on the largest device to determine the center ray of the current arrangement area: obtaining the pre-arrangement coordinates of the current arrangement area that are shortest to the origin of the coordinate system; arranging the largest device to the position corresponding to the pre-arrangement coordinates; determining the current starting point based on the center point of the largest device, and obtaining the relative position information of the current arrangement area and the center device; determining the current ray direction based on the relative position information, wherein the current ray direction is the same as the positive or negative direction of the coordinate axis of the target coordinate system; and determining the center ray of the current arrangement area based on the current starting point and the current ray direction.

[0174] As an optional solution, the above-mentioned device is used to determine the arrangement position of the target device as the position corresponding to the target coordinates after determining the target coordinates based on the intersection coordinates of the target connection line where the target pin is located and the target center ray, when only the center device is arranged on the target coordinate system; and when at least one of the center device and the device to be arranged has been arranged on the target coordinate system, to determine the arrangement position of the target device based on the target coordinates and the arrangement position of at least one of the devices to be arranged.

[0175] As an optional solution, the above-mentioned device is used to determine the arrangement position of the target device based on the target coordinates and the arrangement position of the at least one device among the devices to be arranged, when the coordinates in the first set of arranged coordinates all satisfy the non-interference condition with the target coordinates, and the arrangement position of the target device is determined as the position corresponding to the target coordinates, wherein one coordinate in the first set of arranged coordinates corresponds to one device among the devices to be arranged that has been arranged in the target coordinate system; if at least one coordinate in the first set of arranged coordinates does not satisfy the non-interference condition with the target coordinates, the target coordinates are adjusted according to a preset step size to obtain a first updated coordinate, and the arrangement position of the target device is determined as the position corresponding to the first updated coordinate, wherein all coordinates in the first set of arranged coordinates satisfy the non-interference condition with the first updated coordinate.

[0176] As an optional solution, the above-mentioned device is used to adjust the target coordinates according to a preset step size to obtain updated target coordinates when at least one coordinate in the first set of arranged coordinates and the target coordinates do not meet the interference-free condition, in the following manner: when at least one coordinate in the first set of arranged coordinates and the target coordinates do not meet the interference-free condition, the adjustment direction is determined according to the ray direction indicated by the target center ray; the target coordinates are moved N preset step sizes according to the adjustment direction to obtain the updated target coordinates, where N is a positive integer.

[0177] As an optional solution, the above-mentioned device is further configured to: determine that the target coordinates and the first coordinates satisfy the interference-free condition when the target coordinates and the first coordinates are in different arrangement areas, wherein the first set of arranged coordinates includes the first coordinates; and when the target coordinates and the first coordinates are in the same arrangement area and the first device has been arranged to the position corresponding to the first coordinates, obtain the target distance between the target coordinates and the first coordinates, and determine whether the target coordinates and the first coordinates satisfy the interference-free condition based on the target distance.

[0178] As an optional solution, the above-mentioned device is used to determine whether the target coordinates and the first coordinates satisfy the interference-free condition based on the target distance in the following manner: when the target distance is greater than the interference distance threshold, the target coordinates and the first coordinates are determined to satisfy the interference-free condition, wherein the interference distance threshold is determined by the size of the target device and the size of the first device; when the target distance is less than or equal to the interference distance threshold, the target coordinates and the first coordinates are determined not to satisfy the interference-free condition.

[0179] As an optional solution, the above-mentioned device is further configured to: after determining the arrangement position of the target device based on the target coordinates, determine the first pin of the central device based on the second device among the devices to be arranged, and determine the second coordinates according to the coordinates of the intersection of the first connecting line and the first central ray where the first pin is located, wherein the first connecting line is perpendicular to the first central ray, the first central ray is the central ray with the shortest perpendicular distance to the first pin among all the central rays, and the central device is connected to the second device through the first pin; and determine the arrangement position of the second device based on the second coordinates.

[0180] As an optional solution, the above-mentioned device is used to determine the arrangement position of the second device based on the second coordinate in the following manner: when all coordinates in the second set of already arranged coordinates satisfy the non-interference condition with the second coordinate, the arrangement position of the second device is determined to be the position corresponding to the second coordinate, wherein one coordinate in the second set of already arranged coordinates corresponds to one of the devices to be arranged that has been arranged in the target coordinate system, and the second set of already arranged coordinates includes the target coordinate; when at least one coordinate in the second set of already arranged coordinates does not satisfy the non-interference condition with the second coordinate, the second coordinate is adjusted according to a preset step size to obtain a second updated coordinate, and the arrangement position of the second device is determined to be the position corresponding to the second updated coordinate, wherein all coordinates in the second set of already arranged coordinates satisfy the non-interference condition with the second updated coordinate.

[0181] As an optional solution, the above-mentioned device is further configured to: perform a pre-arrangement operation on the largest device in the target coordinate system; before determining the center ray of each arrangement region, establish the target coordinate system with the center point of the central device as the origin, wherein the first coordinate axis of the target coordinate system is determined by the horizontal rightward direction of the central device, and the second coordinate axis of the target coordinate system is determined by the vertical upward direction of the central device; determine a no-arrangement region based on the length offset value and width offset value of the central device; determine the arrangement region based on the no-arrangement region, wherein the no-arrangement region is adjacent to the arrangement region and the central device, respectively.

[0182] In this application embodiment, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.

[0183] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.

[0184] According to one aspect of this application, a computer program product is provided, the computer program product comprising a computer program.

[0185] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0186] Specifically, according to embodiments of this application, the processes described in the various method flowcharts can be implemented as computer software programs. For example, embodiments of this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication component, and / or installed from a removable medium. When the computer program is executed by a central processing unit, it performs various functions defined in the system of this application.

[0187] In such an embodiment, the computer program can be downloaded and installed from a network via a communication component, and / or installed from a removable medium. When the computer program is executed by a central processing unit, it performs the various functions provided in the embodiments of this application.

[0188] In other embodiments, the aforementioned terminal device or server can be a node in a distributed system, wherein the distributed system can be a blockchain system, which is a distributed system formed by connecting multiple nodes through network communication. The nodes can form a peer-to-peer network, and any form of computing device, such as a server, terminal, or other electronic device, can become a node in the blockchain system by joining this peer-to-peer network.

[0189] According to one aspect of this application, a computer-readable storage medium is provided, wherein a processor of an electronic device reads computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, causing the electronic device to perform the device location determination method provided in various alternative implementations of the device location determination aspect described above.

[0190] Optionally, in this embodiment, the computer-readable storage medium described above may be configured to store methods for performing the embodiments of this application.

[0191] Optionally, in this embodiment, those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing the hardware related to the terminal device. The program can be stored in a computer-readable storage medium, which may include: flash drive, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0192] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0193] If the integrated units in the above embodiments are implemented as software functional units and sold or used as independent products, they can be stored in the aforementioned computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause one or more electronic devices to execute all or part of the steps of the methods described in the various embodiments of this application.

[0194] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0195] In the several embodiments provided in this application, it should be understood that the disclosed application can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some interfaces; indirect couplings or communication connections between units or modules may be electrical or other forms.

[0196] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0197] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0198] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A method for determining the position of a device, characterized in that, include: In the target coordinate system, a pre-arrangement operation is performed on the largest device to determine the center ray of each arrangement area. The largest device is the device with the largest size among the devices to be arranged around the already arranged center device. The origin of the target coordinate system is determined by the center point of the center device, and the coordinate axes of the target coordinate system are determined by the edges of the center device. The center device is connected to the devices to be arranged through various device pins. The starting point of the center ray is determined by the center point of the largest device, and the ray direction of the center ray is the same as the positive or negative direction of the coordinate axis of the target coordinate system. The target pin of the center device is determined based on the target device in the devices to be arranged, and the target coordinates are determined according to the intersection coordinates of the target connecting line and the target center ray where the target pin is located. The target connecting line is perpendicular to the target center ray, and the target center ray is the center ray with the shortest perpendicular distance to the target pin among all the center rays. The center device is connected to the target device through the target pin. The arrangement position of the target device is determined based on the target coordinates.

2. The method according to claim 1, characterized in that, The step of performing a pre-arrangement operation on the largest device in the target coordinate system and determining the center ray of each arrangement region includes: Each of the aforementioned arrangement regions is sequentially determined as the current arrangement region. The following operation is performed on the largest device to determine the central ray of the current arrangement region: Obtain the pre-arrangement coordinates that are closest to the origin of the coordinate system in the current arrangement area; Arrange the largest device to the position corresponding to the pre-arranged coordinates; The current starting point is determined based on the center point of the largest device, and the relative position information of the current arrangement area and the center device is obtained. The current ray direction is determined based on the relative position information, wherein the current ray direction is the same as the positive or negative direction of the coordinate axis of the target coordinate system; The center ray of the current arrangement area is determined based on the current starting point and the current ray direction.

3. The method according to claim 1, characterized in that, After determining the target coordinates based on the coordinates of the intersection point of the target connection line where the target pin is located and the target center ray, the method further includes: When only the central device is arranged on the target coordinate system, the arrangement position of the target device is determined as the position corresponding to the target coordinates; When at least one of the central device and the device to be arranged has been arranged on the target coordinate system, the arrangement position of the target device is determined according to the target coordinates and the arrangement position of at least one of the devices to be arranged.

4. The method according to claim 3, characterized in that, In the case where at least one of the central device and the devices to be arranged is arranged on the target coordinate system, the method further includes determining the arrangement position of the target device based on the target coordinates and the arrangement position of at least one of the devices to be arranged: When all coordinates in the first set of already arranged coordinates meet the non-interference condition with the target coordinates, the arrangement position of the target device is determined as the position corresponding to the target coordinates, wherein a coordinate in the first set of already arranged coordinates corresponds to a device in the device to be arranged that has been arranged in the target coordinate system; If at least one coordinate in the first set of arranged coordinates does not satisfy the interference-free condition with the target coordinate, the target coordinate is adjusted according to a preset step size to obtain the first updated coordinate. The arrangement position of the target device is then determined as the position corresponding to the first updated coordinate, wherein all coordinates in the first set of arranged coordinates satisfy the interference-free condition with the first updated coordinate.

5. The method according to any one of claims 4, characterized in that, The step of adjusting the target coordinates according to a preset step size to obtain updated target coordinates when at least one coordinate in the first set of arranged coordinates and the target coordinates do not satisfy the non-interference condition includes: If at least one coordinate in the first set of arranged coordinates does not satisfy the non-interference condition with the target coordinate, the adjustment direction is determined according to the ray direction indicated by the target center ray. The target coordinates are moved N preset steps in the adjustment direction to obtain the updated target coordinates, where N is a positive integer.

6. The method according to claim 4, characterized in that, The method further includes: When the target coordinates and the first coordinates are in different arrangement areas, it is determined that the target coordinates and the first coordinates satisfy the non-interference condition, wherein the first set of arranged coordinates includes the first coordinates; When the target coordinates and the first coordinates are in the same arrangement area, and the first device has been arranged to the position corresponding to the first coordinates, the target distance between the target coordinates and the first coordinates is obtained, and the target distance is used to determine whether the target coordinates and the first coordinates satisfy the non-interference condition.

7. The method according to claim 6, characterized in that, The step of determining whether the target coordinates and the first coordinates satisfy the interference-free condition based on the target distance includes: If the target distance is greater than the interference distance threshold, it is determined that the target coordinates and the first coordinates satisfy the non-interference condition, wherein the interference distance threshold is determined by the size of the target device and the size of the first device; If the target distance is less than or equal to the interference distance threshold, it is determined that the target coordinates and the first coordinates do not meet the non-interference condition.

8. The method according to claim 1, characterized in that, After determining the arrangement position of the target device based on the target coordinates, the method further includes: The first pin of the central device is determined based on the second device in the devices to be arranged, and the second coordinate is determined according to the coordinate of the intersection of the first connecting line and the first central ray where the first pin is located. The first connecting line is perpendicular to the first central ray, and the first central ray is the central ray with the shortest perpendicular distance to the first pin among all the central rays. The central device is connected to the second device through the first pin. The arrangement position of the second device is determined based on the second coordinate.

9. The method according to claim 8, characterized in that, Determining the arrangement position of the second device based on the second coordinates includes: When all coordinates in the second set of arranged coordinates satisfy the condition of no interference with the second coordinates, the arrangement position of the second device is determined as the position corresponding to the second coordinates. Here, one coordinate in the second set of arranged coordinates corresponds to one device in the device to be arranged that has been arranged in the target coordinate system. The second set of arranged coordinates includes the target coordinates. If at least one coordinate in the second set of arranged coordinates does not satisfy the non-interference condition, the second coordinate is adjusted according to a preset step size to obtain the second updated coordinate. The arrangement position of the second device is then determined as the position corresponding to the second updated coordinate. All coordinates in the second set of arranged coordinates satisfy the non-interference condition with the second updated coordinate.

10. The method according to claim 1, characterized in that, Before performing a pre-arrangement operation on the largest device in the target coordinate system and determining the center ray of each arrangement region, the method further includes: The target coordinate system is established with the center point of the central device as the origin, wherein the first coordinate axis of the target coordinate system is determined by the horizontal rightward direction of the central device, and the second coordinate axis of the target coordinate system is determined by the vertical upward direction of the central device; The no-discharge zone is determined based on the length and width offset values ​​of the central device; The arrangement area is determined based on the prohibited discharge area, wherein the prohibited discharge area is adjacent to the arrangement area and the central device.

11. A device for determining the position of a device, characterized in that, include: A pre-arrangement module is used to perform a pre-arrangement operation on the largest device in a target coordinate system, and to determine the center ray of each arrangement area. The largest device is the device with the largest size among the devices to be arranged around the already arranged center device. The origin of the target coordinate system is determined by the center point of the center device, and the coordinate axes of the target coordinate system are determined by the edges of the center device. The center device is connected to the devices to be arranged through various device pins. The starting point of the center ray is determined by the center point of the largest device, and the ray direction of the center ray is the same as the positive or negative direction of the coordinate axis of the target coordinate system. An execution module is used to determine the target pin of the central device based on the target device in the devices to be arranged, and to determine the target coordinates according to the coordinates of the intersection of the target connecting line and the target central ray where the target pin is located. The target connecting line is perpendicular to the target central ray, and the target central ray is the central ray with the shortest perpendicular distance to the target pin among all the central rays. The central device is connected to the target device through the target pin. The determination module is used to determine the arrangement position of the target device based on the target coordinates.

12. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored computer program, wherein the computer program can be executed by an electronic device to perform the method described in any one of claims 1 to 10.

13. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program performs the steps of the method described in any one of claims 1 to 10.

14. An electronic device comprising a memory and a processor, characterized in that, The memory stores a computer program, and the processor is configured to execute the method described in any one of claims 1 to 10 through the computer program.