Method, system, terminal and storage medium for assisting hardware assembly positioning
By setting a standard image on the server motherboard and using image recognition technology and neural network models to generate a hardware position adjustment plan, the problem of inaccurate placement of the CPU and south bridge PCH platform control chipset is solved, and assembly efficiency and accuracy are improved.
Patent Information
- Application Number
- CN202310798273.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-30
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2043-06-30
AI Technical Summary
In the prior art, the placement of the CPU processor and the south bridge PCH platform control chipset on a server motherboard relies on manual experience, resulting in uneven positioning, affecting the routing of high-speed and low-speed signals, requiring frequent adjustments, reducing assembly efficiency and increasing workload.
By pre-setting the standard image of the server motherboard, collecting the image of the motherboard to be assembled and pre-processing it, using image recognition technology and neural network models to perform angle correction and feature point annotation on the motherboard image, a hardware position adjustment plan is generated to guide the accurate placement of the hardware.
It achieves precise placement of hardware positions, reduces the need for later adjustments, improves assembly efficiency, reduces workload, and improves assembly accuracy and consistency.
Smart Images

Figure CN116843751B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of servers, and in particular relates to a method, system, terminal and storage medium for assisting hardware assembly and positioning. Background Art
[0002] Currently, the placement of the CPU processor and the Southbridge PCH platform control chipset on the motherboard of existing server motherboards is heavily dependent on the design requirements of the input and output interfaces by hardware and routing engineers. It is not easy to consider all the high-speed and low-speed routing in the layout, and the placement can only be approximate.
[0003] Due to differences in experience, placement of the hardware varies, resulting in high-speed signals and many low-speed signals being restricted during routing. Therefore, constant communication and coordination with hardware engineers is required to move the hardware position. Summary of the Invention
[0004] In view of the problem in the prior art that the hardware on the motherboard cannot be accurately placed, resulting in low assembly efficiency and large workload, the present invention provides a method, system, terminal and storage medium for assisting hardware assembly positioning to solve the above technical problems.
[0005] In a first aspect, the present invention provides a method for assisting hardware assembly and positioning, comprising:
[0006] Pre-setting standard images of motherboards for various server models, and dividing the motherboard standard images into multiple standard areas according to hardware locations, wherein the standard areas are images containing hardware;
[0007] Collecting an image of the motherboard to be assembled and preprocessing the image to obtain a sample image;
[0008] Divide the sample image into multiple sample areas according to preset segmentation rules;
[0009] extracting a standard hardware position from a standard area corresponding to the sample area in the corresponding standard image;
[0010] A current hardware position is extracted from the sample area, and an adjustment plan for changing the current hardware position to the standard hardware position is generated.
[0011] In an optional embodiment, standard motherboard images for various server models are pre-set, and the motherboard standard images are divided into multiple standard areas according to hardware locations. The standard areas are images containing hardware, including:
[0012] Scale standard images to standard sizes;
[0013] Create a coordinate system for the standard image and obtain the outline coordinates of each hardware in the standard image;
[0014] A standard area including the hardware image is segmented from the standard image based on the outline coordinates of each hardware, and the coordinate range of the standard area is recorded.
[0015] In an optional embodiment, collecting an image of the motherboard to be assembled and preprocessing the image to obtain a sample image includes:
[0016] converting the image into a grayscale image;
[0017] Binarizing the grayscale image and enhancing the image by median filtering to obtain an intermediate image;
[0018] Angle correction is performed on the intermediate image, and the corrected intermediate image is scaled to a preset standard size.
[0019] In an optional embodiment, performing angle correction on the intermediate image and scaling the corrected intermediate image to a preset standard size includes:
[0020] The edge detection algorithm is used to enhance the horizontal edge contour line of the mainboard in the intermediate image;
[0021] The enhanced intermediate image is input into a pre-trained image correction model to obtain a regular image;
[0022] The training method of the image correction model includes:
[0023] A data set is constructed in advance, wherein the data set stores motherboard images at various angles, and the deformed positions and standard positions of the feature points are annotated on the motherboard images based on pre-set feature points, and a mapping relationship between the deformed positions and the standard positions of the feature points is established;
[0024] The pre-built neural network model is trained using the data set to obtain an image correction model.
[0025] In an optional embodiment, marking the deformed position and the standard position of the feature points on the mainboard image based on the pre-set feature points includes:
[0026] The intersection points of all contour lines in the image are set as feature points, and the feature points are assigned numbers, marking the hardware corresponding to each feature point;
[0027] Mark the coordinates of each feature point of the standard image and record them as the standard position of the feature point;
[0028] Scaling the size of the motherboard image to the same size as the standard image, and performing edge detection on the motherboard image to obtain contour lines and sample feature points;
[0029] Use the object detection algorithm to identify hardware from the motherboard image and mark the hardware area;
[0030] Establish a corresponding relationship between the sample feature points in the hardware area and the hardware;
[0031] Save the sample feature points and feature points corresponding to the same hardware as an associated point set;
[0032] Calculating the distance between the sample feature point and multiple feature points in the associated point set, and setting the feature point closest to the sample feature point as the mapping feature point of the sample feature point;
[0033] The coordinates of the sample feature points are marked as the deformed positions in the mainboard image, and the coordinates of the mapped feature points are marked as the standard positions.
[0034] In an optional embodiment, extracting the standard hardware position from a standard area corresponding to the sample area in the corresponding standard image includes:
[0035] Select two feature points from the hardware outline as standard positioning points;
[0036] The distances between the two standard positioning points and each edge of the standard area are calculated respectively, and the distances between the standard positioning points and the edges of the standard area are saved as the standard position data of the standard positioning points.
[0037] In an optional embodiment, the current hardware position is extracted from the sample area, and an adjustment plan for changing the current hardware position to the standard hardware position is generated.
[0038] Selecting sample positioning points corresponding to the standard positioning points from the hardware outline of the sample area;
[0039] Calculate the distance from the sample positioning point to each edge of the sample area to obtain the position information of the sample positioning point;
[0040] The difference between the position information of the standard positioning point and the position information of the sample positioning point is calculated, and an adjustment solution is generated based on the difference.
[0041] In a second aspect, the present invention provides a system for assisting hardware assembly and positioning, comprising:
[0042] A standard setting module is used to pre-set standard images of motherboards for various server models and divide the motherboard standard images into multiple standard areas according to hardware locations, wherein the standard areas are images containing hardware;
[0043] An image acquisition module is used to acquire an image of the motherboard to be assembled and pre-process the image to obtain a sample image;
[0044] An image segmentation module, used to divide the sample image into multiple sample areas according to a preset segmentation rule;
[0045] A standard extraction module, configured to extract a standard hardware position from a standard area corresponding to the sample area in the corresponding standard image;
[0046] The solution generating module is used to extract the current hardware position from the sample area and generate an adjustment solution for changing the current hardware position to the standard hardware position.
[0047] In an optional embodiment, the standard setting module includes:
[0048] A resizing unit for scaling a standard image to a standard size;
[0049] A coordinate acquisition unit, used to create a coordinate system for the standard image and obtain the outline coordinates of each hardware in the standard image;
[0050] The area division unit is used to divide the standard area containing the hardware image from the standard image based on the outline coordinates of each hardware, and record the coordinate range of the standard area.
[0051] In an optional embodiment, the image acquisition module includes:
[0052] a first processing unit, configured to convert the image into a grayscale image;
[0053] A second processing unit is used to perform binarization processing on the grayscale image and enhance the image by median filtering to obtain an intermediate image;
[0054] The third processing unit is configured to perform angle correction on the intermediate image and scale the corrected intermediate image to a preset standard size.
[0055] In an optional embodiment, the second processing unit includes:
[0056] A contour processing subunit, configured to enhance the horizontal edge contour of the mainboard of the intermediate image using an edge detection algorithm;
[0057] An angle correction subunit, used to input the enhanced intermediate image into a pre-trained image correction model to obtain a regular image;
[0058] The training method of the image correction model includes:
[0059] A data set is constructed in advance, wherein the data set stores motherboard images at various angles, and the deformed positions and standard positions of the feature points are annotated on the motherboard images based on pre-set feature points, and a mapping relationship between the deformed positions and the standard positions of the feature points is established;
[0060] The pre-built neural network model is trained using the data set to obtain an image correction model.
[0061] In an optional embodiment, marking the deformed position and the standard position of the feature points on the mainboard image based on the pre-set feature points includes:
[0062] The intersection points of all contour lines in the image are set as feature points, and the feature points are assigned numbers, marking the hardware corresponding to each feature point;
[0063] Mark the coordinates of each feature point of the standard image and record them as the standard position of the feature point;
[0064] Scaling the size of the motherboard image to the same size as the standard image, and performing edge detection on the motherboard image to obtain contour lines and sample feature points;
[0065] Use the object detection algorithm to identify hardware from the motherboard image and mark the hardware area;
[0066] Establish a corresponding relationship between the sample feature points in the hardware area and the hardware;
[0067] Save the sample feature points and feature points corresponding to the same hardware as an associated point set;
[0068] Calculating the distance between the sample feature point and multiple feature points in the associated point set, and setting the feature point closest to the sample feature point as the mapping feature point of the sample feature point;
[0069] The coordinates of the sample feature points are marked as the deformed positions in the mainboard image, and the coordinates of the mapped feature points are marked as the standard positions.
[0070] In an optional embodiment, the standard extraction module includes:
[0071] Standard positioning unit, used to select two feature points from the hardware outline as standard positioning points;
[0072] The standard storage unit is used to calculate the distances between the two standard positioning points and each edge of the standard area, and save the distances between the standard positioning points and the edges of the standard area as standard position data of the standard positioning points.
[0073] In an optional embodiment, the solution generation module includes:
[0074] A positioning selection unit, used to select a sample positioning point corresponding to a standard positioning point from the hardware contour of the sample area;
[0075] A position acquisition unit is used to calculate the distance from the sample positioning point to each edge of the sample area to obtain the position information of the sample positioning point;
[0076] The difference calculation unit is used to calculate the difference between the position information of the standard positioning point and the position information of the sample positioning point, and generate an adjustment solution based on the difference.
[0077] According to a third aspect, a terminal is provided, including:
[0078] processor, memory, wherein
[0079] The memory is used to store computer programs,
[0080] The processor is used to call and run the computer program from the memory, so that the terminal executes the above-mentioned terminal method.
[0081] In a fourth aspect, a computer storage medium is provided, wherein the computer-readable storage medium stores instructions, which, when executed on a computer, enable the computer to execute the methods described in the above aspects.
[0082] The beneficial effects of the present invention lie in the fact that the method, system, terminal, and storage medium provided herein for assisting hardware assembly positioning utilize image recognition technology to identify motherboard images, target important hardware, and pre-store standard images. By identifying the hardware positions and comparing them with the hardware positions in the standard images, a hardware position adjustment plan is generated, thereby providing guidance for assemblers to place the hardware. This system can guide manual hardware placement accurately without the need for subsequent evaluation and adjustment, reducing workload and improving work efficiency.
[0083] Since the motherboard image is tilted, it is necessary to perform angle correction on the motherboard image. By setting feature points and then using the trained neural network model to perform angle correction on the motherboard image, the accuracy of subsequent hardware position comparison and adjustment solutions can be improved, avoiding errors caused by image tilt.
[0084] When training the neural network model, it is necessary to mark the deformed positions and standard positions corresponding to the feature points of the sample image. When performing the corresponding marking, the correspondence between the feature points in the standard image and the feature points in the sample image is obtained through two factors: hardware and distance, thereby realizing automatic labeling of the sample image.
[0085] In addition, the present invention has a reliable design principle, a simple structure and a very broad application prospect. BRIEF DESCRIPTION OF THE DRAWINGS
[0086] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0087] Figure 1 is a schematic flow chart of a method according to an embodiment of the present invention.
[0088] Figure 2 is another schematic flow chart of a method according to an embodiment of the present invention.
[0089] Figure 3 FIG. 4 is a schematic block diagram of a system according to an embodiment of the present invention.
[0090] Figure 4 A schematic diagram of the structure of a terminal provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0091] In order to enable those skilled in the art to better understand the technical solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.
[0092] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art of the present invention. The terms used in this specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention.
[0093] The key terms appearing in the present invention are explained below.
[0094] YOLO (You Only Look Once, YOLO) is currently the most commonly used target detection algorithm.
[0095] Image edge detection is a fundamental step in image processing and a fundamental research area within the field. Its key principle is to identify pixels in a digital image that exhibit significant color or brightness changes. Significant changes in these pixels often indicate significant changes in the image's attributes, including discontinuities in depth, direction, and brightness. Currently, many edge detection models are commonly used: first-order operators include the Roberts operator, Prewitt operator, Sobel operator, and Canny operator; and second-order operators include the Laplacian operator. Image edge detection is based on the image's gradient, which is obtained by performing convolution operations on the image using various operators. Therefore, the core of image edge detection algorithms lies in the operators.
[0096] The method for assisting hardware assembly and positioning provided by the embodiment of the present invention is executed by a computer device. Accordingly, the system for assisting hardware assembly and positioning runs in the computer device.
[0097] Figure 1 is a schematic flow chart of a method according to an embodiment of the present invention. Figure 1 The execution subject may be a system for assisting hardware assembly and positioning. According to different requirements, the order of the steps in the flow chart may be changed, and some steps may be omitted.
[0098] like Figure 1 As shown, the method includes:
[0099] Step 110, presetting standard images of motherboards of various server models, and dividing the motherboard standard images into a plurality of standard areas according to hardware locations, wherein the standard areas are images containing hardware;
[0100] Step 120: collecting an image of the motherboard to be assembled and preprocessing the image to obtain a sample image;
[0101] Step 130, dividing the sample image into a plurality of sample areas according to a preset segmentation rule;
[0102] Step 140 , extracting a standard hardware position from a standard area corresponding to the sample area in the corresponding standard image;
[0103] Step 150: extract the current hardware position from the sample area, and generate an adjustment plan for changing the current hardware position to the standard hardware position.
[0104] To facilitate understanding of the present invention, the following further describes the method for assisting hardware assembly and positioning provided by the present invention based on the principle of the method for assisting hardware assembly and positioning and the process of assisting hardware assembly and positioning in the embodiment.
[0105] For details, please refer to Figure 2 , the method for assisting hardware assembly and positioning includes:
[0106] S1. Pre-set standard images of motherboards of various server models, and divide the motherboard standard images into multiple standard areas according to hardware locations, wherein the standard areas are images containing hardware.
[0107] The standard image is scaled to a standard size; a coordinate system is created for the standard image, and the outline coordinates of each hardware in the standard image are obtained; a standard area containing the hardware image is segmented from the standard image based on the outline coordinates of each hardware, and the coordinate range of the standard area is recorded.
[0108] The standard size is set in advance, and all subsequent standard images and captured motherboard images are scaled to this standard size.
[0109] When obtaining the contour coordinates of the hardware, the YOLO3 algorithm can be used to identify the target hardware. At this time, the YOLO3 algorithm will automatically generate a rectangular contour box for the identified target hardware, and the four vertices of the rectangular contour box are used as the contour coordinates of the hardware. The contour coordinates can be used as the coordinate range of the standard area, or an area slightly larger than the contour coordinate indication range can be set as the standard area.
[0110] In other embodiments, when obtaining the hardware outline coordinates, the hardware outline can be obtained by grayscale processing, binarization, median filtering, etc. on the image, and the coordinates of the protruding points in the outline are set as the hardware outline coordinates. Then, a rectangular standard area is set that contains all the hardware outline coordinates.
[0111] S2. Collect an image of the motherboard to be assembled, and pre-process the image to obtain a sample image.
[0112] The image is converted into a grayscale image; the grayscale image is binarized and the image is enhanced by median filtering to obtain an intermediate image; the intermediate image is angle-corrected and the corrected intermediate image is scaled to a preset standard size.
[0113] Specifically, the image is grayscaled, binarized, and subjected to median filtering for noise reduction in sequence. Finally, the image is segmented according to the segmentation score and named and output separately. The output image is a binary image.
[0114] Among them, the binarization method is different from the general one. It uses the median as its threshold. The method is to count the total number of grayscale graphics points, create an array with 256 positions, and name each position with a code from 0 to 255. The number of 0 to 255 is accumulated, and then the cumulative number of 1 / 2 of the total number of graphics points is found. The array space code where the cumulative number of 1 / 2 of the total points is located is set as the threshold of this binarization.
[0115] Perform angle correction on the pre-processed image:
[0116] The edge detection algorithm is used to enhance the horizontal edge contour line of the mainboard in the intermediate image; the enhanced intermediate image is input into a pre-trained image correction model to obtain a regular image.
[0117] Among them, the training method of the image correction model includes: constructing a data set in advance, in which the motherboard images at various angles are stored, marking the deformed positions and standard positions of the feature points in the motherboard image based on pre-set feature points, and establishing a mapping relationship between the deformed positions and the standard positions of the feature points; using the data set to train the pre-constructed neural network model to obtain the image correction model.
[0118] When annotating sample images, the following method is used:
[0119] The intersection points of all contour lines in the image are set as feature points, and the feature points are assigned numbers, and the hardware corresponding to each feature point is marked; the coordinates of each feature point of the standard image are marked and recorded as the standard position of the feature point; the size of the motherboard image is scaled to the same size as the standard image, and the edge detection of the motherboard image is performed to obtain contour lines and sample feature points; the target detection algorithm is used to identify the hardware from the motherboard image and mark the hardware area; a correspondence is established between the sample feature points and the hardware within the hardware area; the sample feature points and feature points corresponding to the same hardware are saved as an associated point set; the distance between the sample feature point and multiple feature points in the associated point set is calculated, and the feature point closest to the sample feature point is set as the mapping feature point of the sample feature point; the coordinates of the sample feature point in the motherboard image are marked as the deformed position, and the coordinates of the mapping feature point are marked as the standard position.
[0120] For example, the CPU in the standard image has two feature points, namely the two vertices A0 and B0 on the left. The two vertices on the left of the CPU in the sample image are A1 and B1. Since the general position of the hardware is correct during assembly, and only fine-tuning is made to the position where the worker places it, the distance between A0 and A1 is smaller than the distance between A0 and B1. Correspondingly, the distance between B0 and B1 is smaller than the distance between B0 and A1. Therefore, after confirming that A0, B0 and A1, B1 all belong to the CPU, the correspondence between A0 and A1, and B0 and B1 can be located through distance comparison. After determining the positioning relationship, the deformed position and the standard position can be calibrated in the sample image. This method can realize automatic image annotation without manual annotation, greatly reducing the workload.
[0121] S3. Divide the sample image into multiple sample areas according to a preset segmentation rule.
[0122] According to the standard region coordinate range of each hardware in S1, the corresponding sample region is divided from the corresponding position in the sample image.
[0123] S4. Extracting a standard hardware position from a standard area corresponding to the sample area in the corresponding standard image.
[0124] Two feature points are selected from the hardware outline as standard positioning points; the distances from the two standard positioning points to the edges of the standard area are calculated respectively, and the distances between the standard positioning points and the edges of the standard area are saved as standard position data of the standard positioning points.
[0125] S5. Extract the current hardware position from the sample area, and generate an adjustment plan for changing the current hardware position to the standard hardware position.
[0126] Select sample positioning points corresponding to standard positioning points from the hardware outline of the sample area; calculate the distance from the sample positioning points to each edge of the sample area to obtain the position information of the sample positioning points; calculate the difference between the position information of the standard positioning points and the position information of the sample positioning points, and generate an adjustment plan based on the difference.
[0127] The motion vector is obtained by subtracting the position data of the standard positioning points from the positions of the corresponding sample positioning points. When there are multiple sets of standard positioning points and sample positioning points, multiple motion vectors will be obtained. Based on the distance between the sample positioning points and their respective motion vectors, the hardware motion vector and rotation angle are generated.
[0128] In some embodiments, the system 300 for assisting hardware assembly and positioning may include multiple functional modules composed of computer program segments. The computer program of each program segment in the system 300 for assisting hardware assembly and positioning may be stored in a memory of a computer device and executed by at least one processor to perform (see Figure 1 Description) Function to assist hardware assembly and positioning.
[0129] In this embodiment, the system 300 for assisting hardware assembly and positioning can be divided into multiple functional modules according to the functions it performs, such as Figure 3 As shown. The functional modules may include: a standard setting module 310, an image acquisition module 320, an image segmentation module 330, a standard extraction module 340, and a solution generation module 350. A module as referred to in the present invention refers to a series of computer program segments that can be executed by at least one processor and can perform fixed functions, and is stored in a memory. In this embodiment, the functions of each module will be described in detail in subsequent embodiments.
[0130] A standard setting module 310 is used to pre-set standard images of motherboards for various server models and divide the motherboard standard images into a plurality of standard areas according to hardware locations, wherein the standard areas are images containing hardware;
[0131] An image acquisition module 320 is used to acquire an image of the motherboard to be assembled and pre-process the image to obtain a sample image;
[0132] An image segmentation module 330 is configured to divide a sample image into a plurality of sample regions according to a preset segmentation rule;
[0133] A standard extraction module 340 is configured to extract a standard hardware position from a standard area corresponding to the sample area in the corresponding standard image;
[0134] The solution generating module 350 is configured to extract the current hardware position from the sample area and generate an adjustment solution for changing the current hardware position to the standard hardware position.
[0135] Optionally, as an embodiment of the present invention, the standard setting module includes:
[0136] A resizing unit for scaling a standard image to a standard size;
[0137] A coordinate acquisition unit, used to create a coordinate system for the standard image and obtain the outline coordinates of each hardware in the standard image;
[0138] The area division unit is used to divide the standard area containing the hardware image from the standard image based on the outline coordinates of each hardware, and record the coordinate range of the standard area.
[0139] Optionally, as an embodiment of the present invention, the image acquisition module includes:
[0140] a first processing unit, configured to convert the image into a grayscale image;
[0141] A second processing unit is used to perform binarization processing on the grayscale image and enhance the image by median filtering to obtain an intermediate image;
[0142] The third processing unit is configured to perform angle correction on the intermediate image and scale the corrected intermediate image to a preset standard size.
[0143] Optionally, as an embodiment of the present invention, the second processing unit includes:
[0144] A contour processing subunit, configured to enhance the horizontal edge contour of the mainboard of the intermediate image using an edge detection algorithm;
[0145] An angle correction subunit, used to input the enhanced intermediate image into a pre-trained image correction model to obtain a regular image;
[0146] The training method of the image correction model includes:
[0147] A data set is constructed in advance, wherein the data set stores motherboard images at various angles, and the deformed positions and standard positions of the feature points are annotated on the motherboard images based on pre-set feature points, and a mapping relationship between the deformed positions and the standard positions of the feature points is established;
[0148] The pre-built neural network model is trained using the data set to obtain an image correction model.
[0149] Optionally, as an embodiment of the present invention, marking the deformed position of the feature point and the standard position of the feature point on the mainboard image based on the pre-set feature point includes:
[0150] The intersection points of all contour lines in the image are set as feature points, and the feature points are assigned numbers, marking the hardware corresponding to each feature point;
[0151] Mark the coordinates of each feature point of the standard image and record them as the standard position of the feature point;
[0152] Scaling the size of the motherboard image to the same size as the standard image, and performing edge detection on the motherboard image to obtain contour lines and sample feature points;
[0153] Use the object detection algorithm to identify hardware from the motherboard image and mark the hardware area;
[0154] Establish a corresponding relationship between the sample feature points in the hardware area and the hardware;
[0155] Save the sample feature points and feature points corresponding to the same hardware as an associated point set;
[0156] Calculating the distance between the sample feature point and multiple feature points in the associated point set, and setting the feature point closest to the sample feature point as the mapping feature point of the sample feature point;
[0157] The coordinates of the sample feature points are marked as the deformed positions in the mainboard image, and the coordinates of the mapped feature points are marked as the standard positions.
[0158] Optionally, as an embodiment of the present invention, the standard extraction module includes:
[0159] Standard positioning unit, used to select two feature points from the hardware outline as standard positioning points;
[0160] The standard storage unit is used to calculate the distances between the two standard positioning points and each edge of the standard area, and save the distances between the standard positioning points and the edges of the standard area as standard position data of the standard positioning points.
[0161] Optionally, as an embodiment of the present invention, the solution generation module includes:
[0162] A positioning selection unit, used to select a sample positioning point corresponding to a standard positioning point from the hardware contour of the sample area;
[0163] A position acquisition unit is used to calculate the distance from the sample positioning point to each edge of the sample area to obtain the position information of the sample positioning point;
[0164] The difference calculation unit is used to calculate the difference between the position information of the standard positioning point and the position information of the sample positioning point, and generate an adjustment solution based on the difference.
[0165] Figure 4 This is a structural diagram of a terminal 400 provided in an embodiment of the present invention. The terminal 400 can be used to execute the method for assisting hardware assembly positioning provided in an embodiment of the present invention.
[0166] The terminal 400 may include a processor 410, a memory 420, and a communication module 430. These components communicate via one or more buses. Those skilled in the art will appreciate that the server structure shown in the figure does not limit the present invention. The server structure may be a bus structure or a star structure, and may include more or fewer components than shown, or combine certain components, or arrange the components differently.
[0167] The memory 420 can be used to store execution instructions of the processor 410. The memory 420 can be implemented by any type of volatile or non-volatile storage terminal or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk, or optical disk. When the execution instructions in the memory 420 are executed by the processor 410, the terminal 400 can perform some or all of the steps in the following method embodiments.
[0168] The processor 410 is the control center of the storage terminal. It uses various interfaces and lines to connect various parts of the entire electronic terminal. It runs or executes software programs and / or modules stored in the memory 420, and calls data stored in the memory to perform various functions of the electronic terminal and / or process data. The processor can be composed of an integrated circuit (IC), for example, it can be composed of a single packaged IC, or it can be composed of multiple packaged ICs with the same or different functions. For example, the processor 410 can only include a central processing unit (CPU). In an embodiment of the present invention, the CPU can be a single computing core or multiple computing cores.
[0169] The communication module 430 is configured to establish a communication channel so that the storage terminal can communicate with other terminals, receive user data sent by other terminals, or send user data to other terminals.
[0170] The present invention also provides a computer storage medium, wherein the computer storage medium may store a program that, when executed, may include some or all of the steps of each embodiment provided by the present invention. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).
[0171] Therefore, the present invention utilizes image recognition technology to identify the motherboard image, targets important hardware, and pre-stores a standard image. By identifying the hardware position and comparing it with the hardware position in the standard image, a hardware position adjustment plan is generated, thereby providing guidance for the assembler to place the hardware. The present invention can guide manual hardware placement accurately without the need for subsequent evaluation and adjustment, reducing workload and improving work efficiency. The technical effects achieved by this embodiment can be found in the description above and will not be repeated here.
[0172] Those skilled in the art will clearly understand that the technology in the embodiments of the present invention can be implemented by means of software plus a necessary general-purpose hardware platform. Based on this understanding, the technical solutions in the embodiments of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product is stored in a storage medium such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, or other medium that can store program code, and includes a number of instructions for enabling a computer terminal (which can be a personal computer, a server, or a second terminal, a network terminal, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention.
[0173] In this specification, the same or similar parts between the various embodiments can be referred to each other. In particular, for the terminal embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description in the method embodiment.
[0174] In the several embodiments provided by the present invention, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are merely illustrative. For example, the division of the modules is merely a logical function division. In actual implementation, there may be other division methods, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of systems or modules, and can be electrical, mechanical or other forms.
[0175] The modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules may be selected to achieve the purpose of the present embodiment according to actual needs.
[0176] In addition, each functional module in each embodiment of the present invention may be integrated into one processing module, or each module may exist physically separately, or two or more modules may be integrated into one module.
[0177] Although the present invention has been described in detail with reference to the accompanying drawings and in combination with preferred embodiments, the present invention is not limited thereto. Without departing from the spirit and essence of the present invention, a person of ordinary skill in the art may make various equivalent modifications or substitutions to the embodiments of the present invention, and such modifications or substitutions shall be within the scope of the present invention. Any person skilled in the art who is familiar with the present invention may easily conceive of changes or substitutions within the technical scope disclosed in the present invention, and such changes or substitutions shall be within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be subject to the scope of protection of the claims.
Claims
1. A method for assisting hardware assembly positioning, characterized in that: include: Pre-setting standard images of motherboards for various server models, and dividing the motherboard standard images into multiple standard areas according to hardware locations, wherein the standard areas are images containing hardware; Collecting an image of the motherboard to be assembled and preprocessing the image to obtain a sample image; Divide the sample image into multiple sample areas according to preset segmentation rules; extracting a standard hardware position from a standard area corresponding to the sample area in the corresponding standard image; Extracting a current hardware position from the sample area and generating an adjustment plan for changing the current hardware position to the standard hardware position; Collecting an image of the motherboard to be assembled and preprocessing the image to obtain a sample image includes: converting the image into a grayscale image; Binarizing the grayscale image and enhancing the image by median filtering to obtain an intermediate image; Performing angle correction on the intermediate image, and scaling the corrected intermediate image to a preset standard size; Performing angle correction on the intermediate image and scaling the corrected intermediate image to a preset standard size includes: The edge detection algorithm is used to enhance the horizontal edge contour line of the mainboard in the intermediate image; The enhanced intermediate image is input into a pre-trained image correction model to obtain a regular image; The training method of the image correction model includes: A data set is constructed in advance, wherein the data set stores motherboard images at various angles, and the deformed positions and standard positions of the feature points are annotated on the motherboard images based on pre-set feature points, and a mapping relationship between the deformed positions and the standard positions of the feature points is established; Using the data set to train a pre-built neural network model to obtain an image correction model; Extracting a standard hardware position from a standard region corresponding to the sample region in the corresponding standard image includes: Select two feature points from the hardware outline as standard positioning points; Calculate the distances between the two standard positioning points and the edges of the standard area respectively, and save the distances between the standard positioning points and the edges of the standard area as the standard position data of the standard positioning points; Extracting the current hardware position from the sample area and generating an adjustment plan for changing the current hardware position to the standard hardware position, including: Selecting sample positioning points corresponding to the standard positioning points from the hardware outline of the sample area; Calculate the distance from the sample positioning point to each edge of the sample area to obtain the position information of the sample positioning point; The difference between the position information of the standard positioning point and the position information of the sample positioning point is calculated, and an adjustment solution is generated based on the difference.
2. The method according to claim 1, characterized in that Standard motherboard images for various server models are pre-set and divided into multiple standard areas according to hardware locations. The standard areas are images containing hardware, including: Scale standard images to standard sizes; Create a coordinate system for the standard image and obtain the outline coordinates of each hardware in the standard image; A standard area including the hardware image is segmented from the standard image based on the outline coordinates of each hardware, and the coordinate range of the standard area is recorded.
3. The method according to claim 1, characterized in that Based on the pre-set feature points, the deformed position and standard position of the feature points are marked on the motherboard image, including: The intersection points of all contour lines in the image are set as feature points, and the feature points are assigned numbers, marking the hardware corresponding to each feature point; Mark the coordinates of each feature point of the standard image and record them as the standard position of the feature point; Scaling the size of the motherboard image to the same size as the standard image, and performing edge detection on the motherboard image to obtain contour lines and sample feature points; Use the object detection algorithm to identify hardware from the motherboard image and mark the hardware area; Establish a corresponding relationship between the sample feature points in the hardware area and the hardware; Save the sample feature points and feature points corresponding to the same hardware as an associated point set; Calculating the distance between the sample feature point and multiple feature points in the associated point set, and setting the feature point closest to the sample feature point as the mapping feature point of the sample feature point; The coordinates of the sample feature points are marked as the deformed positions in the mainboard image, and the coordinates of the mapped feature points are marked as the standard positions.
4. A system for assisting hardware assembly and positioning, characterized in that: include: A standard setting module is used to pre-set standard images of motherboards for various server models and divide the motherboard standard images into multiple standard areas according to hardware locations, wherein the standard areas are images containing hardware; An image acquisition module is used to acquire an image of the motherboard to be assembled and pre-process the image to obtain a sample image; An image segmentation module, used to divide the sample image into multiple sample areas according to a preset segmentation rule; A standard extraction module, configured to extract a standard hardware position from a standard area corresponding to the sample area in the corresponding standard image; a solution generating module, configured to extract the current hardware position from the sample area and generate an adjustment solution for changing the current hardware position to the standard hardware position; Collecting an image of the motherboard to be assembled and preprocessing the image to obtain a sample image includes: converting the image into a grayscale image; Binarizing the grayscale image and enhancing the image by median filtering to obtain an intermediate image; Performing angle correction on the intermediate image, and scaling the corrected intermediate image to a preset standard size; Performing angle correction on the intermediate image and scaling the corrected intermediate image to a preset standard size includes: The edge detection algorithm is used to enhance the horizontal edge contour line of the mainboard in the intermediate image; The enhanced intermediate image is input into a pre-trained image correction model to obtain a regular image; The training method of the image correction model includes: A data set is constructed in advance, wherein the data set stores motherboard images at various angles, and the deformed positions and standard positions of the feature points are annotated on the motherboard images based on pre-set feature points, and a mapping relationship between the deformed positions and the standard positions of the feature points is established; Using the data set to train a pre-built neural network model to obtain an image correction model; Extracting a standard hardware position from a standard region corresponding to the sample region in the corresponding standard image includes: Select two feature points from the hardware outline as standard positioning points; Calculate the distances between the two standard positioning points and the edges of the standard area respectively, and save the distances between the standard positioning points and the edges of the standard area as the standard position data of the standard positioning points; Extracting the current hardware position from the sample area and generating an adjustment plan for changing the current hardware position to the standard hardware position, including: Selecting sample positioning points corresponding to the standard positioning points from the hardware outline of the sample area; Calculate the distance from the sample positioning point to each edge of the sample area to obtain the position information of the sample positioning point; The difference between the position information of the standard positioning point and the position information of the sample positioning point is calculated, and an adjustment solution is generated based on the difference.
5. A terminal, characterized in that: include: A memory for storing a program for assisting hardware assembly and positioning; A processor is configured to implement the steps of the method for assisting hardware assembly and positioning as described in any one of claims 1 to 3 when executing the program for assisting hardware assembly and positioning.
6. A computer-readable storage medium storing a computer program, characterized in that: The readable storage medium stores a program for assisting hardware assembly and positioning. When the program for assisting hardware assembly and positioning is executed by a processor, the steps of the method for assisting hardware assembly and positioning as claimed in any one of claims 1 to 3 are implemented.
Citation Information
Patent Citations
System, method and device for adjusting position of patch component
CN113692215A