Test method and device of wiring software, electronic equipment and storage medium

By using image processing technology in cabling software to identify and classify areas of difference, the problem of high testing costs in cabling software is solved, automated testing is achieved, and testing efficiency is improved.

CN115374517BActive Publication Date: 2025-11-25BEIKE TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211015205.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-23
Publication Date
2025-11-25
Estimated Expiration
2042-08-23

AI Technical Summary

Technical Problem

Existing cabling software has high testing costs and long testing times, mainly because each cabling rule needs to be manually tested and verified.

Method used

By inputting test cases and image capture perspectives in the baseline and test environments respectively, baseline and test images are obtained. Image processing technology is used to identify difference pixels, and the nearest neighbor algorithm is used to classify difference regions for visualization, thereby realizing automated testing of cabling software.

Benefits of technology

It enables automated testing of cabling software, reducing testing costs and time, and improving testing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115374517B_ABST
    Figure CN115374517B_ABST
Patent Text Reader

Abstract

The embodiment of the present disclosure discloses a wiring software test method and device, electronic equipment and storage medium, wherein the method comprises: inputting test cases and at least one image taking angle in the reference environment and the test environment respectively, obtaining at least one set of reference images and test images, wherein a set of reference images and test images correspond to one wiring rule; in response to the existence of differences in the at least one set of reference images and test images, determining the difference pixel points of the at least one set of reference images and test images; classifying the difference pixel points according to the nearest neighbor algorithm to obtain at least one difference area; and visually displaying the at least one difference area. The embodiment of the present disclosure can realize the automation of wiring software testing based on image processing technology, and solve the problem of extremely high test cost caused by manual testing and verification of each wiring rule.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the technical field of intelligent decoration, and particularly relates to a wiring software testing method and device, electronic equipment and storage medium. BACKGROUND

[0002] In the existing field of indoor decoration, the wiring layout of water and electricity is mainly executed by construction personnel according to experience, and thus the advantages and disadvantages of water and electricity wiring are seriously dependent on the construction personnel, and problems such as unreasonable wiring layout and low wiring layout efficiency may occur.

[0003] In order to solve the problems existing in the prior art, a wiring application program emerges as the times require. The wiring application program can automatically generate the wiring layout of water and electricity through built-in wiring rules. Since there are dozens of wiring rules, in the scene of function iteration of the wiring application program and the like which needs to be regression tested, each rule needs to be manually tested and verified by human, and thus the testing cost is extremely high, the testing time is extremely long, and the project release time may be delayed. SUMMARY

[0004] One of the technical problems to be solved by the embodiments of the present disclosure is to provide a wiring software testing method, device, electronic equipment and storage medium, and to realize automatic testing of the wiring software.

[0005] According to an aspect of an embodiment of the present disclosure, a wiring software testing method is provided, and the method comprises:

[0006] inputting a test case and at least one view angle of taking pictures in a reference environment and a test environment respectively to obtain at least one set of reference images and test images, wherein one set of reference images and test images corresponds to one wiring rule;

[0007] in response to the existence of differences in the at least one set of reference images and test images, determining difference pixel points of the at least one set of reference images and test images;

[0008] classifying the difference pixel points according to a nearest neighbor algorithm to obtain at least one difference region;

[0009] visually displaying the at least one difference region.

[0010] In one embodiment of the present disclosure, the visually displaying the at least one difference region comprises:

[0011] determining a wiring rule to be corrected corresponding to the at least one set of reference images and test images having the difference region;

[0012] outputting the wiring rule to be corrected, the reference image corresponding to the wiring rule to be corrected, and the test image marked with the at least one difference region.

[0013] In another embodiment of the present disclosure, the difference pixels are classified according to a nearest neighbor algorithm to obtain at least one difference region, comprising:

[0014] Noise points in all difference pixels in the at least one set of reference images and test images are filtered to obtain a difference pixel set, wherein a difference pixel set records difference pixels of a set of reference images and test images;

[0015] The difference pixel set is divided into at least one subset, wherein the distance between any pixel points in a subset is not greater than a set distance;

[0016] The coordinate extreme value of all difference pixels in the at least one subset is determined, wherein the coordinate extreme value is the minimum coordinate value in the left and lower directions of all difference pixels in the corresponding subset, and the maximum coordinate value in the right and upper directions;

[0017] Based on the coordinate extreme value, at least one difference region corresponding to the at least one subset is determined, and each subset corresponds to a difference region.

[0018] In another embodiment of the present disclosure, the difference pixel set is divided into at least one subset, comprising:

[0019] A pixel point is taken from the at least one difference pixel set;

[0020] When there is no existing subset, the taken pixel point is placed in a new subset;

[0021] When there is an existing subset, the distance between the taken pixel point and the pixel points in the existing subset is calculated;

[0022] Based on the distance between the taken pixel point and the pixel points in the existing subset, the taken pixel point is placed in the corresponding existing subset or a new subset;

[0023] The step of taking a pixel point from the at least one difference pixel set is performed until the at least one difference pixel set becomes an empty set.

[0024] In another embodiment of the present disclosure, the taken pixel point is placed in the corresponding existing subset or a new subset, comprising:

[0025] In response to the existence of an existing subset with a distance not greater than a set threshold from the taken pixel point, the taken pixel point is placed in the existing subset with a distance not greater than a set threshold;

