Region matching method and apparatus in environment, and electronic device, computer-readable storage medium and computer program product
By performing two clustering processes on the point set data, merging it with the pre-defined prior clustering regions, and using the center of the third clustering region for a second clustering, the offset problem in matching environmental data with the actual object location is solved, and the accuracy of region matching is improved.
Patent Information
- Application Number
- PCT/CN2024/143962
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-07-25
- Filing Date
- 2024-12-30
- Publication Date
- 2026-01-29
Smart Images

Figure CN2024143962_29012026_PF_FP_ABST
Abstract
Description
Area matching methods, apparatuses, electronic devices, computer-readable storage media, and computer program products in the environment
[0001] This application claims priority to Chinese Patent Application No. 202411011214.9, filed on July 25, 2024, entitled “A method, apparatus, electronic device, computer-readable storage medium and computer program product for matching regions in an environment”, the entire contents of which are incorporated herein by reference. Technical Field
[0002] This application relates to point set data processing technology, and more particularly to a method, apparatus, electronic device, computer-readable storage medium, and computer program product for area matching in an environment. Background Technology
[0003] When matching the location of environmental data with the actual objects in the environment, due to the hardware precision of the acquired environmental data or the software algorithm used for matching, there is a high risk of positional deviation between the collected environmental data and the expected location of the actual objects, leading to inaccurate subsequent analysis results. Technical issues
[0004] This application provides a method, apparatus, electronic device, computer-readable storage medium, and computer program product for region matching in an environment, which can improve the accuracy of region matching in an environment. Technical solutions
[0005] The technical solution of this application embodiment is implemented as follows:
[0006] This application provides a method for region matching in an environment. The method includes: acquiring point set data of a target environment, wherein the point set data includes N data points; performing a first clustering process on the N data points in the point set data to obtain M first clustering regions, wherein each first clustering region corresponds to a first cluster center, and each first clustering region contains P data points, where N, M, and P are positive integers, and P≤N; determining a second clustering region from the M first clustering regions that matches a pre-labeled prior clustering region; merging at least one first clustering region with the second clustering region to obtain a third clustering region that matches the prior clustering region; and using the third cluster center of the third clustering region as the initial clustering point, performing a second clustering process on the point set data to obtain a first target clustering region that matches the prior clustering region.
[0007] This application provides an environment region matching device, including:
[0008] The acquisition module is used to acquire point set data of the target environment, wherein the point set data includes N data points;
[0009] The first clustering module is used to perform a first clustering process on the N data points to obtain M first clustering regions, wherein each first clustering region corresponds to a first cluster center, and each first clustering region contains P data points, where N, M, and P are positive integers, and P≤N;
[0010] The pre-matching module is used to determine a second clustering region from the M first clustering regions that matches the pre-labeled prior clustering regions;
[0011] The merging module is used to merge at least one of the first clustering regions with the second clustering region to obtain a third clustering region that matches the prior clustering region;
[0012] The second clustering module is used to perform second clustering processing on the point set data, using the third cluster center of the third clustering region as the initial clustering point, to obtain a first target clustering region that matches the prior clustering region.
[0013] In the above scheme, the first clustering module is further used to perform a first clustering process on N data points in the point set data, using the prior cluster center of the prior clustering region as the initial clustering point, to obtain M first clustering regions; or to perform a first clustering process on N data points in the point set data, using the number of the prior clustering regions as the number of clustering regions, to obtain M first clustering regions, where M is equal to the number of the prior clustering regions.
[0014] In the above scheme, the pre-matching module is also used to determine the distance between the prior cluster center of the prior clustering region and each of the first cluster centers; from the M first clustering regions, the first clustering region with the smallest distance is selected, and the selected first clustering region with the smallest distance is used as the second clustering region that matches the prior clustering region.
[0015] In the above scheme, the merging module is further configured to expand the range of the prior clustering region based on the first position deviation threshold corresponding to the target environment to obtain an expanded first prior clustering region; perform cluster center detection on the expanded first prior clustering region to obtain a first detection result; when the first detection result indicates that the expanded first prior clustering region includes at least one other cluster center and a second cluster center, merge the first clustering region corresponding to the at least one other cluster center with the second clustering region to obtain a third clustering region matching the prior clustering region, wherein the other cluster centers are the cluster centers other than the second cluster center among the first cluster centers corresponding to the M first clustering regions, and the second cluster center is the center of the second clustering region.
[0016] In the above scheme, the device further includes a third clustering module, which is used to perform a second clustering process on the point set data by taking the second clustering center of the second clustering region as the initial clustering point when the first detection result indicates that the expanded first prior clustering region does not include the other clustering centers, so as to obtain a second target clustering region that matches the prior clustering region.
[0017] In the above scheme, the device further includes a match cancellation module, which is used to cancel the matching relationship between the second cluster region and the prior cluster region when the first detection result indicates that the second cluster center of the second cluster region is outside the range of the expanded first prior cluster region.
[0018] In the above scheme, the second clustering module is further configured to: after performing the second clustering processing on the point set data, obtain intermediate clustering regions obtained by performing the second clustering processing on the point set data; expand the range of the prior clustering region based on the second position deviation threshold corresponding to the target environment to obtain an expanded second prior clustering region; perform cluster center detection on the expanded second prior clustering region to obtain a second detection result; when the second detection result indicates that the expanded second prior clustering region includes the intermediate cluster centers of multiple intermediate clustering regions, merge the multiple intermediate clustering regions to obtain a merged clustering region; wherein, the second position deviation threshold is greater than the first position deviation threshold, and the first position deviation threshold is the position deviation threshold used when merging at least one first clustering region with the second clustering region; and determine a first target clustering region that matches the prior clustering region based on the merged clustering region.
[0019] In the above scheme, the second clustering module is further used to perform iterative clustering processing on the point set data, using the fourth cluster center of the merged clustering region as the initial clustering point, to obtain the first target clustering region matching the prior clustering region; wherein, the iterative clustering termination condition of the iterative clustering processing includes at least one of the following: the number of clustering reaches a preset number, the repetition rate of the data points included in the clustering region obtained in this clustering and the data points included in the clustering region obtained in the previous clustering reaches a preset repetition rate, and the positional deviation between the cluster center of the clustering region obtained in this clustering and the cluster center of the clustering region obtained in the previous clustering is less than a preset deviation.
[0020] In the above scheme, the acquisition module is further used to acquire initial point set data generated for the target environment, wherein the initial point set data includes N initial data points; and to perform position smoothing processing on the N initial data points in the initial point set data to obtain the point set data.
[0021] In the above scheme, the acquisition module is further configured to sort the N initial data points based on the temporal information of each initial data point; for each initial data point, the following processing is performed: based on the sorting result, determine R surrounding data points associated with the initial data point, wherein the temporal difference between the surrounding data points and the initial data point is less than a preset threshold; determine n surrounding data points that have completed position smoothing and m surrounding data points that have not completed position smoothing among the R surrounding data points, wherein R, m, and n are all integers, and m = Rn; acquire the first initial position information of the initial data point, the second initial position information of the m surrounding data points, and the first updated position information of the n surrounding data points; based on the first initial position information, the second initial position information of the m surrounding data points, and the first updated position information of the n surrounding data points, perform position smoothing processing on the initial data point to obtain the second updated position information of the initial data point; and use the second updated position information of each initial data point in the initial point set data as the position information of each data point in the point set data.
[0022] In the above scheme, the acquisition module is further configured to: when the time sequence number of the initial data point is greater than the first specified number, determine R surrounding data points that are adjacent to and before the initial data point based on the sorting result; when the time sequence number of the initial data point is greater than the second specified number and less than or equal to the first specified number, determine n surrounding data points that are adjacent to and before the initial data point, and m surrounding data points that are adjacent to and after the initial data point based on the sorting result; when the time sequence number of the initial data point is equal to the second specified number, determine R surrounding data points that are adjacent to and after the initial data point based on the sorting result.
[0023] In the above scheme, the acquisition module is further configured to acquire a first weight corresponding to the first initial position information, a second weight corresponding to the second initial position information of the m surrounding data points, and a third weight corresponding to the first updated position information of the n surrounding data points, wherein the first weight is greater than the second weight, and the third weight is greater than the second weight; based on the first weight, the second weight, and the third weight, the first initial position information, the second initial position information of the m surrounding data points, and the first updated position information of the n surrounding data points are weighted and summed to obtain the second updated position information of the initial data points.
[0024] This application provides an electronic device, the electronic device comprising:
[0025] Memory is used to store executable instructions for a computer;
[0026] The processor, when executing computer-executable instructions stored in the memory, implements the region matching method in the environment provided in the embodiments of this application.
[0027] This application provides a computer-readable storage medium storing a computer program or computer-executable instructions for implementing the region matching method in the environment provided in this application when executed by a processor.
[0028] This application provides a computer program product, including a computer program or computer executable instructions. When the computer program or computer executable instructions are executed by a processor, they implement the region matching method in the environment provided in this application. Beneficial effects
[0029] Applying the above embodiments, a first clustering process is performed on the point set data of the target environment to obtain M first clustering regions. Second clustering regions are pre-matched to the pre-defined prior clustering regions for the target environment from these M first clustering regions. The second clustering regions and at least one first clustering region are then merged to obtain a third clustering region matching each prior clustering region. Then, the third cluster center of the third clustering region is used as the initial clustering point to perform a second clustering process on the point set data, thereby obtaining a first target clustering region matching the prior clustering regions. Since this embodiment performs two clustering processes on the point set data, and the second clustering is based on the pre-matching and merging of the clustering regions after the first clustering, the second clustering can obtain more accurate clustering results, making the data points in the same clustering region more correlated. This improves the clustering accuracy of the first target clustering region, thereby improving the matching accuracy between the first target clustering region and the prior clustering region. Attached Figure Description
[0030] Figure 1 is a schematic diagram of the regional matching system architecture in the environment provided in the embodiments of this application;
[0031] Figure 2 is a schematic diagram of the structure of the electronic device provided in an embodiment of this application;
[0032] Figure 3A is a flowchart illustrating the region matching method in an environment provided in an embodiment of this application;
[0033] Figure 3B is a flowchart illustrating the pre-matching method provided in an embodiment of this application;
[0034] Figure 3C is a flowchart illustrating the clustering region merging method provided in an embodiment of this application;
[0035] Figure 4A is a schematic diagram of an image to be observed in the target environment provided in an embodiment of this application;
[0036] Figure 4B is a schematic diagram of the prior clustering region corresponding to the image to be observed provided in the embodiment of this application;
[0037] Figure 5A is a schematic diagram of the initial eye-tracking data generated for the image to be observed according to an embodiment of this application;
[0038] Figure 5B is a schematic diagram of position-smoothed eye movement data provided in an embodiment of this application;
[0039] Figure 6A is a first schematic diagram of the clustering regions and cluster centers provided in an embodiment of this application;
[0040] Figure 6B is a first schematic diagram of the expanded prior clustering region provided in an embodiment of this application;
[0041] Figure 7A is a first schematic diagram of the clustering regions and cluster centers provided in an embodiment of this application;
[0042] Figure 7B is a second schematic diagram of the expanded prior clustering region provided in an embodiment of this application;
[0043] Figure 8 is a schematic diagram of the target clustering region provided in an embodiment of this application;
[0044] Figure 9 is a schematic diagram of the target environment provided in the embodiments of this application.
[0045] It should be noted that the terms "first" and "second" mentioned above are only used to distinguish between different options and do not represent the degree of superiority or inferiority of the options or their priority in the implementation process. Embodiments of the present invention
[0046] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limitations on this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0047] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0048] In the following description, the terms "first, second, third" are used merely to distinguish similar objects and do not represent a specific ordering of objects. It is understood that "first, second, third" may be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.
[0049] In this application embodiment, the terms "module" or "unit" refer to a computer program or part of a computer program that has a predetermined function and works with other related parts to achieve a predetermined goal, and can be implemented wholly or partially using software, hardware (such as processing circuitry or memory), or a combination thereof. Similarly, a processor (or multiple processors or memory) can be used to implement one or more modules or units. Furthermore, each module or unit can be part of an overall module or unit that includes the functionality of that module or unit.
[0050] Unless otherwise defined, all technical and scientific terms used in the embodiments of this application have the same meaning as commonly understood by one of ordinary skill in the art. The terminology used in the embodiments of this application is for the purpose of describing the embodiments of this application only and is not intended to limit this application.
[0051] In the implementation of this application, the collection and processing of relevant data should strictly comply with the requirements of relevant laws and regulations, obtain the informed consent or separate consent of the personal information subject, and carry out subsequent data use and processing within the scope of laws and regulations and the authorization of the personal information subject.
[0052] Before providing a further detailed description of the embodiments of this application, the nouns and terms involved in the embodiments of this application will be explained, and the nouns and terms involved in the embodiments of this application shall be interpreted as follows.
[0053] 1) Environmental data, which refers to data used to describe the environment. For example, environmental data can be eye-tracking data describing the environment from the perspective of the observation position, two-dimensional image data describing the environment from the perspective of pixel color (grayscale values of RGB channels), or three-dimensional image data describing the environment from the perspective of combining color and pixel position. Three-dimensional image data can be point cloud data. Eye-tracking data, two-dimensional image data, and three-dimensional image data can all be considered as point set data. The point set data corresponding to eye-tracking data and two-dimensional image data is in two-dimensional space, while the point cloud data corresponding to three-dimensional image data is in three-dimensional space.
[0054] 2) Eye-tracking data is a type of data collected through eye-tracking detection technology. It reflects an individual's visual attention, fixation behavior, and cognitive processes. Eye-tracking detection technology is achieved by detecting and recording data such as eye movement trajectories, fixation points, fixation duration, and eye movement paths.
[0055] Eye-tracking data includes at least gaze points: gaze points record the location where the subject's gaze is focused on the observation plane, usually represented by pixel coordinates on the screen. They reflect the subject's gaze focus and can be used to analyze the distribution of the subject's visual attention.
[0056] 3) Clustering is an unsupervised learning method primarily used for data mining and statistical data analysis. Its basic goal is to classify a set of data, but unlike traditional classification methods, clustering analysis is performed without knowing the category to which the data belongs. The result of clustering is to divide the data into several clusters (i.e., the clustering regions in this application), such that data points within the same cluster have high similarity, while data points in different clusters have low similarity.
[0057] When matching the location of environmental data with the actual objects in the environment, the collected environmental data may deviate from the expected location of the actual object due to the hardware precision of the data acquisition or the software algorithm used for matching. For example, when using an eye tracker to obtain the area and location of the human eye, if the eye tracker hardware and software algorithm are not well calibrated, the data acquired by the eye tracker may indicate that the human eye is looking at area B when the human eye is actually looking at area A, which will lead to inaccurate subsequent analysis results.
[0058] This application provides a method, apparatus, device, computer-readable storage medium, and computer program product for region matching in an environment, which can improve the accuracy of region matching in an environment.
[0059] Referring to Figure 1, which is a schematic diagram of the architecture of the regional matching system 100 in the environment provided in the embodiment of this application, in order to support the regional matching application in an environment, the terminal 401 connects to the server 200 through the network 300. The network 300 can be a wide area network or a local area network, or a combination of the two.
[0060] Terminal 401 is used to send a region matching request for the environment to server 200 in response to a region matching instruction for the environment.
[0061] When server 200 receives a region matching request for the environment, it responds by acquiring point set data of the target environment, performing a first clustering process on N data points in the point set data to obtain M first clustering regions, where each first clustering region corresponds to a first cluster center and contains P data points, where N, M, and P are positive integers and P≤N; determining a second clustering region from the M first clustering regions that matches a pre-defined prior clustering region; merging at least one first clustering region with a second clustering region to obtain a third clustering region that matches the prior clustering region; using the third cluster center of the third clustering region as the initial clustering point, performing a second clustering process on the point set data to obtain a first target clustering region that matches the prior clustering region, determining the region matching result for the target environment, and sending the region matching result to terminal 401.
[0062] In some embodiments, the region matching method in the environment provided in this application can be implemented by various electronic devices. For example, it can be implemented by terminal 401 alone, server 200 alone, or terminal 401 and server 200 working together.
[0063] In some embodiments, terminal 401 can be implemented as various types of terminals such as laptops, tablets, desktop computers, set-top boxes, smartphones, smart speakers, smartwatches, smart TVs, and in-vehicle terminals.
[0064] In some embodiments, server 200 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. Terminals and servers can be connected directly or indirectly via wired or wireless communication, which is not limited in this embodiment.
[0065] Referring to Figure 2, which is a schematic diagram of the structure of an electronic device 400 provided in an embodiment of this application, the electronic device 400 shown in Figure 2 includes: at least one processor 410, a memory 450, at least one network interface 420, and a user interface 430. The various components in the electronic device 400 are coupled together through a bus system 440. It is understood that the bus system 440 is used to realize the connection and communication between these components. In addition to a data bus, the bus system 440 also includes a power bus, a control bus, and a status signal bus. However, for clarity, all buses are labeled as bus system 440 in Figure 2.
[0066] The processor 410 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor, etc.
[0067] User interface 430 includes one or more output devices 431 that enable the presentation of media content, including one or more speakers and / or one or more visual displays. User interface 430 also includes one or more input devices 432, including user interface components that facilitate user input, such as a keyboard, mouse, microphone, touch screen display, camera, other input buttons and controls.
[0068] The memory 450 may be removable, non-removable, or a combination thereof. Exemplary hardware devices include solid-state storage, hard disk drives, optical disk drives, etc. The memory 450 may optionally include one or more storage devices physically located away from the processor 410.
[0069] The memory 450 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), and the volatile memory may be random access memory (RAM). The memory 450 described in this application embodiment is intended to include any suitable type of memory.
[0070] In some embodiments, memory 450 is capable of storing data to support various operations, examples of which include programs, modules, and data structures or subsets or supersets thereof, as illustrated below.
[0071] Operating system 451 includes system programs for handling various basic system services and performing hardware-related tasks, such as the framework layer, core library layer, driver layer, etc., for implementing various basic business functions and handling hardware-based tasks;
[0072] The network communication module 452 is used to reach other electronic devices via one or more (wired or wireless) network interfaces 420, exemplary network interfaces 420 including: Bluetooth, WiFi, and Universal Serial Bus (USB), etc.
[0073] Presentation module 453 is configured to enable the presentation of information (e.g., a user interface for operating peripheral devices and displaying content and information) via one or more output devices 431 (e.g., a display screen, a speaker, etc.) associated with user interface 430;
[0074] The input processing module 454 is used to detect and translate one or more user inputs or interactions from one or more input devices 432.
[0075] In some embodiments, the region matching device in the environment provided in this application can be implemented in software. Figure 2 shows a region matching device 455 in the environment stored in memory 450. It can be software in the form of programs and plug-ins, including the following software modules: acquisition module 4551, first clustering module 4552, pre-matching module 4553, merging module 4554, and second clustering module 4555. These modules are logically related, and therefore can be arbitrarily combined or further split according to the functions they implement. The functions of each module will be described below.
[0076] In other embodiments, the region matching device in the environment provided in this application embodiment can be implemented in hardware. As an example, the region matching device in the environment provided in this application embodiment can be a processor in the form of a hardware decoding processor, which is programmed to execute the region matching method in the environment provided in this application embodiment. For example, the processor in the form of a hardware decoding processor can be one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), or other electronic components.
[0077] The region matching method in the environment provided in the embodiments of this application will be described below with reference to the accompanying drawings. As mentioned above, the electronic device implementing the region matching method in the environment of the embodiments of this application can be a terminal 401, a server 200, or a combination of the two. Therefore, the executing entity of each step will not be described again below.
[0078] Taking server 200 as the executing entity as an example, the region matching method in the environment of this application embodiment will be described. Referring to FIG3A, FIG3A is a first flowchart of the region matching method in the environment provided in this application embodiment, and the steps shown in FIG3A will be described in conjunction with the steps shown in FIG3A.
[0079] In step 101, the point set data of the target environment is obtained.
[0080] The point set data includes N data points.
[0081] In this embodiment, when the point set data is represented as eye-tracking data or 3D image data, the data points in the point set data have corresponding positional and temporal information. When the point set data is represented as eye-tracking data, the positional information of the data points can be two-dimensional coordinates; when the point set data is represented as 3D image data, the positional information of the data points can be three-dimensional coordinates. When the point set data is represented as 2D image data, the data points can have pixel information or depth information.
[0082] As an example, when the target environment is represented as image or text information on the screen of an electronic device observed by an object from an observation position, the point set data of the target environment can be eye-tracking data collected by an eye tracker when the object observes the screen from the angle of the observation position.
[0083] In some embodiments, step 101 shown in FIG3A can be implemented in the following manner.
[0084] Obtain initial point set data generated for the target environment, wherein the initial point set data includes N initial data points; perform position smoothing processing on the N initial data points in the initial point set data to obtain the point set data.
[0085] When initial point set data (e.g., initial eye-tracking data) for a target environment is collected using hardware devices (such as eye trackers), the initial point set data often contains some jitter due to device accuracy issues. Therefore, after obtaining the initial point set data generated for the target environment, the data points in the initial point set data can be smoothed, i.e., jitter removal processing can be performed on the initial point set data.
[0086] In practice, the position smoothing process of each initial data point can be performed based on the temporal order of the N initial data points in the initial point set data, thereby obtaining the position smoothed point set data.
[0087] In some embodiments, the above-mentioned "performing positional smoothing processing on N initial data points in the initial point set data to obtain point set data" can be implemented in the following ways.
[0088] Based on the temporal information of each initial data point, N initial data points are sorted. For each initial data point, the following processing is performed: Based on the sorting result, R surrounding data points associated with the initial data point are determined, where the temporal difference between the surrounding data points and the initial data point is less than a preset threshold; n surrounding data points that have completed position smoothing and m surrounding data points that have not completed position smoothing are determined from the R surrounding data points, where R, m, and n are all integers, and m = Rn; the first initial position information of the initial data point, the second initial position information of the m surrounding data points, and the first updated position information of the n surrounding data points are obtained; based on the first initial position information, the second initial position information of the m surrounding data points, and the first updated position information of the n surrounding data points, position smoothing processing is performed on the initial data point to obtain the second updated position information of the initial data point; the second updated position information of each initial data point in the initial point set data is used as the position information of each data point in the point set data.
[0089] Specifically, the temporal difference between the surrounding data points and the initial data point is less than a preset threshold. In actual implementation, the preset threshold can be set based on the actual smoothing requirements. If a large number of surrounding data points are needed to smooth the position of the current initial data point, the preset threshold can be set relatively large. Conversely, if a large number of surrounding data points are not needed to smooth the position of the current initial data point, the preset threshold can be set relatively small.
[0090] As an example, if it is necessary to use 5 surrounding data points to smooth the position of the initial data point, the preset threshold can be set to 6. If the initial point set data includes 100 initial data points, for the initial data point with time series number 10, any 5 data points with time series numbers 5-15 can be used as the surrounding data points of the initial data point with time series number 10.
[0091] In some embodiments, determining the R surrounding data points associated with the initial data point based on the sorting result may include the following cases: when the time sequence number of the initial data point is greater than a first specified sequence number, based on the sorting result, determine the R surrounding data points that are adjacent to the initial data point and located before the initial data point; when the time sequence number of the initial data point is greater than a second specified sequence number and less than or equal to the first specified sequence number, based on the sorting result, determine the n surrounding data points that are adjacent to the initial data point and located before the initial data point, and the m surrounding data points that are adjacent to the initial data point and located after the initial data point; when the time sequence number of the initial data point is equal to the second specified sequence number, based on the sorting result, determine the R surrounding data points that are adjacent to the initial data point and located after the initial data point.
[0092] In practical implementation, based on the sorting results, the initial data points can be smoothed in ascending order of their time sequence numbers. Since the position information of the initial data points after smoothing is more consistent with their actual positions, when selecting R surrounding data points for the current initial data point, data points with time sequence numbers preceding the current initial data point should be used as much as possible. However, when the initial data point is relatively early in the time sequence (i.e., when its time sequence number is relatively small), there may be fewer than R surrounding data points preceding the initial data point. Therefore, in this case, surrounding data points following the initial data point can also be selected. Accordingly, this application embodiment sets a first designated sequence number and a second designated sequence number. The determination of the R surrounding data points of the initial data point is based on the relationship between the time sequence number of the initial data point and the first and second designated sequence numbers. The second designated sequence number is typically the minimum value of the time sequence numbers of the N initial data points, and the first designated sequence number can be set according to the aforementioned preset threshold.
[0093] As an example, if we need to use three surrounding data points to smooth the position of the initial data point, we can set a preset threshold of 4. That is, the difference between the time sequence number of the surrounding data points and the time sequence number of the initial data point should be less than 4. If the N initial data points are sorted temporally so that the time sequence numbers are consecutive positive integers starting from 1, then we can set the first specified sequence number to 3 and the second specified sequence number to 1. Based on the relationship between the time sequence number of the initial data point and the first specified sequence number and the second specified sequence number, the following situations may be included: When the time sequence number of the initial data point is greater than 3, based on the sorting result, three surrounding data points adjacent to and preceding the initial data point can be determined; when the time sequence number of the initial data point is greater than 1 and less than or equal to 3, all surrounding data points adjacent to and preceding the initial data point (i.e., n surrounding data points, and these n surrounding data points have all completed position smoothing) and m surrounding data points adjacent to and following the initial data point (m = 3 - n, these m surrounding data points have not yet undergone position smoothing); when the time sequence number of the initial data point is equal to 1, three surrounding data points adjacent to and following the initial data point can be determined.
[0094] As an example, when the time series number of the initial data point is 6, the three surrounding data points associated with this initial data point can be identified as the three surrounding data points with time series numbers 5, 4, and 3. When the time series number of the initial data point is 3, firstly, the two surrounding data points before this initial data point (i.e., the surrounding data point corresponding to time series number 2 and the surrounding data point corresponding to time series number 1) are identified. Then, the one surrounding data point after this initial data point (i.e., the surrounding data point with time series number 4) is identified. The three surrounding data points with time series numbers 1, 2, and 4 are then identified as the surrounding data points associated with this initial data point. When the time series number of the initial data point is 1, the three surrounding data points with time series numbers 2, 3, and 4 after this initial data point can be identified as the surrounding data points associated with this initial data point.
[0095] After determining the R surrounding data points associated with the current initial data point, determine the n surrounding data points that have completed position smoothing and the m surrounding data points that have not completed position smoothing among the R surrounding data points. Then, use the first updated position information obtained after the n surrounding data points have completed position smoothing, the second initial position information corresponding to the m surrounding data points, and the first initial position information corresponding to the current initial data point to perform position smoothing processing on the current initial data point.
[0096] In some embodiments, the above-mentioned "based on the first initial position information, the second initial position information of m surrounding data points and the first updated position information of n surrounding data points, perform position smoothing processing on the initial data points to obtain the second updated position information of the initial data points" can be implemented in the following way.
[0097] Obtain the first weight corresponding to the first initial position information, the second weight corresponding to the second initial position information of m surrounding data points, and the third weight corresponding to the first updated position information of n surrounding data points, wherein the first weight is greater than the second weight, and the third weight is greater than the second weight; based on the first weight, the second weight, and the third weight, perform weighted summation on the first initial position information, the second initial position information of m surrounding data points, and the first updated position information of n surrounding data points to obtain the second updated position information of the initial data points.
[0098] In practical implementation, when performing position smoothing calculations on initial data points, different weights can be assigned to different data points to improve the accuracy of position smoothing. Specifically, the weights can be maximized for the first initial position information of the initial data point before position smoothing, and for the first updated position information of the n surrounding data points after position smoothing among R related initial data points, the weights are greater than the weights of the second initial position information of the m surrounding data points before position smoothing. Furthermore, the weights of the first updated position information of the surrounding data points whose time sequence is closer to the initial data point among the n surrounding data points are greater. This allows for the assignment of corresponding weights to the first initial position information, the second initial position information of the m surrounding data points, and the first updated position information of the n surrounding data points. The first initial position information is assigned a first weight, the second initial position information of the m surrounding data points is assigned a second weight, and the first updated position information of the n surrounding data points is assigned a third weight, with the first weight being greater than the second weight, and the third weight being greater than the second weight.
[0099] As an example, when performing position smoothing on the initial data point with time sequence number 2, the three surrounding data points associated with this initial data point are determined to be the surrounding data points with time sequence numbers 1, 3, and 4. The surrounding data point with time sequence number 1 has already undergone position smoothing, while the two surrounding data points with time sequence numbers 3 and 4 have not yet undergone position smoothing. The first initial position information corresponding to the initial data point, the second initial position information of the surrounding data points with time sequence number 3 and 4, and the first updated position information corresponding to the surrounding data point with time sequence number 1 are obtained. Subsequently, the first initial position information of the initial data point is assigned a maximum weight of 0.4 (first weight), and the first updated position information of the surrounding data points with time series number 1 is assigned a weight of 0.3 (third weight). Since the surrounding data point with time series number 3 is closer to the initial data point than the surrounding data point with time series number 4, the second initial position information of the surrounding data point with time series number 3 is assigned a weight of 0.2, and the second initial position information of the surrounding data point with time series number 4 is assigned a weight of 0.1. The weights corresponding to the two second initial position information are called the second weights. Overall, the first weight is greater than the second weight, and the third weight is greater than the second weight.
[0100] In some embodiments, the above-mentioned "weighted summation of the first initial position information, the second initial position information of m surrounding data points, and the first updated position information of n surrounding data points based on the first weight, the second weight, and the third weight to obtain the second updated position information of the initial data points" can be implemented in the following way.
[0101] Determine the first product value between the first initial position information and the first weight, the second product value between the second initial position information and the corresponding second weight, and the third product value between the first updated position information and the corresponding third weight; based on the sum of the first product value, the second product value, and the third product value, determine the second updated position information of the initial data point after position smoothing.
[0102] As an example, the initial data set includes N = 100 initial data points. After sorting these 100 initial data points according to their time series information, the time series numbers of the sorted initial data points are 1-100. The preset threshold is set to 4, the first specified number is 3, the second specified number is 1, and three surrounding data points are needed to smooth the position of the initial data points. The initial data points can be smoothed in ascending order of their time series numbers.
[0103] For the initial data point with time sequence number n=1 (i.e., the initial data point of the first frame), the first initial position information of the initial data point of the first frame before the update (i.e., before position smoothing), the second initial position information of the initial data point of the second frame (i.e., the surrounding data points with time sequence number 2) before the update, the second initial position information of the initial data point of the third frame (i.e., the surrounding data points with time sequence number 3) before the update, and the second initial position information of the initial data point of the fourth frame (i.e., the surrounding data points with time sequence number 4) before the update are weighted and summed. The initial data point of the first frame is then smoothed using future data. Specifically, the second updated position information of the initial data point of the first frame can be calculated using the following formula:
[0104] In the formula, P represents an initial data point. The subscript of P indicates the time series number of this initial data point, and the superscript of P indicates whether the data used is the data before or after the update (i.e., the data before or after position smoothing). If marked "new", it indicates the data after the update; if marked "old", it indicates the data before the update. This represents the second update position information for the initial data point with time sequence number 1. This represents the first initial position information (corresponding to a first weight of 0.4) for the initial data point with time series number 1. This represents the second initial position information (corresponding to a second weight of 0.3) for the initial data point with time series number 2. This represents the second initial position information (corresponding to a second weight of 0.2) for the initial data point with time series number 3. This represents the second initial position information of the initial data point with time sequence number 4 (the corresponding second weight is 0.1).
[0105] For the initial data point with time sequence number n=2 (i.e., the initial data point of the 2nd frame), the second updated position information of the initial data point of the 2nd frame after the update is obtained by weighted summing the first initial position information of the initial data point of the 2nd frame before the update, the first updated position information of the initial data point of the 1st frame after the update, the second initial position information of the initial data point of the 3rd frame before the update, and the second initial position information of the initial data point of the 4th frame before the update. The position of the initial data point of the 2nd frame is then smoothed using future and previous data. Specifically, the second updated position information of the initial data point of the 2nd frame can be calculated using the following formula:
[0106] in, This indicates the second update position information for the initial data point with time sequence number 2. This represents the first update position information for the initial data point with time series index 1 (corresponding to a third weight of 0.3). This represents the first initial position information (corresponding to a first weight of 0.4) for the initial data point with time series number 2. This represents the second initial position information (corresponding to a second weight of 0.2) for the initial data point with time series number 3. This represents the second initial position information of the initial data point with time sequence number 4 (the corresponding second weight is 0.1).
[0107] For the initial data point with time sequence number n=3 (i.e., the initial data point of the 3rd frame), the second updated position information of the initial data point of the 3rd frame after the update is obtained by weighted summation using the first updated position information of the initial data point of the 1st frame after the update, the first updated position information of the initial data point of the 2nd frame after the update, the first initial position information of the initial data point of the 3rd frame before the update, and the second initial position information of the initial data point of the 4th frame before the update. The position of the initial data point of the 3rd frame is then smoothed using future and previous data. Specifically, the second updated position information of the initial data point of the 3rd frame can be calculated using the following formula:
[0108] in, This indicates the second update position information for the initial data point with time sequence number 3. This represents the first update position information for the initial data point with time series index 1 (corresponding to a third weight of 0.2). This represents the first update position information of the initial data point with time series number 2 (corresponding to a third weight of 0.3). This represents the first initial position information (corresponding to a first weight of 0.4) for the initial data point with time series number 3. This represents the second initial position information of the initial data point with time sequence number 4 (the corresponding second weight is 0.1).
[0109] For initial data points with a time sequence number greater than 3 (n>3), such as initial data points with a time sequence number n=24, the second updated position information of the initial data point in frame 24 after the update is obtained by weighted summing the first updated position information of the initial data point in frame 21, the first updated position information of the initial data point in frame 22, the first updated position information of the initial data point in frame 23, and the first initial position information of the initial data point in frame 24 before the update. The previous data is then used to smooth the position of the initial data point in frame 24. Specifically, the second updated position information of the initial data point in frame 24 can be calculated using the following formula:
[0110] in, This indicates the second update position information for the initial data point with time sequence number 24. This represents the first update position information (corresponding to a third weight of 0.1) for the initial data point with time series number 21. This represents the first update position information (corresponding to a third weight of 0.2) for the initial data point with time series number 22. This represents the first update position information of the initial data point with time series number 23 (corresponding to a third weight of 0.3). This represents the first initial position information of the initial data point with time sequence number 24 (the corresponding first weight is 0.4).
[0111] In addition, since the point set data in this application embodiment has location information, the data points are generally represented by (x, y) coordinate values. Therefore, when actually calculating the updated position information of the initial data points after the second update, the updated value of the x coordinate will be calculated using the relevant data of the x coordinate, and the updated value of the y coordinate will be calculated using the relevant data of the y coordinate.
[0112] After calculating the second updated position information corresponding to each initial data point in the initial point set data in the above manner, the second updated position information of each initial data point in the initial point set data is used as the position information of each data point in the point set data to obtain the point set data.
[0113] Refer to Figure 3A for further explanation following step 101 above.
[0114] In step 102, the N data points are subjected to the first clustering process to obtain M first clustering regions.
[0115] Each first cluster region corresponds to a first cluster center, which is the center of the first cluster region. Each first cluster region contains P data points, where N, M, and P are positive integers, and P ≤ N.
[0116] In some embodiments, step 102 can be implemented in the following ways: using the prior cluster center of the prior clustering region as the initial clustering point, performing a first clustering process on N data points in the point set data to obtain M first clustering regions; or using the number of prior clustering regions as the number of clustering regions, performing a first clustering process on N data points in the point set data to obtain M first clustering regions, where M is equal to the number of prior clustering regions.
[0117] In this embodiment, the prior clustering region is a region pre-labeled for a specified object in the target environment.
[0118] As an example, when the target environment is represented as image or text information on the screen of an electronic device observed by the object from the observation position, and the point set data of the target environment is eye-tracking data collected by an eye tracker when the object observes the screen from the angle of the observation position, the specified object can be image or text information on the screen.
[0119] As an example, referring to Figure 4A, Figure 4A shows an image displayed on the screen of an electronic device to an observed object, including designated object 501, designated object 502, designated object 503, and designated object 504. Prior clustering regions are pre-labeled for the four designated objects in the image shown in Figure 4A. Referring to Figure 4B, the prior clustering regions are represented by rectangular areas. In the image, four rectangular areas are used to mark the positions of the four designated objects: prior clustering region 5011 corresponds to the position of designated object 501 in the image shown in Figure 4A, prior clustering region 5021 corresponds to the position of designated object 502 in the image, prior clustering region 5031 corresponds to the position of designated object 503 in the image, and prior clustering region 5041 corresponds to the position of designated object 504 in the image.
[0120] As an example, referring to Figure 5A, Figure 5A shows the initial eye-tracking data (i.e., initial point set data) when the observer looks at the image shown in Figure 4A. As can be seen from Figure 5A, the observer viewed the specified object 503, but the acquired initial eye-tracking data is generally shifted upwards, resulting in some eye-tracking data points located outside the prior clustering region 5031. Using the positional smoothing processing method described in the above embodiment, the initial eye-tracking data points in Figure 5A are smoothed to obtain the smoothed eye-tracking data (equivalent to point set data) shown in Figure 5B. Compared to Figure 5A, the jitter in the eye-tracking data in Figure 5B is significantly reduced, and the eye-tracking trajectory can be clearly seen. However, as can be seen from Figure 5B, the smoothed eye-tracking data still has a positional shift relative to the prior clustering region 5031. Therefore, in order to match the data points in the eye-tracking data with the corresponding prior clustering regions, a first clustering process can be performed on the N data points in the eye-tracking data to obtain M first clustering regions, each containing P eye-tracking data points. Then, position matching is performed between the first cluster region and the prior cluster region.
[0121] As an example, since the purpose of clustering the point set data is to match it with the prior cluster regions, the prior cluster center of the prior cluster region can be directly used as the initial point of the first clustering process. The first clustering process is performed on N data points in the point set data to obtain M first cluster regions. Here, the number of first cluster regions is usually equal to the number of prior cluster regions.
[0122] As an example, the number of prior cluster regions can also be used as the number of cluster regions, so that after performing the first clustering process on N data points in the point set data, the number of first cluster regions is equal to the number of prior cluster regions.
[0123] As an example, it is also possible to perform random clustering on the point set data without specifying the number of cluster regions or the initial clustering point for the first clustering process. Given the distance conditions required for clustering, M first cluster regions can be obtained by random clustering. In this case, M is a random value.
[0124] In step 103, a second cluster region matching the pre-labeled prior cluster region is determined from the M first cluster regions.
[0125] In some embodiments, referring to FIG3B, step 103 can be implemented by the following steps 1031 to 1032:
[0126] In step 1031, the distance between the prior cluster center of the prior cluster region and each first cluster center is determined.
[0127] In step 1032, the first cluster region with the smallest distance is selected from the M first cluster regions, and the selected first cluster region with the smallest distance is used as the second cluster region that matches the prior cluster region.
[0128] In the embodiments of this application, the prior cluster center is the center of the prior cluster region.
[0129] In practice, the first cluster region can be pre-matched to the prior cluster region based on the distance between the prior cluster center and the first cluster center. Specifically, the prior cluster center corresponding to each prior cluster region and the first cluster center corresponding to each first cluster region are determined; the distance between the prior cluster center and the first cluster center is determined; the first cluster center with the smallest distance from the prior cluster center is determined; and the first cluster region corresponding to the first cluster center with the smallest distance is used as the second cluster region matched with the prior cluster center.
[0130] Referring to Figure 6A, Figure 6A shows the four prior cluster regions corresponding to those in Figure 5B, and the prior cluster centers corresponding to the four prior cluster regions (i.e., prior cluster center 1, prior cluster center 2, prior cluster center 3, and prior cluster center 4), as well as the four first cluster regions corresponding to the eye-tracking data shown in Figure 5B, and the first cluster centers corresponding to the four first cluster regions (i.e., first cluster center A, first cluster center B, first cluster center C, and first cluster center D). To facilitate the determination of the distance between the first cluster centers and the prior cluster centers, the eye-tracking data is not shown in Figure 6A.
[0131] As an example, for any prior clustering region, the distance between the prior cluster center and each first cluster center can be determined, and the first clustering region corresponding to the first cluster center with the smallest distance can be determined as the second clustering region of the prior clustering region. For example, for prior clustering region 5011, the first distance between prior cluster center 1 and first cluster center A, the second distance between prior cluster center 1 and first cluster center B, the third distance between prior cluster center 1 and first cluster center C, and the fourth distance between prior cluster center 1 and first cluster center D can be determined respectively. The relationship between the first, second, third, and fourth distances can be judged, and the first cluster center A corresponding to the first distance with the smallest distance to prior cluster center 1 can be determined. The first clustering region corresponding to first cluster center A can then be taken as the second clustering region corresponding to prior clustering region 5011. Similarly, for prior cluster region 5021, based on the distance between the prior cluster region and all first cluster centers, second cluster regions corresponding to prior cluster region 5021 are determined among the four first cluster regions. The same applies to prior cluster regions 5031 and 5041, which will not be elaborated here.
[0132] As an example, after determining the first cluster center corresponding to the first cluster region, the first cluster center can be matched with the prior cluster centers. Then, the optimal matching combination with the smallest sum of distances between the first cluster center and the prior cluster centers is determined in each matching combination. Based on the correspondence between the first cluster center and the prior cluster centers in the optimal matching combination, the second cluster region corresponding to each prior cluster region is determined. For example, for prior cluster center 1, there are four first cluster centers that can be matched with it. If prior cluster center 1 is matched with first cluster center A, then prior cluster center 2 can be matched with the other three first cluster centers besides first cluster center A. If prior cluster center 2 is matched with first cluster center B, then prior cluster center 3 can be matched with the other two first cluster centers besides first cluster center A and first cluster center B. If prior cluster center 3 is matched with first cluster center C, then prior cluster center 4 can only be matched with first cluster center D. Using the above matching method, n matching combinations can be obtained, where n = 4 * 3 * 2 * 1. For each matching combination, calculate the sum of distances between the four prior cluster centers and the first cluster center, determine the optimal matching combination with the smallest sum of distances, and determine the second cluster region matching each prior cluster region based on the correspondence in the optimal matching combination.
[0133] Refer to Figure 3A for further explanation following step 103 above.
[0134] In step 104, at least one first cluster region is merged with the second cluster region to obtain a third cluster region that matches the prior cluster region.
[0135] In some cases, if the number of M first cluster regions obtained during the first clustering process of the point set data exceeds the number of prior cluster regions, there may be a situation where the prior cluster regions or the expanded prior cluster regions contain multiple first cluster centers. In this case, in order to accurately determine the data points that match the prior cluster regions, a merging operation is required.
[0136] In some embodiments, referring to FIG3C, step 104 can be implemented by steps 1041 to 1043.
[0137] In step 1041, based on the first position deviation threshold corresponding to the target environment, the range of the prior clustering region is expanded to obtain the expanded first prior clustering region.
[0138] In this embodiment of the application, due to reasons such as hardware devices or software algorithms, there is a certain data offset between the initial point set data collected for the target environment and the objects in the target environment. Therefore, a first position deviation threshold can be determined based on the empirical deviation amount obtained from historical experience data, and the prior clustering region can be adjusted based on the first position deviation threshold. Then, a third clustering region matching the prior clustering region can be re-determined based on the adjusted prior clustering region.
[0139] As an example, if the prior clustering region is represented by a polygon, the side length of the prior clustering region can be increased by a first position deviation threshold; if the prior clustering region is represented by a circle, the radius or diameter of the prior clustering region can be increased by the first position deviation threshold. The specific expansion method can be determined based on the display format of the prior clustering region, and is not further limited.
[0140] As an example, please refer to Figure 6B, which shows the first prior cluster region after expanding the four prior cluster regions corresponding to those in Figure 6A. The dashed lines represent the boundaries of the expanded first prior cluster region.
[0141] In step 1042, cluster center detection is performed on the expanded first prior cluster region to obtain the first detection result.
[0142] After expanding each prior cluster region based on the first position deviation threshold, cluster center detection is performed on the expanded first prior cluster region, that is, to detect whether the first cluster center corresponding to each first cluster region falls within the range of the expanded first prior cluster region, and the first detection result is obtained.
[0143] In step 1043, when the first detection result indicates that the expanded first prior clustering region includes at least one other clustering center and a second clustering center, the first clustering region corresponding to at least one other clustering center is merged with the second clustering region to obtain a third clustering region that matches the prior clustering region.
[0144] Among them, other cluster centers are the cluster centers other than the second cluster center among the first cluster centers corresponding to the M first cluster regions. The second cluster center is the center of the second cluster region.
[0145] As an example, refer to Figure 7A. Figure 7A shows three pre-labeled prior clustering regions for a specified object, and shows M first clustering regions obtained after performing the first clustering process on the point set data, where M=7. In Figure 7A, first clustering region b is the second clustering region corresponding to prior clustering region 601, first clustering region d is the second clustering region corresponding to prior clustering region 602, and first clustering region g is the second clustering region corresponding to prior clustering region 603. If the first positional deviation threshold is determined to be 2 cm based on empirical deviation, the side length of each prior clustering region can be increased by 2 cm to expand each prior clustering region. Refer to Figure 7B. Figure 7B shows the range of each prior clustering region after expansion based on the first positional deviation threshold. As shown in Figure 7B, after performing cluster center detection on the expanded first prior cluster region, the first detection result indicates that the expanded first prior cluster region 601 includes the second cluster center b and the first cluster center c (i.e., other cluster centers). The second cluster center b is the center of the second cluster region (corresponding to the first cluster region b) corresponding to the prior cluster region 601, and the first cluster center c is the center of the first cluster region c. In this case, the first cluster region c corresponding to the first cluster center c can be merged with the second cluster region corresponding to the second cluster center b to obtain the third cluster region matched by the prior cluster region 601.
[0146] Refer to Figure 3A for further explanation following step 104 above.
[0147] In step 105, the third cluster center of the third clustering region is used as the initial clustering point to perform a second clustering process on the point set data, thereby obtaining a first target clustering region that matches the prior clustering region.
[0148] After determining the third cluster region that matches each prior cluster region, the center of the third cluster region is determined as the third cluster center. Using the third cluster center as the initial clustering point, the point set data is clustered again, i.e., the second clustering process, to obtain the first target cluster region centered on the third cluster center.
[0149] As an example, please refer to Figure 7B. After obtaining the third clustering region for the prior clustering region 601, since the third clustering region includes two clustering regions (the second clustering region b and the first clustering region c), and the center of the third clustering region is located outside the two clustering regions, it can be seen that some data points located between the two clustering regions may also correspond to some data points of the prior clustering region 601. Therefore, the third clustering center of the third clustering region can be used as the initial point for clustering to perform the second clustering process, and the clustering region centered on the third clustering center can be used as the first target clustering region matching the prior clustering region 601. The data points included in the first target clustering region are the data points that match the prior clustering region 601. In other words, it can be understood that the data points in the first target clustering region are generated for the specified object corresponding to the prior clustering region 601.
[0150] Applying the above embodiments, a first clustering process is performed on the point set data of the target environment to obtain M first clustering regions. Second clustering regions are pre-matched to the pre-defined prior clustering regions for the target environment from these M first clustering regions. The second clustering regions and at least one first clustering region are then merged to obtain a third clustering region matching each prior clustering region. Then, the third cluster center of the third clustering region is used as the initial clustering point to perform a second clustering process on the point set data, thereby obtaining a first target clustering region matching the prior clustering regions. Since this embodiment performs two clustering processes on the point set data, and the second clustering is based on the pre-matching and merging of the clustering regions after the first clustering, the second clustering can obtain more accurate clustering results, making the data points in the same clustering region more correlated. This improves the clustering accuracy of the first target clustering region, thereby improving the matching accuracy between the first target clustering region and the prior clustering region.
[0151] In some embodiments, when the first detection result indicates that the expanded first prior clustering region does not include other cluster centers, the second cluster center of the second clustering region can also be used as the initial point for clustering to perform a second clustering process on the point set data, thereby obtaining a second target clustering region that matches the prior clustering region.
[0152] In practical implementation, please refer to Figure 7B. For the prior clustering region 603, the first detection result of the expanded first prior clustering region indicates that the expanded first prior clustering region only includes the second cluster center g, and does not include other cluster centers besides the second cluster center g. In this case, the second cluster center g can be directly used as the initial point for clustering, and the second clustering process can be performed to obtain the second target clustering region that matches the prior clustering region. The data points included in the second target clustering region are the data points that match the prior clustering region 603. In this case, the second clustering region corresponding to the prior clustering region can be regarded as the third clustering region of the prior clustering region.
[0153] In some embodiments, when the first detection result indicates that the second cluster center of the second cluster region is outside the range of the expanded first prior cluster region, the matching relationship between the second cluster region and the prior cluster region can also be cancelled.
[0154] In actual implementation, please refer to Figure 7B. For the prior cluster region 602, if the first detection result of the expanded first prior cluster region indicates that the second cluster center d of the second cluster region d that matches the prior cluster region 602 is outside the range of the expanded first prior cluster region, it means that the offset between the second cluster region d and the prior cluster region 602 has exceeded the empirical offset amount. The data points in the second cluster region d are not generated for the specified object corresponding to the prior cluster region 602. In this case, the matching relationship between the second cluster region d and the prior cluster region 602 can be directly cancelled.
[0155] In some embodiments, after expanding each prior clustering region based on a first position deviation threshold, cluster center detection is performed on the expanded first prior clustering region to obtain a first detection result. Based on the first detection result, it is determined whether the second clustering region corresponding to each prior clustering region needs to be processed by canceling matching relationships, merging, or retaining. According to the processing procedure when the first detection result indicates different results in the above embodiments, a third clustering region corresponding to each prior clustering region is obtained. The third cluster center of the third clustering region is used as the initial point for the second clustering process. The point set data is then subjected to the second clustering process to obtain the target clustering region (first target clustering region and second target clustering region) corresponding to each prior clustering region.
[0156] In some embodiments, after performing a second clustering process on the point set data, a secondary merging process of the clustered regions can be performed in the following manner, which is described in detail below.
[0157] The process involves: acquiring intermediate clustering regions obtained by performing a second clustering process on the point set data; expanding the scope of the prior clustering regions based on a second positional deviation threshold corresponding to the target environment to obtain an expanded second prior clustering region; performing cluster center detection on the expanded second prior clustering region to obtain a second detection result; merging the multiple intermediate clustering regions when the second detection result indicates that the expanded second prior clustering region includes the intermediate cluster centers of multiple intermediate clustering regions to obtain a merged clustering region; and determining a first target clustering region that matches the prior clustering region based on the merged clustering region. The second positional deviation threshold is greater than a first positional deviation threshold, which is the positional deviation threshold used when merging at least one first clustering region with the second clustering region.
[0158] In practice, during the second clustering process of the point set data, due to the clustering of data points in the point set, there may be other cluster centers besides the third cluster center. Therefore, intermediate clustering regions obtained from the second clustering process of the point set data can be obtained and merged.
[0159] Specifically, a second position deviation threshold is determined. This second position deviation threshold is greater than the first position deviation threshold because the second cluster region has already undergone a merging process. The range of the intermediate cluster regions obtained during the second clustering process is relatively larger than the range of the second cluster region, or the positions of the intermediate cluster centers of the intermediate cluster regions are relatively farther away from the prior cluster centers. The prior cluster region is expanded using the second position deviation threshold to obtain the expanded second prior cluster region corresponding to the prior cluster region. Similarly, cluster center detection is performed on the expanded second prior cluster region to obtain a second detection result. If the second detection result indicates that the expanded second prior cluster region includes the intermediate cluster centers of multiple intermediate cluster regions, the multiple intermediate cluster regions are merged to obtain a merged cluster region. Here, the merged cluster region can be directly used as the first target cluster region for matching the prior cluster region, or the fourth cluster center of the merged cluster region can be used as the initial clustering point to perform iterative clustering processing on the point set data until the iterative clustering termination condition is met, thus obtaining the first target cluster region of the prior cluster region.
[0160] In some embodiments, the above-mentioned "determining a first target clustering region that matches the prior clustering region based on the merged clustering region" can be achieved in the following ways.
[0161] Using the fourth cluster center of the merged cluster region as the initial clustering point, iterative clustering processing is performed on the point set data to obtain the first target cluster region that matches the prior cluster region.
[0162] The iterative clustering termination condition for iterative clustering processing includes at least one of the following: the number of clusterings reaches a preset number, the repetition rate of data points in the cluster region obtained in this clustering and the data points in the cluster region obtained in the previous clustering reaches a preset repetition rate, and the positional deviation between the cluster center of the cluster region obtained in this clustering and the cluster center of the cluster region obtained in the previous clustering is less than a preset deviation.
[0163] The fourth cluster center is the center of the merged cluster region. During the iterative clustering process of the point set data, the cluster center of the cluster region obtained in this clustering can be used as the initial point for the next clustering process until the iterative clustering termination condition is met. The cluster region obtained in the last clustering is then used as the first target cluster region for matching the prior cluster region.
[0164] As an example, referring to Figure 8, Figure 8 is a schematic diagram of the target cluster regions obtained after performing the first and second clustering processes on the point set data shown in Figure 5B. The target cluster regions include the first target cluster region and the second target cluster region. In Figure 8, prior cluster region 5011 matches target cluster region 1, prior cluster region 5021 matches target cluster region 2, prior cluster region 5031 matches target cluster region 3, and prior cluster region 5041 matches target cluster region 4.
[0165] In one specific embodiment, in order to address the impact of random directional shifts in eye-tracking data collected by the eye tracker within a small range near the expected location, this embodiment of the application can use the aforementioned region matching method to cluster and match the eye-tracking data, thereby reducing the negative impact of data shifts and improving the matching accuracy between eye-tracking data and the expected location.
[0166] As shown in Figure 9, the eye tracker is positioned below the screen and tilted upwards to capture images of the human eye. The eye tracker then determines the position of the eye on the screen by observing the view. However, due to limitations in the eye tracker's accuracy, the eye position (eye movement data) acquired by the tracker may deviate from the actual viewing position.
[0167] Taking Figure 4A as an example, assuming the screen shown in Figure 9 displays the image shown in Figure 4A, the positions and sizes of the four objects (designated objects) in Figure 4A are known. When the human eye views the screen for a period of time, an eye tracker can obtain data on the points (eye movement data) at certain locations on the screen that the human eye has viewed. For example, if the eye tracker has a frame rate of 120Hz, and does not consider the eye moving out of the screen range, the eye tracker will obtain 120 data points per second. Furthermore, as the human eye moves over a period of time, a series of moving data points will be obtained, resulting in the initial eye movement data shown in Figure 5A.
[0168] As can be easily seen from Figure 5A, although the human eye viewed the object in the lower left corner of Figure 4A on the screen, the acquired eye movement data was generally shifted upwards, and the eye movement data in the lower right corner also exhibited some random jitter and shift, falling outside the expected prior clustering region 5041. This indicates a data offset between the actual initial eye movement data collected and the expected data distribution.
[0169] To determine which data points in Figure 5A were generated by the human eye viewing objects within the corresponding prior clustering regions, it is necessary to perform clustering and region matching on this initial set of points, which contains jitter and random offsets.
[0170] First, the initial point set data can be de-jittered, that is, the position can be smoothed.
[0171] As an example, eye-tracking data captured by an eye tracker within a specified time period can be acquired. For eye-tracking data with temporal information, the data points are arranged in chronological order, and multiple frames of smoothing are used to remove jitter from the data points. The idea is to use the R surrounding data points of each frame's data point for position smoothing. This involves using the first initial position information of the current frame's initial data point before the update, the first updated position information of the n surrounding data points that have completed position smoothing out of the R surrounding data points, and the second initial position information of the m surrounding data points that have not completed position smoothing out of the R surrounding data points. Each position information is assigned a corresponding weight, and the position smoothing of the current frame's initial data point is performed by weighted summation. The second updated position information of the current frame's initial data point after position smoothing is then calculated.
[0172] This approach assigns maximum weight to the data before the update at the initial data point of the current frame, and greater weight to the updated data among the R surrounding data points, with weights increasing for data points closer to the initial data point of the current frame. This method addresses the issues of initial data value jitter and subsequent significant jitter. The weight coefficients and the number of surrounding frames used are adjustable. Specifically, the weights can be assigned to the first initial position information, the second initial position information of the m surrounding data points, and the first updated position information of the n surrounding data points after position smoothing, by using the following method: the weight of the first initial position information of the current frame initial data point before position smoothing is the largest; among the R related initial data points, the weight of the first updated position information of the n surrounding data points after position smoothing is greater than the weight of the second initial position information of the m surrounding data points before position smoothing; and among the n surrounding data points, the weight of the first updated position information of the surrounding data points whose time sequence is closer to the current frame initial data point is greater. This allows for the assignment of corresponding weights to the first initial position information, the second initial position information of the m surrounding data points to the second initial position information, and the first updated position information of the n surrounding data points to the first updated position information. The first weight is greater than the second weight, and the third weight is greater than the second weight.
[0173] As an example, the second updated position information of the initial data point in the current frame after position smoothing is calculated using the following formula. In the formula, P represents an initial data point. The lower right subscript of P indicates the time sequence number of this initial data point, and the upper right subscript of P indicates whether the data used is the data before or after the update (i.e., the data before or after position smoothing). If marked "new", it indicates the data after the update; if marked "old", it indicates the data before the update.
[0174] When the timing sequence number of the initial data point of the current frame is greater than 3, for example, when the initial data point of the current frame is the initial data point of the 24th frame, the second update position information of the initial data point of the 24th frame is calculated using the following formula:
[0175] in, This indicates the second update position information for the initial data point with time sequence number 24. This represents the first update position information (corresponding to a third weight of 0.1) for the initial data point with time series number 21. This represents the first update position information (corresponding to a third weight of 0.2) for the initial data point with time series number 22. This represents the first update position information of the initial data point with time series number 23 (corresponding to a third weight of 0.3). This represents the first initial position information of the initial data point with time sequence number 24 (the corresponding first weight is 0.4).
[0176] The second updated position information of the initial data points in the first frame is calculated using the following formula:
[0177] in, This represents the second update position information for the initial data point with time sequence number 1. This represents the first initial position information (corresponding to a first weight of 0.4) for the initial data point with time series number 1. This represents the second initial position information (corresponding to a second weight of 0.3) for the initial data point with time series number 2. This represents the second initial position information (corresponding to a second weight of 0.2) for the initial data point with time series number 3. This represents the second initial position information of the initial data point with time sequence number 4 (the corresponding second weight is 0.1).
[0178] The second updated position information of the initial data points in the second frame is calculated using the following formula:
[0179] in, This indicates the second update position information for the initial data point with time sequence number 2. This represents the first update position information for the initial data point with time series index 1 (corresponding to a third weight of 0.3). This represents the first initial position information (corresponding to a first weight of 0.4) for the initial data point with time series number 2. This represents the second initial position information (corresponding to a second weight of 0.2) for the initial data point with time series number 3. This represents the second initial position information of the initial data point with time sequence number 4 (the corresponding second weight is 0.1).
[0180] The second updated position information of the initial data points in the third frame is calculated using the following formula:
[0181] in, This indicates the second update position information for the initial data point with time sequence number 3. This represents the first update position information for the initial data point with time series index 1 (corresponding to a third weight of 0.2). This represents the first update position information of the initial data point with time series number 2 (corresponding to a third weight of 0.3). This represents the first initial position information (corresponding to a first weight of 0.4) for the initial data point with time series number 3. This represents the second initial position information of the initial data point with time sequence number 4 (the corresponding second weight is 0.1).
[0182] The initial data points of other frames are used to calculate the second updated position information based on their time sequence number and the corresponding formulas mentioned above. Specifically, each smoothing process can be performed as follows: For the nth frame data, multiple frames of data—such as the data before the nth update, the data after the (n-1)th update, the data after the (n-2)th update, and the data after the (n-3)th update—can be combined with different weights. This uses past data for weighted combination. However, for the initial data update, future data is used for different weighted combinations. This reduces the likelihood of poor jitter reduction when the initial data points deviate significantly from the smoothed data points.
[0183] Referring to Figure 5B, which shows the eye-tracking data after positional smoothing of the initial eye-tracking data in Figure 5A, the eye-tracking data, even after removing jitter, still has a positional offset relative to the prior clustering region of the actually viewed object. Therefore, all eye-tracking data can be clustered to obtain the aggregation points of the eye-tracking data distribution.
[0184] Using four pre-defined prior clustering regions for the four specified objects shown in Figure 4A, ideally, most eye-tracking data points will cluster into the four regions corresponding to the prior clustering regions; that is, the ideal number of clustering regions is known. Clustering algorithms such as K-means, K-means++, and Gaussian mixture models can be used to cluster all eye-tracking data points. Depending on the actual clustering situation, clustering can be performed using the centroids of the prior clustering regions as the initial clustering points, or the number of clustering regions can be given to cluster all eye-tracking data points, resulting in four first cluster centroids (corresponding to four first clustering regions).
[0185] As shown in Figure 6A, the prior cluster centers corresponding to each prior clustering region and the first cluster centers corresponding to each first clustering region are determined. The distance from the current prior cluster center to any first cluster center, and the distance from the next current prior cluster center to the other remaining first cluster centers are calculated. A first cluster center is matched for each prior cluster center, and the distance between the matched first cluster center and the prior cluster center is calculated. For example, for prior cluster center 1, there are four first cluster centers that can be matched for it. If the first cluster center A is matched for prior cluster center 1, then the first cluster centers that can be matched for prior cluster center 2 are the other three first cluster centers besides first cluster center A. If the first cluster center B is matched for prior cluster center 2, then the first cluster centers that can be matched for prior cluster center 3 are the other two first cluster centers besides first cluster center A and first cluster center B. If the first cluster center C is matched for prior cluster center 3, then prior cluster center 4 can only be matched for first cluster center D. Using the above matching method, n matching combinations can be obtained, where n = 4 * 3 * 2 * 1. For each matching combination, calculate the sum of distances between the four prior cluster centers and the first cluster center, determine the optimal matching combination with the smallest sum of distances, and match the corresponding first cluster region to the prior cluster region according to the correspondence in the optimal matching combination, thus obtaining the second cluster region matched by each prior cluster region.
[0186] Then, based on the range of the prior clustering regions and the offset of the eye-tracking data, the first clustering regions matching each prior clustering region are filtered. The offset is an empirical offset determined using historical data from the eye tracker. A suitable first position offset threshold is determined based on the eye tracker's offset, and each prior clustering region is expanded according to this first position offset threshold to obtain the expanded first prior clustering regions. Cluster point detection is then performed on each expanded first prior clustering region to obtain the first detection result.
[0187] Based on the first detection result, determine whether the second cluster center of the second cluster region that matches the prior cluster region is located within the expanded first prior cluster region. Delete any second cluster centers located outside the corresponding expanded first prior cluster region; that is, cancel the matching relationship between the second cluster region corresponding to the second cluster center and the corresponding prior cluster region. Here, if the second cluster center is outside the corresponding expanded first prior cluster region, it means that the distance between the second cluster center and the corresponding prior cluster center is greater than a certain distance threshold. In other words, the actual position offset of the eye-tracking data points in the second cluster region corresponding to the specified object in the prior cluster region is too large, and the eye-tracking data in the second cluster region is not generated for the specified object; therefore, the matching relationship is canceled. In this case, after canceling the matching relationship between the second cluster region and the prior cluster region, all eye-tracking data points in the second cluster region can be deleted and no longer participate in subsequent clustering. Assume that the number of second cluster regions that meet this detection result and have their matching relationship canceled is x.
[0188] Based on the first detection result, the expanded first prior cluster region includes the second cluster center of the corresponding second cluster region and other cluster centers. The other cluster centers are the cluster centers other than the second cluster center among the four first cluster centers corresponding to the first cluster regions. The second cluster region corresponding to the second cluster center is merged with the first cluster regions corresponding to other cluster centers to obtain the third cluster region corresponding to the prior cluster region. The third cluster center of the third cluster region is calculated and its position is saved. Assume that the number of second cluster regions that meet this detection result and are merged is y.
[0189] After the above merging and deletion processes, the cluster centers corresponding to each prior cluster region are determined. These cluster centers fall into two categories: the third cluster center determined after merging, and the second cluster center without any processing. Using the cluster centers corresponding to each prior cluster region as the initial points for secondary clustering, a clustering method with initial points is applied to the eye-tracking data for secondary clustering, resulting in 4-xy intermediate cluster regions. The cluster centers of these intermediate cluster regions will shift slightly around their original positions, with the cluster centers containing merged data being more accurate.
[0190] After determining the second position deviation threshold, the intermediate cluster regions are merged or deleted, similar to the steps described above, but the second position deviation threshold is slightly larger than the first position deviation threshold. After merging or deleting the intermediate cluster regions, the target cluster regions corresponding to each prior cluster region can be obtained directly. Alternatively, iterative clustering can continue until the iterative clustering termination condition is met, yielding the target cluster regions corresponding to each prior cluster region. Referring to Figure 8, which shows the visualization results after two clustering and region adjustments of the eye-tracking data, the rectangles represent the prior cluster regions, the expected regions for the specified objects; the circular regions represent the target cluster regions, the actual regions of the eye-tracking data. Based on the matching results determined above, accurate matching between asymmetrical regions is achieved even with eye-tracking data offset.
[0191] The following continues to describe an exemplary structure of the implementation of the region matching device 455 in the environment provided in the embodiments of this application as a software module. In some embodiments, as shown in FIG2, the software module stored in the region matching device 455 in the environment in the memory 440 may include:
[0192] The acquisition module 4551 is used to acquire point set data of the target environment, wherein the point set data includes N data points.
[0193] The first clustering module 4552 is used to perform first clustering processing on N data points to obtain M first clustering regions. Each first clustering region corresponds to a first cluster center, and each first clustering region contains P data points. N, M, and P are positive integers, and P≤N.
[0194] The pre-matching module 4553 is used to determine a second clustering region from M first clustering regions that matches a pre-labeled prior clustering region.
[0195] The merging module 4554 is used to merge at least one first clustering region with a second clustering region to obtain a third clustering region that matches the prior clustering region.
[0196] The second clustering module 4555 is used to perform second clustering processing on the point set data, using the third cluster center of the third clustering region as the initial clustering point, to obtain the first target clustering region that matches the prior clustering region.
[0197] In some embodiments, the first clustering module 4552 is further configured to use the prior cluster center of the prior clustering region as the initial point of clustering to perform a first clustering process on N data points in the point set data to obtain M first clustering regions; or use the number of prior clustering regions as the number of clustering regions to perform a first clustering process on N data points in the point set data to obtain M first clustering regions, where M is equal to the number of prior clustering regions.
[0198] In some embodiments, the pre-matching module 4553 is further configured to determine the distance between the prior cluster center of the prior clustering region and each first cluster center; select the first clustering region with the smallest distance from the M first clustering regions, and use the selected first clustering region with the smallest distance as the second clustering region that matches the prior clustering region.
[0199] In some embodiments, the merging module 4554 is further configured to expand the range of the prior clustering region based on the first position deviation threshold corresponding to the target environment to obtain an expanded first prior clustering region; perform cluster center detection on the expanded first prior clustering region to obtain a first detection result; when the first detection result indicates that the expanded first prior clustering region includes at least one other cluster center and a second cluster center, merge the first clustering region corresponding to at least one other cluster center with the second clustering region to obtain a third clustering region that matches the prior clustering region, wherein the other cluster centers are the cluster centers other than the second cluster center among the first cluster centers corresponding to the M first clustering regions, and the second cluster center is the center of the second clustering region.
[0200] In some embodiments, the region matching device 455 in the environment further includes a third clustering module, which is used to perform a second clustering process on the point set data, using the second clustering center of the second clustering region as the initial point of clustering, when the first detection result indicates that the expanded first prior clustering region does not include other clustering centers, to obtain a second target clustering region that matches the prior clustering region.
[0201] In some embodiments, the region matching device 455 in the environment further includes a matching cancellation module for canceling the matching relationship between the second cluster region and the prior cluster region when the first detection result indicates that the second cluster center of the second cluster region is outside the range of the expanded first prior cluster region.
[0202] In some embodiments, the second clustering module 4555 is further configured to: after performing a second clustering process on the point set data, obtain intermediate clustering regions obtained by performing a second clustering process on the point set data; expand the range of the prior clustering region based on a second position deviation threshold corresponding to the target environment to obtain an expanded second prior clustering region; perform cluster center detection on the expanded second prior clustering region to obtain a second detection result; when the second detection result indicates that the expanded second prior clustering region includes the intermediate cluster centers of multiple intermediate clustering regions, merge the multiple intermediate clustering regions to obtain a merged clustering region; wherein, the second position deviation threshold is greater than the first position deviation threshold, and the first position deviation threshold is the position deviation threshold used when merging at least one first clustering region with the second clustering region; and determine a first target clustering region that matches the prior clustering region based on the merged clustering region.
[0203] In some embodiments, the second clustering module 4555 is further configured to perform iterative clustering processing on the point set data using the fourth cluster center of the merged clustering region as the initial clustering point to obtain a first target clustering region matching the prior clustering region; wherein, the iterative clustering termination condition of the iterative clustering processing includes at least one of the following: the number of clustering reaches a preset number, the repetition rate of the data points included in the clustering region obtained in this clustering and the data points included in the clustering region obtained in the previous clustering reaches a preset repetition rate, and the positional deviation between the cluster center of the clustering region obtained in this clustering and the cluster center of the clustering region obtained in the previous clustering is less than a preset deviation.
[0204] In some embodiments, the acquisition module 4551 is further configured to acquire initial point set data generated for the target environment, wherein the initial point set data includes N initial data points; and to perform position smoothing processing on the N initial data points in the initial point set data to obtain the point set data.
[0205] In some embodiments, the acquisition module 4551 is further configured to sort N initial data points based on the temporal information of each initial data point; for each initial data point, perform the following processing: based on the sorting result, determine R surrounding data points associated with the initial data point, wherein the temporal difference between the surrounding data points and the initial data point is less than a preset threshold; determine n surrounding data points that have completed position smoothing and m surrounding data points that have not completed position smoothing among the R surrounding data points, wherein R, m, and n are all integers, and m = Rn; acquire the first initial position information of the initial data point, the second initial position information of the m surrounding data points, and the first updated position information of the n surrounding data points; perform position smoothing processing on the initial data point based on the first initial position information, the second initial position information of the m surrounding data points, and the first updated position information of the n surrounding data points to obtain the second updated position information of the initial data point; and use the second updated position information of each initial data point in the initial point set data as the position information of each data point in the point set data.
[0206] In some embodiments, the acquisition module 4551 is further configured to: when the time sequence number of the initial data point is greater than the first specified sequence number, determine, based on the sorting result, R surrounding data points adjacent to and preceding the initial data point; when the time sequence number of the initial data point is greater than the second specified sequence number and less than or equal to the first specified sequence number, determine, based on the sorting result, n surrounding data points adjacent to and preceding the initial data point, and m surrounding data points adjacent to and following the initial data point; when the time sequence number of the initial data point is equal to the second specified sequence number, determine, based on the sorting result, R surrounding data points adjacent to and following the initial data point.
[0207] In some embodiments, the acquisition module 4551 is further configured to acquire a first weight corresponding to the first initial position information, a second weight corresponding to the second initial position information of m surrounding data points, and a third weight corresponding to the first updated position information of n surrounding data points, wherein the first weight is greater than the second weight, and the third weight is greater than the second weight; based on the first weight, the second weight, and the third weight, the first initial position information, the second initial position information of m surrounding data points, and the first updated position information of n surrounding data points are weighted and summed to obtain the second updated position information of the initial data points.
[0208] This application provides a computer program product including a computer program or computer-executable instructions stored in a computer-readable storage medium. The processor of an electronic device 400 reads the computer-executable instructions from the computer-readable storage medium and executes the computer-executable instructions, causing the electronic device 400 to perform the region matching method described above in this application embodiment.
[0209] This application provides a computer-readable storage medium storing computer-executable instructions or computer programs. When the computer-executable instructions or computer programs are executed by a processor, the processor will execute the region matching method in the environment provided in this application, for example, the region matching method in the environment shown in FIG3A.
[0210] In some embodiments, the computer-readable storage medium may be a memory such as RAM, ROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or it may be a variety of devices including one or any combination of the above-mentioned memories.
[0211] In some embodiments, computer-executable instructions may take the form of programs, software, software modules, scripts, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as stand-alone programs or as modules, components, subroutines, or other units suitable for use in a computing environment.
[0212] As an example, computer-executable instructions may, but do not necessarily, correspond to files in a file system. They may be stored as part of a file that holds other programs or data, for example, in one or more scripts in a Hyper Text Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple co-located files (e.g., files that store one or more modules, subroutines, or code sections).
[0213] As an example, computer-executable instructions can be deployed to execute on a single electronic device, or on multiple electronic devices located in one location, or on multiple electronic devices distributed across multiple locations and interconnected via a communication network.
[0214] Applying the above embodiments, a first clustering process is performed on the point set data of the target environment to obtain M first clustering regions. Second clustering regions are pre-matched to the pre-defined prior clustering regions for the target environment from these M first clustering regions. The second clustering regions and at least one first clustering region are then merged to obtain a third clustering region matching each prior clustering region. Then, the third cluster center of the third clustering region is used as the initial clustering point to perform a second clustering process on the point set data, thereby obtaining a first target clustering region matching the prior clustering regions. Since this embodiment performs two clustering processes on the point set data, and the second clustering is based on the pre-matching and merging of the clustering regions after the first clustering, the second clustering can obtain more accurate clustering results, making the data points in the same clustering region more correlated. This improves the clustering accuracy of the first target clustering region, thereby improving the matching accuracy between the first target clustering region and the prior clustering region.
[0215] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, and improvements made within the spirit and scope of this application are included within the scope of protection of this application.
Claims
1. A method of area matching in an environment, characterized by, The method comprises: acquiring point set data of a target environment, wherein the point set data comprises N data points; performing first clustering processing on the N data points to obtain M first clustering regions, wherein each first clustering region corresponds to a first clustering center, and each first clustering region comprises P data points, N, M and P are positive integers, and P≤N; determining a second clustering region matched with a prior clustering region from the M first clustering regions; merging at least one first clustering region and the second clustering region to obtain a third clustering region matched with the prior clustering region; taking a third clustering center of the third clustering region as a clustering initial point to perform second clustering processing on the point set data to obtain a first target clustering region matched with the prior clustering region.
2. The method of claim 1, wherein, The first clustering processing on the N data points to obtain M first clustering regions comprises: taking a prior clustering center of the prior clustering region as a clustering initial point to perform first clustering processing on the N data points in the point set data to obtain M first clustering regions; or taking a number of the prior clustering regions as a number of clustering regions to perform first clustering processing on the N data points in the point set data to obtain M first clustering regions, and the M is equal to the number of the prior clustering regions.
3. The method of claim 1, wherein, The determination of the second clustering region matched with the prior clustering region from the M first clustering regions comprises: determining distances between the prior clustering center of the prior clustering region and each first clustering center; selecting a first clustering region with the smallest distance from the M first clustering regions, and taking the selected first clustering region with the smallest distance as the second clustering region matched with the prior clustering region.
4. The method of claim 1, wherein, The merging of at least one first clustering region and the second clustering region to obtain the third clustering region matched with the prior clustering region comprises: based on a first position deviation threshold corresponding to the target environment, expanding a range of the prior clustering region to obtain an expanded first prior clustering region; performing clustering center detection on the expanded first prior clustering region to obtain a first detection result; when the first detection result indicates that the expanded first prior clustering region comprises at least one other clustering center and a second clustering center, merging the first clustering region corresponding to the at least one other clustering center and the second clustering region to obtain the third clustering region matched with the prior clustering region, wherein the other clustering center is a clustering center other than the second clustering center among the first clustering centers corresponding to the M first clustering regions, and the second clustering center is a center of the second clustering region.
5. The method of claim 4, wherein, when the first detection result indicates that the expanded first prior clustering region does not comprise the other clustering center, the method further comprises: taking a second clustering center of the second clustering region as a clustering initial point to perform second clustering processing on the point set data to obtain a second target clustering region matched with the prior clustering region.
6. The method of claim 4, wherein, When the first detection result indicates that the second cluster center of the second cluster region is located outside the range of the expanded first prior cluster region, the method further includes: canceling the matching relationship between the second cluster region and the prior cluster region.
7. The method of claim 1, wherein, After the second clustering processing on the point set data, the method further includes: obtaining an intermediate cluster region obtained by performing the second clustering processing on the point set data; based on the second position deviation threshold corresponding to the target environment, expanding the range of the prior cluster region to obtain an expanded second prior cluster region; performing cluster center detection on the expanded second prior cluster region to obtain a second detection result; When the second detection result indicates that the expanded second prior cluster region includes a plurality of intermediate cluster centers of the intermediate cluster region, merging a plurality of intermediate cluster regions to obtain a merged cluster region; wherein the second position deviation threshold is greater than the first position deviation threshold, and the first position deviation threshold is a position deviation threshold used when merging at least one first cluster region and the second cluster region; based on the merged cluster region, determining a first target cluster region matched with the prior cluster region.
8. The method of claim 7, wherein, The method of determining a first target cluster region matched with the prior cluster region based on the merged cluster region includes: taking the fourth cluster center of the merged cluster region as a cluster initial point, performing iterative clustering processing on the point set data to obtain the first target cluster region matched with the prior cluster region; wherein the iterative clustering processing includes at least one of the following: the number of clusters reaches a preset number, the repetition rate of data points included in the cluster region obtained by this time clustering and the data points included in the cluster region obtained by the last time clustering reaches a preset repetition rate, and the position deviation between the cluster center of the cluster region obtained by this time clustering and the cluster center of the cluster region obtained by the last time clustering is less than a preset deviation.
9. The method of claim 1, wherein, The method of obtaining point set data of a target environment includes: obtaining initial point set data generated for a target environment, wherein the initial point set data includes N initial data points; performing position smoothing processing on the N initial data points in the initial point set data to obtain the point set data.
10. The method of claim 9, wherein, The method of performing position smoothing processing on the N initial data points in the initial point set data to obtain the point set data includes: sorting the N initial data points based on the time sequence information of each initial data point; for each initial data point, the following processing is performed: based on the sorting result of the sorting, determine R surrounding data points associated with the initial data point, the time sequence difference between the surrounding data point and the initial data point is less than a preset threshold; determine n surrounding data points that have completed position smoothing and m surrounding data points that have not completed position smoothing in the R surrounding data points, wherein R, m, n are integers, and m = R-n; obtain first initial position information of the initial data point, second initial position information of the m surrounding data points, and first updated position information of the n surrounding data points; perform position smoothing processing on the initial data point based on the first initial position information, the second initial position information of the m surrounding data points, and the first updated position information of the n surrounding data points, to obtain second updated position information of the initial data point; use the second updated position information of each initial data point in the initial point set data as position information of each data point in the point set data.
11. The method of claim 10, wherein, The determining the R surrounding data points associated with the initial data point based on the sorting result comprises: when the time sequence serial number of the initial data point is greater than a first specified serial number, determining, based on the sorting result, R surrounding data points adjacent to and located before the initial data point; when the time sequence serial number of the initial data point is greater than a second specified serial number and less than or equal to the first specified serial number, determining, based on the sorting result, n surrounding data points adjacent to and located before the initial data point, and m surrounding data points adjacent to and located after the initial data point; when the time sequence serial number of the initial data point is equal to the second specified serial number, determining, based on the sorting result, R surrounding data points adjacent to and located after the initial data point.
12. The method of claim 10, wherein, The performing position smoothing processing on the initial data point based on the first initial position information, the second initial position information of the m surrounding data points, and the first updated position information of the n surrounding data points to obtain second updated position information of the initial data point comprises: obtaining a first weight corresponding to the first initial position information, a second weight corresponding to the second initial position information of the m surrounding data points, and a third weight corresponding to the first updated position information of the n surrounding data points, wherein the first weight is greater than the second weight, and the third weight is greater than the second weight; performing weighted summation processing on the first initial position information, the second initial position information of the m surrounding data points, and the first updated position information of the n surrounding data points based on the first weight, the second weight, and the third weight, to obtain the second updated position information of the initial data point.
13. An area matching apparatus in an environment, characterized by The device comprises: an acquisition module configured to acquire point set data of a target environment, wherein the point set data comprises N data points; a first clustering module configured to perform first clustering processing on the N data points to obtain M first clustering regions, wherein each first clustering region corresponds to a first clustering center, and each first clustering region contains P data points, N, M, and P are positive integers, and P≤N; a pre-matching module configured to determine, from the M first clustering regions, a second clustering region matched with a priori clustering region pre-calibrated; a merging module configured to merge at least one first clustering region with the second clustering region to obtain a third clustering region matched with the a priori clustering region; and a second clustering module configured to perform second clustering processing on the third clustering region to obtain a second clustering center matched with the a priori clustering region. A second clustering module is configured to perform a second clustering process on the point set data with the third clustering center of the third clustering region as a clustering initial point, so as to obtain a first target clustering region matched with the prior clustering region.
14. An electronic device, comprising: The electronic device comprises: a memory configured to store computer executable instructions; a processor configured to execute the computer executable instructions stored in the memory to implement the method in any one of claims 1 to 12.
15. A computer-readable storage medium storing computer-executable instructions or a computer program, wherein the computer-executable instructions or the computer program comprise the steps of: The computer executable instructions or the computer program are executed by the processor to implement the method in any one of claims 1 to 12. 16. A computer program product comprising computer-executable instructions or a computer program, characterized in that, The computer executable instructions or the computer program are executed by the processor to implement the method in any one of claims 1 to 12. The computer executable instructions or the computer program are executed by the processor to implement the method in any one of claims 1 to 12.
Citation Information
Patent Citations
Pose estimation method of robot, robot and computer storage medium
CN112363158A
Multi-modal fusion target detection method and system based on clustering optimization
CN117789160A
Region matching method and device in environment, electronic equipment, computer readable storage medium and computer program product
CN119007274A
Clustering for k-anonymity in location trajectory data
US20200019815A1
Gaze information determining method and apparatus, eye tracking device, object to be observed, and medium
WO2023155813A1