[0026] In response to the distance between the extracted pixel point and the pixel points in the existing sub-set being greater than the set threshold, the extracted pixel point is placed into a new sub-set.

[0027] In another embodiment of the present disclosure, the method further comprises:

[0028] When there is no difference between the at least one set of reference images and test images, outputting prompt information that the wiring rule corresponding to the at least one set of reference images and test images passes the test.

[0029] In another embodiment of the present disclosure, before determining the difference pixel points of the at least one set of reference images and test images, the method further comprises:

[0030] Performing gray processing on the at least one set of reference images and test images;

[0031] Performing binary processing on the at least one set of reference images and test images after the gray processing;

[0032] The determination of the difference pixel points of the at least one set of reference images and test images comprises:

[0033] Determining the difference pixel points of the at least one set of reference images and test images after the binary processing.

[0034] According to another aspect of the embodiments of the present disclosure, a testing device for wiring software is provided, and the device comprises:

[0035] An image acquisition module, configured to input a test case and at least one image acquisition angle in a reference environment and a test environment respectively to obtain at least one set of reference images and test images, wherein one set of reference images and test images corresponds to one wiring rule;

[0036] A difference pixel determination module, configured to determine difference pixel points of the at least one set of reference images and test images in response to the existence of differences between the at least one set of reference images and test images;

[0037] A difference region determination module, configured to classify the difference pixel points according to a nearest neighbor algorithm to obtain at least one difference region;

[0038] A display module, configured to visually display the at least one difference region.

[0039] In one embodiment of the present disclosure, the display module comprises:

[0040] A rule determination sub-module, configured to determine a to-be-corrected wiring rule corresponding to the at least one set of reference images and test images with the difference region;

[0041] An output sub-module is configured to output the to-be-corrected wiring rule, the reference image corresponding to the to-be-corrected wiring rule, and the test image marked with the at least one difference region.

[0042] In another embodiment of the present disclosure, the difference region determination module comprises:

[0043] A noise filtering sub-module is configured to filter noise points from all difference pixel points in the at least one set of reference images and test images, to obtain a set of difference pixels, wherein one set of difference pixels records difference pixel points of one set of reference images and test images.

[0044] A division sub-module is configured to divide the set of difference pixels into at least one subset, wherein the distance between any pixel points in one subset is not greater than a set distance.

[0045] An extreme value determination sub-module is configured to determine coordinate extremes of all difference pixel points in the at least one subset, wherein the coordinate extremes are the minimum coordinate values in the left and lower directions and the maximum coordinate values in the right and upper directions of all difference pixel points in the corresponding subset.

[0046] A region determination sub-module is configured to determine at least one difference region corresponding to the at least one subset based on the coordinate extremes, wherein each subset corresponds to one difference region.

[0047] In another embodiment of the present disclosure, the division sub-module comprises:

[0048] A pixel extraction sub-module is configured to extract one pixel point from the at least one set of difference pixels.

[0049] A first placement sub-module is configured to place the extracted pixel point into a new subset when there is no existing subset.

[0050] A distance calculation sub-module is configured to calculate the distance between the extracted pixel point and pixel points in an existing subset when the existing subset exists.

[0051] A second placement sub-module is configured to place the extracted pixel point into the corresponding existing subset or a new subset based on the distance between the extracted pixel point and the pixel points in the existing subset.

[0052] The pixel extraction sub-module is configured to perform the step of extracting one pixel point from the at least one set of difference pixels until the at least one set of difference pixels becomes an empty set.

[0053] In another embodiment of the present disclosure, the second placing submodule is specifically configured to place the extracted pixel point into an existing sub-set in which the distance between the extracted pixel point and the pixel points in the existing sub-set is not greater than the set threshold value; and place the extracted pixel point into a new sub-set in response to the distance between the extracted pixel point and the pixel points in the existing sub-set being greater than the set threshold value.

[0054] In another embodiment of the present disclosure, the device further comprises:

[0055] The test passing module is configured to output prompt information indicating that the wiring rule corresponding to the at least one set of reference images and test images passes the test when there is no difference between the at least one set of reference images and test images.

[0056] In another embodiment of the present disclosure, the device further comprises:

[0057] The gray scale processing module is configured to perform gray scale processing on the at least one set of reference images and test images.

[0058] The binary processing module is configured to perform binary processing on the at least one set of reference images and test images after the gray scale processing.

[0059] The difference pixel determination module is specifically configured to determine the difference pixel points of the at least one set of reference images and test images after the binary processing.

[0060] According to still another aspect of the embodiments of the present disclosure, an electronic device is provided, which comprises:

[0061] The memory is configured to store computer products.

[0062] The processor is configured to execute the computer products stored in the memory, and when the computer products are executed, the test method of the wiring software is implemented.

[0063] According to still another aspect of the embodiments of the present disclosure, a computer readable storage medium is provided, which stores computer instructions, and when the computer instructions are executed by a processor, the test method of the wiring software is implemented.

[0064] According to still another aspect of the embodiments of the present disclosure, a computer program product is provided, which comprises computer program instructions, and when the computer program instructions are executed by a processor, the test method of the wiring software is implemented.

[0065] Based on the cabling software testing method, apparatus, electronic device, and storage medium provided in the above embodiments of this disclosure, at least one set of reference images and test images are obtained by inputting test cases and at least one image-taking perspective in a reference environment and a test environment, respectively; then, the difference pixels between the at least one set of reference images and test images are determined; the difference pixels are classified according to the nearest neighbor algorithm to obtain at least one difference region; and the at least one difference region is visualized. The embodiments of this disclosure can automatically determine whether there are difference pixels between the reference image and the test image based on image processing technology, thereby completing the testing of the cabling software. Since the test cases and image-taking perspectives are pre-set, and each reference image and test image acquired from each image-taking perspective corresponds to a cabling rule, the testing of the cabling software is automated, solving the problem of extremely high testing costs caused by manually testing and verifying each cabling rule.

[0066] The technical solutions of this disclosure will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description

[0067] The accompanying drawings, which form part of this specification, illustrate embodiments of this disclosure and, together with the description, serve to explain the principles of this disclosure.

[0068] This disclosure will become clearer with reference to the accompanying drawings and the following detailed description, wherein:

[0069] Figure 1 A flowchart illustrating one embodiment of the testing method for the cabling software disclosed herein;

[0070] Figure 2A A flowchart for determining the discrepancy area in the testing method for the cabling software disclosed herein;

[0071] Figure 2B This is a schematic diagram illustrating the method for determining differential pixels in the testing of the wiring software disclosed herein.

[0072] Figure 2C This is a schematic diagram of the testing method for the cabling software disclosed herein before identifying a region of difference.

[0073] Figure 2D This is a schematic diagram of the testing method for the cabling software disclosed herein after identifying a region of difference.

[0074] Figure 2E This is a diagram visually representing the test results of the cabling software testing method disclosed herein;

[0075] Figure 2F A flowchart illustrating the classification of differing pixels in the testing method for the wiring software disclosed herein;

[0076] Figure 3 Flow chart for another embodiment of a method of testing wiring software of the present disclosure;

[0077] Figure 4 Structural schematic diagram of one embodiment of a testing device for wiring software of the present disclosure;

[0078] Figure 5 Structural schematic diagram of another embodiment of a testing device for wiring software of the present disclosure;

[0079] Figure 6 Structural schematic diagram of another embodiment of a testing device for wiring software of the present disclosure;

[0080] Figure 7 Structural diagram of an electronic device provided for an illustrative embodiment of the present disclosure. DETAILED DESCRIPTION

[0081] Various exemplary embodiments of the present disclosure will now be described in detail with reference to the accompanying drawings. It should be noted that the relative arrangement of the components and steps set forth in the embodiments, numerical expressions, and numerical values are not limiting to the scope of the present disclosure unless specifically stated otherwise.

[0082] Meanwhile, it should be understood that the sizes of the various portions shown in the drawings are exaggerated for illustrative purposes and are not necessarily drawn to scale.

[0083] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the scope of the present disclosure and its applications or uses.

[0084] Techniques, methods, and devices known to those of ordinary skill in the relevant art can not be discussed in detail herein. However, where appropriate, such techniques, methods, and devices can be considered part of the specification.

[0085] It should be noted that like reference numerals and letters refer to like items in the drawings and thus, once an item is defined in one drawing, it is not necessary to discuss it further in subsequent drawings.

[0086] Embodiments of the present disclosure can be applied to an electronic device such as a computer system / server and can operate with numerous other general purpose or special purpose computing system environments or configurations. Examples of well-known computing systems, environments, and / or configurations that can be suitable for use with an electronic device such as a computer system / server include, but are not limited to: personal computer systems, server computer systems, thin clients, thick clients, handheld or laptop devices, microprocessor-based systems, set-top boxes, programmable consumer electronics, network personal computers, minicomputer systems, mainframe computer systems, and distributed cloud computing environments that include any of the above systems or devices, and the like.

[0087] Electronic devices such as computer system / server can be described in the general context of computer system-executable instructions, such as program modules, being executed by a computer system. Generally, program modules can include routines, programs, objects, components, logic, data structures, and so on that perform particular tasks or implement particular abstract data types. Computer system / server can operate in a distributed cloud computing environment where tasks are performed by remote processing devices that are linked through a communications network. In a distributed cloud computing environment, program modules can be located in both local and remote computer system storage media including memory storage devices.

[0088] SUMMARY

[0089] The technical scheme provided by the embodiments of the present disclosure is used in the field of testing of wiring software, wherein there are a large number of wiring rules built in the wiring software, in the scenario of needing to test the wiring software, in order to realize automatic testing of all wiring rules of the wiring software, a plurality of test cases and corresponding image taking angles of each test case can be prepared in advance, and one reference image obtained under the corresponding image taking angle of the test case corresponds to one wiring rule. Therefore, the corresponding reference image and test image are obtained in the reference environment and the test environment respectively under the same image taking angle, and then image recognition is performed through image processing technology, so that whether there is an error wiring rule code in the test environment can be determined, reason positioning is quickly performed, and the problems of high testing cost and long testing time of manual testing and verification of each wiring rule are solved.

[0090] EXEMPLARY EMBODIMENTS

[0091] Figure 1 A flowchart of one embodiment of the wiring software testing method of the present disclosure; the wiring software testing method can be applied to an electronic device (such as a wiring software testing device, a computer system, etc.), and in the embodiments of the present disclosure, a server side is taken as an example for illustration, as shown in the wiring software testing method includes the following steps: Figure 1

[0092] In step 101, a test case and at least one image taking angle are input respectively in a reference environment and a test environment to obtain at least one set of reference images and test images, wherein one set of reference images and test images corresponds to one wiring rule.

[0093] ​In an embodiment, the image-taking perspective refers to the perspective of taking the reference image and the test image, and the reference image and the test image need to be taken at the same image-taking perspective in the reference environment and the test environment respectively. After a test case is executed to obtain a routing result, the reference image and the test image can be taken from the routing result by using a preset image-taking perspective, and a set of reference image and test image taken at each image-taking perspective corresponds to a routing rule.

[0094] In an embodiment, since one test case cannot cover dozens of routing rules built in the routing software, the number of test cases is usually more than one, and the routing rules available to each test case and the corresponding image-taking perspective can be preset.

[0095] In an embodiment, the routing rules can include position-based routing rules and avoidance-based routing rules, the position-based routing rules emphasize the distance or relative position of lines and walls, and the avoidance-based routing rules emphasize the relative position (up-down position) of lines when different lines cross.

[0096] In step 102, in response to the existence of differences in the at least one set of reference image and test image, the difference pixel points of the at least one set of reference image and test image are determined.

[0097] In an embodiment, for each set of reference image and test image, whether there are difference pixel points in the reference image and the test image can be determined by image difference identification.

[0098] In an embodiment, before the reference image and the test image are subjected to difference identification, the reference image and the test image can be subjected to gray processing and binary processing in sequence. Since an image usually contains three color channels of red, green and blue, and the gray image will change from three channels to a single channel, the data processing of the single channel will be much simpler, so the image can be subjected to gray processing first. Commonly used gray algorithms include average value method, eye perception method, and saturation algorithm, and the embodiment of the present disclosure does not limit the algorithm of gray processing, and any gray algorithm can be adopted.

[0099] In an embodiment, the gray-processed image essentially stores an integer two-dimensional array with a value range of [0-255], and after the gray image is subjected to binary processing, a binary image reflecting the overall and local features of the image can be obtained, and not only the data amount is further reduced, but also the basic contour features of the image can be seen.

[0100] In an embodiment, the binary processed image essentially stores an integer two-dimensional array with values of 0 or 1, where 0 represents black and 1 represents white. By performing an XOR operation on the pixels at corresponding positions of the binary processed reference image and the test image, the pixels with differences can be identified. See Figure 2B , Figure 2B An illustration of determining the pixels with differences by performing an XOR operation is shown in

[0101] In step 103, the pixels with differences are classified according to the nearest neighbor algorithm to obtain at least one difference region.

[0102] In an embodiment, after determining the pixels with differences in the reference image and the test image, random noise pixels can be filtered out. Specifically, an erosion algorithm can be used to filter out the noise pixels, and then the set of pixels with differences in the test image is obtained.

[0103] In an embodiment, after determining the pixels with differences in the reference image and the test image, if the regions where the pixels with differences are located are not further determined, see Figure 2C If only the pixels with differences are determined without determining the difference regions where each pixel with differences is located, it can cause problems in accurately positioning the test of the layout software, such as Figure 2C There are multiple pixels with differences in the white rectangular region in Figure 2D , which correspond to multiple difference regions. However, since the classification according to the nearest neighbor algorithm is not performed, the location of the test of the layout software cannot be accurately positioned. After determining the difference regions according to the nearest neighbor algorithm, each difference region can be clearly marked, see

[0104] In an embodiment, the specific implementation of classifying the pixels with differences according to the nearest neighbor algorithm to obtain at least one difference region can be referred to the embodiment shown in Figure 2A , which will not be described in detail here.

[0105] In step 104, the at least one difference region is visually displayed.

[0106] In an embodiment, if a set of reference images and test images have differences, it is determined that the layout rules corresponding to the set of images have problems. The difference regions and the to-be-corrected layout rules can be visually displayed on a webpage.

[0107] In an embodiment, see Figure 2E , which illustrates the visual test result. Not only are the difference regions displayed, but also the to-be-corrected layout rules are displayed by codes. The visual display mode is more conducive to the test personnel to find and solve problems.

[0108] The steps 101-104 obtain at least one set of reference images and test images by respectively inputting test cases and at least one image-taking perspective in the reference environment and the test environment, determine difference pixels in the at least one set of reference images and test images, classify the difference pixels according to a nearest neighbor algorithm to obtain at least one difference region, and visually display the at least one difference region. The embodiment of the disclosure can automatically determine whether there are difference pixels in the reference images and the test images based on image processing technology, and further complete the test of the layout software. Since the test cases and the image-taking perspective are pre-set, and the reference images and the test images obtained at each image-taking perspective correspond to one layout rule, the test of the layout software is automated, and the problem of extremely high test cost caused by manual test and verification of each layout rule is solved.

[0109] In order to better illustrate the scheme of the test of the layout software of the disclosure, another embodiment is used for illustration.

[0110] Figure 2A A flowchart of determining a difference region for the test method of the layout software of the disclosure, Figure 2B A schematic diagram of determining a difference pixel for the test method of the layout software of the disclosure, Figure 2C A schematic diagram before determining a difference region for the test method of the layout software of the disclosure, Figure 2D A schematic diagram after determining a difference region for the test method of the layout software of the disclosure, Figure 2E A schematic diagram of visually displaying a test result for the test method of the layout software of the disclosure, Figure 2F A flowchart of classifying difference pixels for the test method of the layout software of the disclosure. This embodiment takes how to determine a difference region as an example for illustrative description, as shown in Figure 2A The steps include the following steps:

[0111] In step 201, all difference pixels in the at least one set of reference images and test images are filtered for noise points to obtain a difference pixel set.

[0112] In an embodiment, a difference pixel set records difference pixels of a set of reference images and test images.

[0113] In an embodiment, after determining the difference pixels in the reference images and the test images, random noise pixels can be filtered out first. Specifically, an erosion algorithm can be used for noise filtering to obtain a difference pixel set. The difference pixels of the reference images and the test images of the Yi nationality correspond to a difference pixel set.

[0114] In an embodiment, since the reference images are all prepared in advance and verified by human beings, the difference pixels are displayed in the test image, and the difference pixel set can be obtained by filtering the noise points, that is, a clean difference pixel test image is obtained.

[0115] In step 202, the difference pixel set is divided into at least one sub-set, wherein the distance between any two pixels in a sub-set is not greater than a set distance.

[0116] In an embodiment, the nearest neighbor algorithm can be used to classify the difference pixels to obtain at least one sub-set, and each sub-set corresponds to a difference region.

[0117] In an embodiment, by Figure 2F As shown in the schematic implementation, the difference pixel set can be divided into at least one sub-set, as shown in Figure 2F The steps 221-224 include:

[0118] In step 221, a pixel point is taken from the at least one difference pixel set.

[0119] In step 222, when there is no existing sub-set, the taken pixel point is placed in a new sub-set.

[0120] In step 223, when there is an existing sub-set, the distance between the taken pixel point and the pixel points in the existing sub-set is calculated.

[0121] In step 224, based on the distance between the taken pixel point and the pixel points in the existing sub-set, the taken pixel point is placed in the corresponding existing sub-set or a new sub-set.

[0122] After step 224 is performed, step 221 is continued until the at least one difference pixel set becomes an empty set.

[0123] In an embodiment, placing the taken pixel point in the corresponding existing sub-set or a new sub-set includes: in response to the existence of an existing sub-set with a distance not greater than a set threshold from the taken pixel point, placing the taken pixel point in the existing sub-set with the distance not greater than the set threshold; and in response to the distance between the taken pixel point and the pixel points in the existing sub-set being greater than the set threshold, placing the taken pixel point in a new sub-set.

[0124] Before the first pixel point is taken from the difference pixel set in steps 221-224, there is no sub-set, and the taken pixel point can be placed in a new sub-set (such as a first sub-set) first, and the initial value of the new sub-set is an empty set.

[0125] In an embodiment, after a pixel is taken out from the set of difference pixels, the distance between the pixel and all the elements in the existing sub-sets, such as the first sub-set, is calculated. If there is an element in the first sub-set whose distance to the taken pixel is not greater than a set distance (such as 100), the taken pixel is considered as a neighbor of the element in the first sub-set, and the taken pixel is put into the first sub-set.

[0126] In an embodiment, after a pixel is taken out from the set of difference pixels, the distance between the pixel and all the elements in the first sub-set is calculated. If the distance between all the elements in the first sub-set and the taken pixel is greater than a set distance (such as 100), the taken pixel is considered as not a neighbor of the elements in the first sub-set, and the distance between the taken pixel and the elements in other existing sub-sets is further calculated. If there is an element in a sub-set whose distance to the taken pixel is not greater than a set distance (such as 100), the taken pixel is put into the corresponding sub-set, otherwise, the taken pixel is put into a new sub-set. In this way, all the elements in the set of difference pixels are taken out and classified.

[0127] In step 203, the coordinate extreme values of all the difference pixels in the at least one sub-set are determined; wherein the coordinate extreme values are the minimum coordinate values in the left and lower directions and the maximum coordinate values in the right and upper directions of all the difference pixels in the corresponding sub-set.

[0128] In an embodiment, there are multiple difference pixels in a sub-set. In order to find a rectangular region that can frame the difference pixels, the minimum coordinate values in the left and lower directions and the maximum coordinate values in the right and upper directions of the difference pixels are found.

[0129] In step 204, at least one difference region corresponding to the at least one sub-set is determined based on the coordinate extreme values, and each sub-set corresponds to a difference region.

[0130] In an embodiment, after the at least one sub-set is obtained in steps 203-204, the upper, lower, left and right extreme values of each pixel in each sub-set are found, and a rectangular region is drawn with the (upper, left) extreme values and the (lower, right) extreme values as two points, which is the difference region of the corresponding sub-set.

[0131] Through steps 201-204, the reference image and the test image are subjected to difference identification by the image difference identification and the nearest neighbor algorithm, and each difference region is clearly marked, so that the test problem of the wiring software that cannot be accurately positioned is accurately positioned.

[0132] Figure 3This is a flowchart illustrating a method for obtaining available keel configurations in the testing of cabling software disclosed herein; this embodiment uses the method of obtaining available keel configurations on the BIM server side as an example for illustrative purposes. Figure 3 As shown, it includes the following steps:

[0133] In step 301, test cases and at least one image viewing angle are input in the baseline environment and the test environment respectively to obtain at least one set of baseline images and test images, wherein one set of baseline images and test images corresponds to one routing rule.

[0134] In step 302, grayscale processing is performed on the at least one set of reference images and test images.

[0135] In step 303, at least one set of reference images and test images that have undergone grayscale processing are subjected to binary processing.

[0136] In one embodiment, after the image is binary processed, the difference pixels between the reference image and the test image can be calculated by XOR operation. If there are no difference pixels between the reference image and the test image, step 304 is executed; if there are difference pixels between the reference image and the test image, step 305 is executed.

[0137] In step 304, in response to the absence of any difference between the at least one set of reference images and test images, a prompt message indicating that the wiring rules corresponding to the at least one set of reference images and test images have passed the test is output.

[0138] In one embodiment, if there is no difference between a set of reference images and test images, it indicates that the routing rules corresponding to the set of reference images and test images meet expectations, and the routing rules pass the test.

[0139] In step 305, in response to the existence of differences in the at least one set of reference images and test images, the difference pixels in the at least one set of reference images and test images are determined.

[0140] In step 306, the difference pixels are classified according to the nearest neighbor algorithm to obtain at least one difference region.

[0141] In step 307, at least one set of reference images and test images corresponding to the wiring rules to be corrected are determined.

[0142] In one embodiment, the wiring rule to be corrected refers to the wiring rule corresponding to a set of reference images and test images that are determined to have different pixels after image difference recognition.

[0143] In step 308, the wiring rule to be corrected, the reference image corresponding to the wiring rule to be corrected, and the test image marked with the at least one difference region are output.

[0144] Through the steps 301-308, the embodiment can automatically determine whether there are difference pixels between the reference image and the test image based on the image processing technology, and further complete the test of the layout software. Since the test case and the image taking angle are both pre-set, and the reference image and the test image obtained at each image taking angle correspond to one layout rule, the test of the layout software is automated, and the problem of extremely high test cost of manual testing and verification of each rule is solved.

[0145] Corresponding to the above-mentioned embodiments of the test method of the layout software, the disclosure also provides corresponding embodiments of the test device of the layout software.

[0146] Figure 4 The structural schematic diagram of one embodiment of the test device of the layout software of the disclosure is shown in FIG. 4. The device is applied to a test platform of the layout software. As shown in FIG. 4, the device comprises: Figure 4

[0147] The image acquisition module 41 is configured to input a test case and at least one image taking angle in a reference environment and a test environment respectively to obtain at least one set of reference images and test images, wherein one set of reference images and test images corresponds to one layout rule.

[0148] The difference pixel determination module 42 is configured to determine difference pixel points of the at least one set of reference images and test images in response to the existence of differences in the at least one set of reference images and test images.

[0149] The difference region determination module 43 is configured to classify the difference pixel points according to a nearest neighbor algorithm to obtain at least one difference region.

[0150] The display module 44 is configured to visually display the at least one difference region.

[0151] Figure 5 The structural schematic diagram of another embodiment of the test device of the layout software of the disclosure is shown in FIG. 5. Based on the embodiment shown in FIG. 4, in an embodiment, the display module 44 comprises: Figure 5 Figure 4 The rule determination sub-module 441 is configured to determine a to-be-corrected layout rule corresponding to the at least one set of reference images and test images with the difference region.

[0152] The output sub-module 442 is configured to output the to-be-corrected layout rule, the reference image corresponding to the to-be-corrected layout rule, and the test image marked with the at least one difference region.

[0153] The output sub-module 442 is configured to output the to-be-corrected layout rule, the reference image corresponding to the to-be-corrected layout rule, and the test image marked with the at least one difference region.

[0154] ​​In an embodiment, the difference region determining module 43 comprises:

[0155] a noise filtering sub-module 431, configured to filter noise points in all difference pixel points in the at least one group of reference images and test images, to obtain a difference pixel set, wherein the difference pixel set records difference pixel points of a group of reference images and test images;

[0156] a division sub-module 432, configured to divide the difference pixel set into at least one sub-set, wherein the distance between any pixel points in a sub-set is not greater than a set distance;

[0157] an extreme value determining sub-module 433, configured to determine coordinate extreme values of all difference pixel points in the at least one sub-set, wherein the coordinate extreme values are the minimum coordinate values in the left and lower directions and the maximum coordinate values in the right and upper directions of all difference pixel points in a corresponding sub-set;

[0158] a region determining sub-module 434, configured to determine at least one difference region corresponding to the at least one sub-set based on the coordinate extreme values, wherein each sub-set corresponds to a difference region.

[0159] In an embodiment, the division sub-module 432 comprises:

[0160] a pixel taking-out sub-module 4321, configured to take out a pixel point from the at least one difference pixel set;

[0161] a first placing sub-module 4322, configured to place the taken-out pixel point into a new sub-set when there is no existing sub-set;

[0162] a distance calculating sub-module 4323, configured to calculate the distance between the taken-out pixel point and pixel points in an existing sub-set when the existing sub-set exists;

[0163] a second placing sub-module 4324, configured to place the taken-out pixel point into a corresponding existing sub-set or a new sub-set based on the distance between the taken-out pixel point and the pixel points in the existing sub-set;

[0164] the pixel taking-out sub-module 4321 is configured to execute the step of taking out a pixel point from the at least one difference pixel set until the at least one difference pixel set becomes an empty set.

[0165] In an embodiment, the second placing submodule 4324 is specifically configured to place the extracted pixel point into an existing sub-set in which the distance between the extracted pixel point and the pixel points in the existing sub-set is not greater than the set threshold value; or place the extracted pixel point into a new sub-set in response to the distance between the extracted pixel point and the pixel points in the existing sub-set being greater than the set threshold value.

[0166] Figure 6 FIG. 6 is a structural schematic diagram of yet another embodiment of a testing device for the wiring software of the present disclosure, which is based on the embodiments shown in Figure 6 FIG. 6A and / or Figure 4 FIG. 6B, and in an embodiment, the device further comprises: Figure 5

[0167] The test passing module 45 is configured to output prompt information that the wiring rules corresponding to the at least one set of reference images and the test images pass the test when there is no difference between the at least one set of reference images and the test images.

[0168] In an embodiment, the device further comprises:

[0169] The gray scale processing module 46 is configured to perform gray scale processing on the at least one set of reference images and the test images.

[0170] The binary processing module 47 is configured to perform binary processing on the at least one set of reference images and the test images after the gray scale processing.

[0171] The difference pixel determining module 42 is specifically configured to determine the difference pixel points of the at least one set of reference images and the test images after the binary processing.

[0172] The implementation process of the functions and roles of each unit in the above device is specifically described in the implementation process of the corresponding steps in the above method, which will not be repeated here.

[0173] For the device embodiment, since it basically corresponds to the method embodiment, the related parts can be referred to the part of the method embodiment. The device embodiments described above are only schematic, and the units described as separate components can or can not be physically separate, and the components displayed as units can or can not be physical units, i.e., they can be located in one place, or distributed on multiple network units. According to the actual needs, some or all of the modules can be selected to achieve the purpose of the present disclosure. Those skilled in the art can understand and implement without creative labor.

[0174] Next, an electronic device according to an embodiment of the present disclosure is described with reference to Figure 7 , in which the device implementing the method of the present embodiment can be integrated.​Figure 7 A structural diagram of an electronic device according to an illustrative embodiment of the present disclosure is shown in FIG. 7. Figure 7 As shown, the electronic device 7 includes one or more processors 71, a memory 72 of one or more computer readable storage media, and a computer program stored on the memory and executable on the processor. When the program of the memory 72 is executed, the test method of the wiring software described above can be implemented.

[0175] Specifically, in actual applications, the electronic device can further include input devices 73, output devices 74, and the like, and these components are interconnected through a bus system and / or other forms of connection mechanisms (not shown). Those skilled in the art can understand that the electronic device shown in FIG. 7 does not constitute a limitation on the electronic device, and can include more or fewer components than those shown in the figure, or some components, or different arrangement of components. Among them: Figure 7

[0176] The processor 71 can be a central processing unit (CPU) or other forms of processing unit having data processing capability and / or instruction execution capability, and can control other components in the electronic device to perform desired functions.

[0177] The memory 72 can store one or more computer program products, and the memory can include various forms of computer readable storage media, such as volatile memory and / or non-volatile memory. Volatile memory may, for example, include random access memory (RAM) and / or cache memory, etc. Non-volatile memory may, for example, include read-only memory (ROM), hard disk, flash memory, etc. One or more computer program products can be stored on the computer readable storage medium, and the processor 71 can run the computer program product to implement the test method of the wiring software of the various embodiments of the present disclosure described above and / or other desired functions.

[0178] In one example, the electronic device can further include input devices 73 and output devices 74, and these components are interconnected through a bus system and / or other forms of connection mechanisms (not shown),

[0179] In addition, the input devices 73 can include, for example, a keyboard, a mouse, and the like.

[0180] The output devices 74 can output various information to the outside, including the determined distance information, direction information, and the like. The output devices 74 can include, for example, a display, a speaker, a printer, a communication network and a remote output device connected thereto, and the like.

[0181] Of course, in order to simplify, Figure 7 ​Only some of the components of the electronic device 7 related to the present disclosure are shown, and components such as a bus, an input / output interface, and the like are omitted. In addition to this, the electronic device 7 can include any other appropriate components according to the specific application.

[0182] In addition to the above method and device, an embodiment of the present disclosure can also be a computer program product, which includes computer program instructions, which, when executed by a processor, cause the processor to perform the steps of the test software testing method of the wiring software according to various embodiments of the present disclosure described in the above "Exemplary Method" section of the present specification.

[0183] The computer program product can be written in any combination of one or more programming languages, including an object-oriented programming language such as Java, C++, and the like, and conventional procedural programming languages, such as the "C" programming language, or the like. The program code can execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server.

[0184] In addition, an embodiment of the present disclosure can also be a computer readable storage medium, which stores computer program instructions, which, when executed by a processor, cause the processor to perform the steps of the test software testing method of the wiring software according to various embodiments of the present disclosure described in the above "Exemplary Method" section of the present specification.

[0185] The computer readable storage medium can take any combination of one or more of the following: a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, an electrical, a magnetic, an optical, an electromagnetic, an infrared, or a semiconductor system, device or apparatus, or any combination of the above. More specific examples (a non-exhaustive list) of the readable storage medium include an electrical connection having one or more wires, a portable disc, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any appropriate combination of the above.

[0186] The above describes the basic principles of the present disclosure in combination with specific embodiments, but it should be noted that the advantages, benefits, effects and the like mentioned in the present disclosure are only examples and are not limiting, and these advantages, benefits, effects and the like cannot be considered as necessary for each embodiment of the present disclosure. In addition, the above specific details of the disclosure are only for the purpose of example and for the purpose of understanding, and are not limiting, and the above details do not limit the present disclosure to be necessarily implemented with the above specific details.

[0187] Each embodiment in the specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between each embodiment can be understood by referring to each other. For system embodiments, since they basically correspond to method embodiments, the description is relatively simple, and the relevant parts can be understood by referring to the part of the method embodiment.

[0188] Those of ordinary skill in the art can understand that all or part of the steps of the above-mentioned method embodiments can be completed by program instruction related hardware, and the foregoing program can be stored in a computer readable storage medium. The program executes the steps including the above-mentioned method embodiments when executed; and the foregoing storage medium includes ROM, RAM, magnetic disc or optical disc and various storage medium that can store program codes.

[0189] The methods and apparatuses of the present disclosure can be implemented in many ways. For example, the methods and apparatuses of the present disclosure can be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above order of steps for the method is only for illustration, and the steps of the method of the present disclosure are not limited to the above specific description, unless otherwise specifically described. In addition, in some embodiments, the present disclosure can also be implemented as a program recorded in a recording medium, which includes machine readable instructions for implementing the method according to the present disclosure. Therefore, the present disclosure also covers the recording medium storing the program for executing the method according to the present disclosure.

[0190] The description of the present disclosure is given for the purpose of example and description, and is not exhaustive or limiting to the disclosed form. Many modifications and variations are obvious to those of ordinary skill in the art. The embodiments are selected and described in order to better illustrate the principles and practical application of the present disclosure, and to enable those of ordinary skill in the art to understand the present disclosure so as to design various embodiments with various modifications suitable for specific purposes.

Claims

1. A test method for wiring software, characterized by, The method comprises: inputting test cases and at least one image-taking perspective in a benchmark environment and a test environment respectively to obtain at least one set of benchmark images and test images, wherein one set of benchmark images and test images corresponds to one wiring rule; in response to the existence of differences in the at least one set of benchmark images and test images, determining the difference pixel points of the at least one set of benchmark images and test images; classifying the difference pixel points according to a nearest neighbor algorithm to obtain at least one difference region; visualizing the at least one difference region; the visualizing the at least one difference region comprises: determining the to-be-corrected wiring rule corresponding to the at least one set of benchmark images and test images with the difference region; outputting the to-be-corrected wiring rule, the benchmark image corresponding to the to-be-corrected wiring rule, and the test image marked with the at least one difference region.

2. The method of claim 1, wherein, The classifying the difference pixel points according to a nearest neighbor algorithm to obtain at least one difference region comprises: filtering all difference pixel points existing in the at least one set of benchmark images and test images to obtain at least one difference pixel set, wherein the difference pixel points of the set of benchmark images and test images are recorded in one difference pixel set; dividing the difference pixel set into at least one subset, wherein the distance between any pixel points in one subset is not greater than a set distance; determining the coordinate extreme value of all difference pixel points in the at least one subset; wherein the coordinate extreme value is the minimum coordinate value in the left and lower directions and the maximum coordinate value in the right and upper directions of all difference pixel points in the corresponding subset; based on the coordinate extreme value, determining at least one difference region corresponding to the at least one subset, and each subset corresponds to one difference region.

3. The method of claim 2, wherein, The dividing the difference pixel set into at least one subset comprises: taking one pixel point from the at least one difference pixel set; when there is no existing subset, placing the taken pixel point into a new subset; when there is an existing subset, calculating the distance between the taken pixel point and the pixel points in the existing subset; based on the distance between the taken pixel point and the pixel points in the existing subset, placing the taken pixel point into the corresponding existing subset or a new subset; performing the step of taking one pixel point from the at least one difference pixel set until the at least one difference pixel set becomes an empty set.

4. The method of claim 3, wherein, The placing the taken pixel point into the corresponding existing subset or a new subset comprises: in response to the existence of an existing subset with a distance not greater than a set threshold from the taken pixel point, placing the taken pixel point into the existing subset with a distance not greater than a set threshold; in response to the distance between the taken pixel point and the pixel points in the existing subset being greater than the set threshold, placing the taken pixel point into a new subset.

5. The method of claim 1, wherein, The method further comprises: In response to the absence of difference between the at least one set of reference images and the test images, outputting prompt information that the wiring rule corresponding to the at least one set of reference images and the test images passes the test.

6. The method of claim 1, wherein, Before the determining of the difference pixel points between the at least one set of reference images and the test images, the method further comprises: performing gray processing on the at least one set of reference images and the test images; performing binary processing on the at least one set of reference images and the test images after the gray processing; the determining of the difference pixel points between the at least one set of reference images and the test images comprises: determining the difference pixel points between the at least one set of reference images and the test images after the binary processing.

7. An electronic device, comprising: comprise: a memory for storing computer program instructions; a processor for executing the computer program instructions stored in the memory, and when the computer program instructions are executed, the method of any one of claims 1-6 is implemented.

8. A computer-readable storage medium having stored thereon computer program instructions, wherein, When the computer program instructions are executed by the processor, the method of any one of claims 1-6 is implemented.

9. A computer program product comprising computer program instructions, characterised in that, When the computer program instructions are executed by the processor, the method of any one of claims 1-6 is implemented.

Citation Information

Patent Citations

  • Method and apparatus for inspecting wiring pattern

    JP2005291988A