Method for detecting a goal event

CN122990582APending Publication Date: 2026-10-27HISENSE HOME APPLIANCES GRP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611435974.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-15
Publication Date
2026-10-27

AI Technical Summary

Technical Problem

该方案无需额外硬件,但高度依赖镜头画面特征,进球、射门未进、门前混战、角球争顶等场景的视觉特征相近,导致误报率高

Benefits of technology

[0008]第四方面,本申请实施例提供了一种计算机可读存储介质,计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现如第一方面所述的方法。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122990582A_ABST
    Figure CN122990582A_ABST
Patent Text Reader

Abstract

The application is suitable for the technical field of computer vision, and provides a detection method of a goal event, comprising: acquiring video frames in a current time window; wherein the current time window represents a window with a preset time length before a current time; for each video frame in the current time window, determining a goal area and ball center tracking information in the video frame; wherein the ball center tracking information represents position information of a ball center and an accuracy degree of the position information; and determining whether a goal event exists according to the goal area and the ball center tracking information in each video frame in the current time window. The ball center position is tracked, and the geometric area of a goal is determined, so that whether a goal is scored is determined through the relationship between the ball and the goal, and the detection precision is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of computer vision technology, and in particular relates to a method for detecting goal events. Background Technology

[0002] Currently, automatic goal detection in football videos mainly employs end-to-end temporal recognition schemes. For example, these schemes rely on 3D convolutional networks to directly classify video clips and output goal labels. While this approach requires no additional hardware, it is highly dependent on camera features. Scenes such as goals, missed shots, goalmouth scrambles, and corner kick headers share similar visual characteristics, leading to a high false alarm rate.

[0003] Therefore, improving the accuracy of goal detection is a technical problem that urgently needs to be solved. Summary of the Invention

[0004] This application provides a method for detecting goal events, which can improve the detection accuracy of goal events.

[0005] In a first aspect, embodiments of this application provide a method for detecting goal events, including: Acquire video frames within the current time window; wherein, the current time window represents a window of a preset time length prior to the current moment; For each video frame within the current time window, determine the goal area and ball center tracking information in the video frame; wherein, the ball center tracking information represents the position information of the ball center and the accuracy of the position information; Based on the goal area and ball center tracking information in each video frame within the current time window, determine whether a goal event has occurred.

[0006] Secondly, embodiments of this application provide a device for detecting goal events, comprising: The video frame acquisition module is used to acquire video frames within the current time window; wherein, the current time window represents a window of a preset time length before the current moment; The information determination module is used to determine the goal area and ball center tracking information in each video frame within the current time window; wherein the ball center tracking information represents the position information of the ball center and the accuracy of the position information; The goal detection module is used to determine whether a goal event has occurred based on the goal area and ball center tracking information in each video frame within the current time window.

[0007] Thirdly, embodiments of this application provide an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method described in the first aspect.

[0008] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method described in the first aspect.

[0009] Fifthly, embodiments of this application provide a computer program product that, when run on an electronic device, causes the electronic device to execute the method described in the first aspect above.

[0010] In this embodiment, video frames within a window are extracted to obtain multiple video frames within the current time window. For each obtained video frame, the area where the goal is located (i.e., the goal area) and the ball center tracking information are identified. The ball center tracking information characterizes the position information of the ball center in the video frame and the accuracy of this position information. By determining the goal area and the ball center tracking information, the geometric determination of the goal and the tracking of the ball center's movement can be achieved. By combining the goal area and ball center tracking information in each video frame within the current time window, it is possible to promptly determine whether a goal has been scored. The determination of whether a goal has been scored is based on the relationship between the ball and the goal under the movement sequence, avoiding misjudgments of similar scenes caused by judging solely based on the ball's position, and effectively improving detection accuracy. Attached Figure Description

[0011] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0012] Figure 1 This is a schematic flowchart of the goal event detection method provided in the embodiments of this application; Figure 2 This is a schematic flowchart of the goal event detection method provided in the embodiments of this application; Figure 3 This is a schematic diagram of the goal area provided in an embodiment of this application; Figure 4 This is a schematic flowchart of the goal event detection method provided in the embodiments of this application; Figure 5 This is a schematic diagram of the structure of the goal event detection device provided in the embodiments of this application; Figure 6 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0013] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.

[0014] The goal detection method provided in this application can be applied to terminal devices such as mobile phones, tablets, wearable devices, in-vehicle devices, augmented reality (AR) / virtual reality (VR) devices, laptops, ultra-mobile personal computers (UMPCs), netbooks, televisions, robots, and personal digital assistants (PDAs). This application does not impose any restrictions on the specific type of terminal device.

[0015] Before providing a further detailed description of the embodiments of this application, the nouns and terms used in the embodiments of this application are explained, and the nouns and terms used in the embodiments of this application shall be interpreted as follows: Four-state constant velocity Kalman filter: This is a Kalman filter for a two-dimensional planar uniform motion model, used in this embodiment to track a soccer ball target; the four states refer to the four components of the state vector, namely the center pixel coordinates of the soccer ball in the X and Y axis directions, and the pixel velocity in the X and Y axis directions.

[0016] YOLO: short for You Only Look Once, is a one-stage convolutional neural network object detection model, belonging to deep learning neural network models.

[0017] Hough Line Transform: An image processing algorithm that can detect lines or line segments from a binary image.

[0018] The automatic goal-determination technology in football mainly relies on end-to-end event recognition based on video actions. For example, time-series models such as 3D convolutional networks and Transformers can be used to directly classify video segments and output "goal / non-goal" labels.

[0019] This approach requires no additional hardware, but has a high false alarm rate. Goals, missed shots, goalmouth scrambles, corner kick headers, and celebrations are visually very similar, and the model relies primarily on camera language rather than the actual spatial relationship between the ball and the goal. This results in numerous false triggers in scenarios where the ball does not enter the net.

[0020] This application embodiment uses goal detection and ball tracking to perform geometric determination, detect the position of the ball and track its trajectory, and use the geometric relationship between the ball and the goal area to determine whether a goal has been scored, thereby improving the accuracy and reliability of goal detection.

[0021] Figure 1 The flowchart illustrates the method for detecting goal events, as follows: Figure 1 As shown, a method for detecting a goal event according to an embodiment of this application may include: Step 110: Obtain video frames within the current time window; where the current time window represents a window of a preset time length prior to the current moment; Step 120: For each video frame within the current time window, determine the goal area and ball center tracking information in the video frame; whereby, the ball center tracking information represents the position information of the ball center and the accuracy of the position information; Step 130: Determine whether a goal event has occurred based on the goal area and ball center tracking information in each video frame within the current time window.

[0022] Steps 110-130 are described in detail below.

[0023] In step 110, this embodiment uses football as an example and can be applied to the automatic identification scenario of monocular football match broadcasts or live videos, enabling the identification of goal events from the match video stream. The current moment is determined, and the current time window is determined based on the current moment. The current time window is a window of a preset time length preceding the current moment, and the current moment is the last moment within the current time window. For example, the current time window could be a time window 3 seconds before the current moment. The current moment is denoted as t, the preset time length is denoted as T, and the current time window can be represented as [tT, t].

[0024] It can acquire video frames at various times within the current time window, and it can also extract video frames from the current time window. An extraction step size 's' can be preset, and a portion of video frames can be extracted according to 's' as the video frames within the current time window. For example, 's' can be 2.

[0025] In step 120, after acquiring the video frames within the current time window, for each video frame within the current time window, the goal region and ball center tracking information are determined. The goal region is the spatial region in the image plane corresponding to the goal obtained based on the parsing of the video frame image content. For example, the goal region can be represented by a sequence of polygon corner points. The ball center tracking information represents the position information of the center of the soccer ball and the accuracy of this position information. The position information is used to record the pixel coordinates of the soccer ball in the image at each moment. The accuracy of the position information is used to characterize whether the tracked ball center position is reliable. For example, this position information may come from the output of real target detection in the image, with high accuracy; or it may be a prediction result obtained by extrapolation from a motion model, with lower accuracy.

[0026] For example, the goal area can be obtained by performing mask extraction, line detection, geometric matching, and authenticity verification on video frames to eliminate false goal areas generated by interfering objects in the image that resemble the goal in appearance. Multiple ball center tracking information can exist within the same video frame, meaning multiple positional information may be detected, and the accuracy of each positional information may differ.

[0027] In step 130, after parsing the goal area and ball center tracking information frame by frame, the goal event is determined based on the goal area and ball center tracking information corresponding to all video frames in the current time window, thus confirming whether a goal event exists in the video segment. A video segment refers to all video frames corresponding to a time window.

[0028] This embodiment transforms static information scattered across single-frame images into temporal event judgments. By combining the ball's trajectory over time and its temporal positional change relative to the goal area, an evidence set for judging goal events is extracted. Then, a binary classification judgment is made based on this evidence set. This judgment process does not solely rely on the visual features of the image; instead, it uses the spatial geometric relationship between the football and the goal as the core criterion, enabling it to distinguish non-goal interference scenes with visually similar features to the goal scene.

[0029] For example, multiple candidate trajectories can be extracted first based on ball tracking information, and then the reliability of these candidate trajectories can be filtered. Based on the filtered candidate trajectories, it can be determined whether the football entered the goal and remained there; if so, a goal event is considered to have occurred. Alternatively, it can be determined whether the football entered the goal but immediately returned; if so, a goal event is considered not to have occurred. Multiple rules for determining goal events can be pre-set, and the degree of matching between the trajectory and the rules determines whether a goal event has occurred.

[0030] By setting a current time window to limit the range of video data involved in the calculation, computational overhead can be reduced. By determining the goal area and ball center tracking information in each video frame, the geometric information of the goal, as well as the temporal position and reliability of the football, can be obtained simultaneously, providing a basis for goal determination based on geometric relationships. Furthermore, by combining the goal area and ball center tracking information from multiple frames within the time window to comprehensively judge the goal event, misjudgments caused by missing information in a single frame image can be avoided, improving the reliability of goal event recognition.

[0031] In this embodiment, video frames within a window are extracted to obtain multiple video frames within the current time window. For each obtained video frame, the area where the goal is located (i.e., the goal area) and the ball center tracking information are identified. The ball center tracking information characterizes the position information of the ball center in the video frame and the accuracy of this position information. By determining the goal area and the ball center tracking information, the geometric determination of the goal and the tracking of the ball center's movement can be achieved. Based on the goal area and ball center tracking information in each video frame within the current time window, it is determined whether a goal event has occurred. That is, without adding hardware, the relationship between the ball and the goal under the motion sequence is combined to determine whether a goal has been scored, effectively improving the detection accuracy.

[0032] Figure 2 The flowchart illustrates the method for detecting goal events, as follows: Figure 2 As shown, a method for detecting a goal event according to an embodiment of this application may include: Step 210: Obtain video frames within the current time window; where the current time window represents a window of a preset time length prior to the current moment; Step 220: Perform line detection on the video frame to obtain the goal area in the video frame; Step 230: Determine the ball center tracking information in the video frame based on the historical tracking information; wherein, the historical tracking information is the previously determined ball center tracking information; Step 240: Determine whether a goal event has occurred based on the goal area and ball center tracking information in each video frame within the current time window.

[0033] Steps 210 and 240 have been described in detail above and will not be repeated here. Steps 220 and 230 will be described in detail below.

[0034] In step 220, a real football goal is usually a quadrilateral that is close to a rectangle. Therefore, straight line detection can be performed on the video frame to determine the quadrilateral in the video frame, and the detected quadrilateral can be used as the goal area.

[0035] Line detection is an image processing technique that extracts line segments from edge pixels of an image. It can identify the line segments corresponding to the goalposts and crossbar that constitute the main structure of a goal, thus constructing the geometric outline of the goal. For example, the video frame can first be masked to separate the pixel region that matches the color features of the goal; then, line detection can be performed within this masked region to obtain several line segments distributed within the image; these line segments are then classified according to their extension direction to obtain line segments representing the vertical direction of the goalposts and line segments representing the horizontal direction of the crossbar; finally, it is determined whether there are two vertical line segments and one horizontal line segment that can form a quadrilateral with the ground. If so, this quadrilateral is taken as the goal region corresponding to the video frame; otherwise, it is not the goal region.

[0036] After assembling the polygons of the goal area, a verification process to distinguish between real and fake goals can be performed. For example, polygons formed by interfering objects such as billboards and field markings can be removed by using the texture features inside the goal area, ensuring that the output goal area truly corresponds to the actual goal in the image. For instance, a geometric consistency check can be used to constrain the shape and position of the goal polygons obtained from multiple consecutive frames.

[0037] In step 230, historical tracking information is obtained. This historical tracking information is the previously determined ball center tracking information, i.e., the ball center tracking information in the previous video frame. The ball center tracking information in the current video frame is determined based on the historical tracking information. The historical tracking information represents the position of the ball center obtained in the previous frame and the accuracy of the position information. This information can provide temporal priors for the current frame, enabling continuous tracking of the soccer ball across frames.

[0038] For example, the position information in the current video frame can be inferred based on the position information in historical tracking information, and used as the predicted position; based on the target detection algorithm in the image processing algorithm, the soccer ball in the current video frame can be identified, and the confidence level of the predicted position, i.e., the accuracy of the predicted position, can be determined according to the degree of matching between the identified position of the soccer ball and the predicted position. The process of determining the goal area and the tracking information of the ball center can be treated as two parallel processing branches, that is, in this embodiment, the execution order between steps 220 and 230 is not specifically limited.

[0039] By combining line detection to reconstruct the polygonal outline of the goal and determining the ball center tracking information of the current frame based on historical tracking information, a reliable goal space can be obtained within a single frame image. At the same time, continuous tracking of the football across frames can be achieved, providing a foundation for subsequent identification of goal events based on the temporal geometric relationship between the ball center and the goal.

[0040] In one implementation, line detection is performed on a video frame to obtain the goal area in the video frame, including: performing line detection on the video frame based on a preset Hough line transform algorithm to obtain horizontal and vertical line segments in the video frame; wherein, the horizontal line segments represent line segments with slopes within a first preset range, and the vertical line segments represent line segments with slopes within a second preset range; determining goalpost line segment pairs from each vertical line segment based on the size information of the video frame and the endpoint coordinates of each vertical line segment; wherein, each goalpost line segment pair includes two goalpost line segments, and the endpoint coordinates of the vertical line segments include the endpoint coordinates of the upper and lower endpoints; determining crossbeam line segments from each horizontal line segment based on the size information of the video frame, the endpoint coordinates of each horizontal line segment, and the endpoint coordinates of each goalpost line segment in the goalpost line segment pair; wherein, the endpoint coordinates of the horizontal line segments include the endpoint coordinates of the left and right endpoints; and determining the goal area in the video frame based on the endpoint coordinates of each goalpost line segment in the goalpost line segment pair and the endpoint coordinates of the crossbeam line segment.

[0041] Specifically, the goal in the image consists of two white vertical posts and a white horizontal beam. All horizontal and vertical lines can be extracted and matched using the Hough transform algorithm. That is, a preset Hough transform algorithm can be used to detect lines in the video frame. This algorithm identifies straight line structures within the image based on a voting mechanism of image edge points, thus detecting line segments from the video frame. For all detected line segments, horizontal and vertical segments can be distinguished based on their slope. Horizontal segments are those in the horizontal direction, and vertical segments are those in the vertical direction. For example, a first preset range and a second preset range can be set. Horizontal segments represent line segments with slopes within the first preset range, and vertical segments represent line segments with slopes within the second preset range. The first preset range can be close to 0, and the second preset range can be a range with an absolute value of infinity.

[0042] Before executing the Hough line transform algorithm, a pre-processing image mask can be performed on the video frame. A mask image is generated based on the color characteristics of the goalposts and crossbar, and the white mask is extracted. The Hough line transform algorithm can then be executed on the mask image, reducing interference from irrelevant objects within the frame. For example, the Hough line transform algorithm can employ probabilistic Hough line transform, directly outputting the complete endpoint coordinates of each line segment.

[0043] After obtaining the horizontal and vertical line segments, the goalpost line segment pairs are selected from all vertical line segments by combining the size information of the video frame and the endpoint coordinates of each vertical line segment. The size information of the video frame represents the overall scale of the video frame image in the image plane, and can include the width and height of the video frame. The endpoint coordinates of the vertical line segment include the coordinates of the upper and lower endpoints. The upper and lower endpoints record the start and end positions of the vertical line segment in the image space. The endpoint coordinates can be used to calculate geometric parameters such as the extension length of a single vertical line segment, the spatial spacing between different vertical line segments, and the alignment of the top positions of the vertical line segments. A goalpost line segment pair consists of two goalpost line segments, which is a combination of vertical line segments simulating the two goalposts of a real goal. The selection of goalpost line segment pairs involves choosing two vertical line segments from a large number of vertical line segments whose geometric positions, line lengths, and relative proportions conform to the imaging characteristics of real goalposts. In the process of screening gatepost line segment pairs, all vertical line segments can be combined in pairs. For each pair, multiple geometric constraints are checked. Geometric constraints can include spatial span constraints between the two vertical line segments, length matching constraints between the two vertical line segments, alignment constraints at the top positions of the two vertical line segments, and proportional constraints between the length of the gatepost line segment and the span between the two gateposts. Only vertical line segment pairs that satisfy all geometric constraints can be determined as gatepost line segment pairs.

[0044] For example, the gatepost line segment pairs can be selected from the pairwise combinations of all vertical line segments, or the vertical line segments can be clustered in advance according to their spatial location, and only the vertical line segments within the cluster can be paired, thereby reducing the amount of computation for pairing.

[0045] After determining the goalpost line segment pairs, the crossbeam line segments are determined from the set of horizontal line segments by combining the size information of the video frames, the endpoint coordinates of each horizontal line segment, and the endpoint coordinates of each goalpost line segment within the goalpost line segment pair. The endpoint coordinates of a horizontal line segment include the coordinates of its left and right endpoints. The left and right endpoints record the start and end positions of the horizontal line segment on the image plane, used to calculate the actual length of the horizontal line segment, its horizontal coverage area, and the positional overlap between the horizontal line segment and the goalpost line segment pair. The crossbeam line segment corresponds to the crossbeam component of a real goal, connecting the upper ends of the two goalpost line segments in the goalpost line segment pair to form the basic outline of the goal. The selection of crossbeam line segments needs to be based on the spatial position of the already determined goalpost line segment pairs as a reference to avoid matching errors caused by selecting horizontal line segments out of context of the goalpost positions. The selection of crossbeam segments can be subject to multi-dimensional verification conditions. These conditions can include the proximity of the top of the crossbeam segment to the top of the goalpost segment, the degree of overlap between the crossbeam segment and the goalpost segment in the horizontal interval, and so on. Only crossbeam segments that meet all the verification conditions can be identified as crossbeam segments that match the current goalpost segment pair.

[0046] For example, the beam segment can be checked by traversing all the beam segments one by one, or the beam segment closest to the top of the goalpost segment pair can be checked first. When multiple beam segments meet the filtering conditions, the beam segment with the highest degree of overlap can be selected as the final beam segment, or multiple candidate combinations of goalpost and beam segments can be retained for further verification.

[0047] Based on the coordinates of the endpoints of the two goalpost segments and the crossbar segment, the goal area in the video frame is further determined. That is, using the geometric information of the matched goalpost and crossbar segments, the closed polygonal region corresponding to the goal in the image is reconstructed. First, the equations of the corresponding lines are solved using the endpoint coordinates of the goalpost and crossbar segments to obtain the intersection points. These intersection points are the two upper corner points of the goal polygon. Then, the coordinates of the lower endpoints of the goalpost segments are combined to obtain the two lower corner points of the goal polygon. These four corner points together form an ordered sequence of corner points, and the closed polygon enclosed by this ordered sequence is the goal area corresponding to the current video frame.

[0048] By extracting horizontal and vertical line segments using the Hough line transform algorithm, the goalpost line segment pairs are selected and the crossbeam line segments are matched in sequence. Then, the goal area is reconstructed based on the coordinates of the line segment intersections and endpoints. This method can completely restore the polygonal outline of the goal under perspective distortion based on the geometric features of the image, reduce the positional deviation caused by the rectangular box representation of the goal, and improve the detection accuracy of goal events.

[0049] In one implementation, the size information of the video frame includes width information and height information; determining gatepost segment pairs from each vertical line segment based on the size information of the video frame and the endpoint coordinates of each vertical line segment includes: for each vertical line segment, determining the horizontal projection length and vertical projection length of the vertical line segment based on the endpoint coordinates of the vertical line segment; determining at least two candidate gateposts from each vertical line segment based on the height information of the video frame, the horizontal projection length and vertical projection length of each vertical line segment; combining the candidate gateposts in pairs to obtain candidate gatepost pairs; and determining gatepost segment pairs from each candidate gatepost pair based on the width and height information of the video frame and the endpoint coordinates of the candidate gateposts in each candidate gatepost pair.

[0050] Specifically, the size information of a video frame includes width and height information. The width information represents the overall scale of the video frame image along the horizontal direction, and the height information represents the overall scale of the video frame image along the vertical direction. Each line segment has two endpoints. For a vertical line segment, the upper endpoint can be denoted as (x1, y1) and the lower endpoint as (x2, y2); for a horizontal line segment, the left endpoint can be denoted as (x3, y3) and the right endpoint as (x4, y4).

[0051] In determining the gatepost line segment pairs, firstly, for each vertical line segment, the horizontal and vertical projection lengths of the segment are calculated based on the coordinates of its endpoints. The endpoint coordinates of the vertical line segment include the coordinates of the upper and lower endpoints. The horizontal projection length is the absolute value of the difference between the projections of the two endpoints on the horizontal coordinate axis, and the vertical projection length is the absolute value of the difference between the projections of the two endpoints on the vertical coordinate axis. The formulas for calculating the horizontal and vertical projection lengths of the vertical line segment are as follows: d1 = abs(x2 - x1); d2 = abs(y2 - y1); Where d1 represents the horizontal projection length of the vertical line segment, d2 represents the vertical projection length of the vertical line segment, and abs represents the absolute value.

[0052] After obtaining the horizontal and vertical projection lengths of all vertical line segments, and combining the height information of the video frame with the horizontal and vertical projection lengths of each vertical line segment, at least two vertical line segments are selected as candidate goalposts. Candidate goalposts are line segments that conform to the basic morphological characteristics of a goalpost, used to directly exclude vertical line segments that clearly do not possess goalpost imaging characteristics, reducing the amount of data required for subsequent pairwise combination calculations. This selection process can combine the relative proportions between the vertical and horizontal projection lengths, as well as the relative proportions between the vertical projection lengths and the video frame height information, to ensure that the overall extension direction of the line segment is biased towards verticality, while also ensuring that the line segment has sufficient length to exclude short, noisy line segments within the image. For example, the selection criteria for candidate goalposts could be that vertical line segments with d2 > d1 × 4 and d2 ≥ 0.04 × h are identified as candidate goalposts. At least two candidate goalposts are included; if only one or no candidate goalposts are detected, the goal area construction process for this frame ends.

[0053] After extracting the candidate goalposts, the candidate goalposts are paired to generate several candidate goalpost pairs. Each candidate goalpost pair consists of two candidate goalposts paired together, and each candidate goalpost pair simulates the combination of two goalposts in a real goal.

[0054] After generating candidate gatepost pairs, the gatepost segment pairs are determined from multiple candidate gatepost pairs by combining the width and height information of the video frames, as well as the endpoint coordinates of the two candidate gateposts within each candidate gatepost pair. For example, pairings that meet the constraints in terms of spatial position, relative size, and top alignment can be selected from all potential combinations.

[0055] For example, constraints may include spacing constraints, height constraints, top edge alignment constraints, and aspect ratio constraints for the two candidate gateposts in a candidate gatepost pair. Spacing constraints may require the distance between the two candidate gateposts to be within a preset range, which may be 0.03w to 0.45w, where w refers to the width of the video frame. Height constraints may require the length ratio of the two candidate gateposts to be within a preset ratio range, which may be the height of the shorter gatepost divided by the length of the longer gatepost, with a preset ratio range equal to or greater than 0.45. Aspect ratio constraints may be post × 0.8 ≤ span ≤ post × 4.5, where span is the total horizontal span between the two candidate gateposts, which is the pixel distance from the leftmost x-value of the left candidate gatepost to the rightmost x-value of the right candidate gatepost, and post is the pixel height of the higher of the two candidate gateposts.

[0056] When multiple candidate goalpost pairs meet all constraints, one of them can be selected as the goalpost segment pair, for example, the pair with the closest segment heights; or multiple goalpost segment pairs can be retained for further screening and verification in the subsequent beam segment matching stage.

[0057] First, the projection parameters of the vertical line segments are quantified to complete the initial screening of candidate goalposts. Then, candidate goalpost pairs are generated by combining the candidate goalposts in pairs. Finally, multi-dimensional geometric verification is carried out on the candidate goalpost pairs to obtain goalpost line segment pairs. This can filter out noise line segments and unreasonable line segment pairings layer by layer, improve the reliability of the goalpost line segment pair screening results, and improve the matching accuracy of the crossbeam line segments and the determination accuracy of each goal area.

[0058] In one implementation, the size information of the video frame includes width information and height information; determining the crossbeam segment from each horizontal line segment based on the size information of the video frame, the endpoint coordinates of each horizontal line segment, and the endpoint coordinates of each gatepost line segment aligned with the gatepost line segment includes: for each horizontal line segment, determining the horizontal projection length and vertical projection length of the horizontal line segment based on the endpoint coordinates of the horizontal line segment; determining candidate crossbeams from each horizontal line segment based on the width information of the video frame, the horizontal projection length and vertical projection length of each horizontal line segment; and determining the crossbeam segment from each candidate crossbeam based on the height information of the video frame, the endpoint coordinates of each gatepost line segment aligned with the gatepost line segment, and the endpoint coordinates of each candidate crossbeam.

[0059] Specifically, in determining the horizontal beam segments, for each segment, the horizontal and vertical projection lengths are determined based on the coordinates of its endpoints. The endpoint coordinates include the coordinates of the left and right endpoints. The horizontal projection length is the absolute value of the difference between the projections of the two endpoints onto the horizontal coordinate axis, and the vertical projection length is the absolute value of the difference between the projections of the two endpoints onto the vertical coordinate axis. The formulas for calculating the horizontal and vertical projection lengths of the horizontal beam segments are as follows: d3 = abs(x4 - x3); d4 = abs(y4 - y3); Where d3 represents the horizontal projection length of the horizontal line segment, and d4 represents the vertical projection length of the horizontal line segment.

[0060] After obtaining the horizontal and vertical projection lengths of all horizontal line segments, candidate beams are determined from all horizontal line segments by combining the width information of the video frame and the horizontal and vertical projection lengths of each horizontal line segment. Candidate beams are line segments that initially meet the basic morphological characteristics of a beam. They are used to eliminate invalid horizontal line segments that are severely tilted or too short, reducing the number of line segments that need to be matched and verified with the goalpost line segments, and lowering the computational overhead of the matching process. The filtering process can combine the relative proportions of the horizontal and vertical projection lengths, as well as the relative proportions of the horizontal projection lengths to the width information of the video frame, to ensure that the overall extension direction of the line segments is biased towards the horizontal while also ensuring that the line segments have sufficient extension length, filtering out fragmented noise line segments in the image. For example, the filtering condition for candidate beams could be that horizontal line segments with d3 > d4 × 5 and d3 ≥ 0.03 × w are identified as candidate beams. When no horizontal line segment meets the conditions, it can be directly determined that the current video frame cannot match a beam line segment, ending the goal area construction process for this frame.

[0061] After extracting the candidate crossbeams, the crossbeam segments are determined from the candidate crossbeams by combining the height information of the video frames, the coordinates of the two endpoints of each goalpost segment in the goalpost pair, and the coordinates of the two endpoints of each candidate crossbeam. The candidate crossbeams are then spatially coupled with the determined goalpost pair to determine whether the candidate crossbeams can form a complete goal frame with the goalpost pair in terms of vertical position, horizontal coverage, and degree of overlap with the goalposts. Multiple spatial matching constraints are pre-set; only candidate crossbeams that simultaneously satisfy these multi-dimensional spatial matching constraints can be identified as crossbeam segments. For example, spatial matching constraints may include: the vertical position of the candidate crossbeam's midpoint being close to the top of the goalpost; the horizontal start and end ranges of the candidate crossbeam not excessively offset from the horizontal range of the goalpost pair; and sufficient overlap between the horizontal ranges of the candidate crossbeam and the goalpost pair. When multiple candidate crossbeams satisfy all matching constraints, the one with the best overlap can be selected as the crossbeam segment. Alternatively, multiple pairs of goalpost segments can be retained as candidate pairs for further selection in the subsequent goal verification process. When no candidate crossbeam satisfies the matching constraints, it can be determined that the current goalpost segment pair does not have a suitable crossbeam segment, and the goal area construction process for this frame ends.

[0062] In a video frame, the horizontal coordinate is the x-axis, and the vertical coordinate is the y-axis. The origin is at the top left corner of the video frame. x-values ​​increase to the right, and y-values ​​increase downwards. When determining the beam segment, the minimum and maximum x-coordinates can be determined based on the endpoint coordinates of each gatepost segment. This means determining the leftmost and rightmost x-coordinates among all endpoints of the two gateposts, denoted as lx and rx respectively. The difference between these two x-coordinates is calculated as span = rx - lx. For example, if lx = 480 and rx = 800, span = 800 - 480 = 320. Alternatively, the highest y-value between the two gatepost segments can be determined as top, where top = min(top1, top2), where top1 represents the y-coordinate of the vertex of one gatepost segment, and top2 represents the y-coordinate of the vertex of the other gatepost segment.

[0063] The preset spatial matching constraints can include three screening conditions: vertical position condition, horizontal range condition, and coverage condition. The vertical position condition requires that the midpoint of the beam segment must be near the top of the column. The y-coordinate of the beam midpoint is determined as hy = (y3 + y4) / 2. "Near the top of the column" means |hy - top| ≤ 0.035 × h. The horizontal range condition requires that the endpoints of the beam segment cannot exceed the range of the gatepost segment by too much, i.e., x3 ≥ lx - 0.15 × span, and x4 ≤ rx + 0.15 × span. The coverage condition requires that the overlap distance between the horizontal spacing range of the beam segment and the two gatepost segments must be more than half. The coverage condition is defined as overlap = min(x4, rx) - max(x3, lx), where "more than half" means overlap > 0.5 × span.

[0064] First, the projection parameters of the horizontal line segments are calculated to complete the initial screening of candidate horizontal beams. Then, the candidate horizontal beams are coupled and matched with the spatial position of the goalpost line segments to obtain the horizontal beam line segments. This allows for the layered filtering out of horizontal line segments with abnormal shapes and those that do not match the spatial position of the goalposts, ensuring that the horizontal beam line segments can form a real goal frame together with the goalpost line segments, thus improving the accuracy of subsequent goal area determination.

[0065] In one embodiment, determining the goal area in a video frame based on the endpoint coordinates of the goalpost segments and the endpoint coordinates of the crossbar segments includes: constructing a goal quadrilateral based on the endpoint coordinates of the goalpost segments and the endpoint coordinates of the crossbar segments; and determining the goal area in the video frame based on the area covered by the goal quadrilateral. The goal area includes a first area and a second area, where the first area represents the area covered by the goal quadrilateral, and the second area represents the area outside the first area obtained by expanding the goal quadrilateral according to a preset ratio.

[0066] Specifically, after finding the crossbeam segment, combine the two goalpost segments and the crossbeam segment to form a quadrilateral. Find the equations of the lines representing the goalposts and the crossbeam, and then find the intersection points of the two goalpost segments and the crossbeam segment, which are the two vertices at the top of the goal quadrilateral. Based on these two intersection points, plus the endpoints of the two goalpost segments with the larger y-value (located slightly below the center of the video frame), the goal quadrilateral is obtained.

[0067] The goal quadrilateral is a closed quadrilateral that represents the outline of the goal in the image plane. It can restore the true image outline of the goal after the broadcast image is affected by perspective distortion. That is, the goal area can be determined based on the goal quadrilateral. For example, the image area where the goal quadrilateral is located can be directly taken as the goal area.

[0068] In this embodiment, the goal area may include a first area and a second area. The first area represents the area covered by the goal quadrilateral itself, i.e., the goal quadrilateral body, corresponding to the imaging range of the actual goal frame in the image, and is used to determine whether the football has entered the goal frame area. The second area represents the area outside the first area after the goal quadrilateral is expanded according to a preset ratio. That is, the second area is a buffer space formed by expanding outward on the basis of the first area, representing the adjacent space around the goal, and is used to determine whether the football is close to the goal but has not yet entered the goal frame. The first and second areas work together to distinguish different spatial states such as the football being inside the goal frame, in the adjacent buffer zone of the goal, or far from the goal, providing a layered spatial judgment benchmark for subsequent extraction of different types of event evidence based on ball center tracking information.

[0069] Both the first and second regions are derived from the goal quadrilateral, sharing the same polygonal geometric properties and can be represented using polygonal corner point sequences. For any point at the center of the ball, a polygon interior point test can be used to determine whether the point falls within the first region, the second region, or outside of any region. The expansion operation of the second region can be achieved by scaling the entire goal quadrilateral outwards using its centroid as the expansion center, or by offsetting each of the four sides of the goal quadrilateral outwards along their normals to obtain the expanded polygonal outline. For example, the expansion operation can be performed by proportionally expanding the entire goal quadrilateral to ensure that the expanded second region outline maintains a similar shape to the first region outline; alternatively, different expansion ranges can be set for different sides to adapt to the spatial distribution characteristics of different directions around the goal in the game screen. Figure 3 This is a schematic diagram of the goal area. Figure 3 In the diagram, the area within the solid black quadrilateral is the first region, and the area between the solid black quadrilateral and the dashed black quadrilateral is the second region.

[0070] Based on the matched goalpost and crossbeam line segments, a goal quadrilateral is constructed. The first and second regions that cooperate with each other are derived from the goal quadrilateral. The goal frame body and the adjacent buffer space outside the goal frame are established in layers. This provides a layered geometric basis for subsequent extraction of multiple types of evidence by combining the ball center tracking information, reduces the position judgment deviation caused by using a single rectangular region for judgment, and improves the detection accuracy of goal events.

[0071] In one embodiment, the method further includes: determining the circumscribed rectangle of the goal quadrilateral in the video frame; performing edge extraction processing on the grid lines within the circumscribed rectangle to obtain the number of edge pixels and determining the total number of pixels in the circumscribed rectangle; wherein the number of edge pixels represents the number of pixels belonging to the grid lines within the circumscribed rectangle; determining the mesh density value of the circumscribed rectangle based on the number of edge pixels and the total number of pixels; wherein the mesh density value represents the density of the grid within the circumscribed rectangle; if the mesh density value is within a preset density range, then determining the goal area in the video frame based on the area covered by the goal quadrilateral in the video frame.

[0072] Specifically, the goal quadrilateral may not be a standard rectangle. Therefore, a circumscribed rectangle can be determined. This circumscribed rectangle is the rectangle that completely encloses all vertices of the goal quadrilateral. Its function is to define the processing range for subsequent mesh feature analysis, constraining the texture statistics calculation area within the range of the circumscribed rectangle corresponding to the goal quadrilateral, and preventing pixels from other irrelevant areas in the image from interfering with the statistical process of the mesh lines. The circumscribed rectangle can be obtained by calculating the extreme values ​​of the coordinates of all vertices of the goal quadrilateral. The extreme values ​​of the horizontal coordinates among all vertices are selected to determine the left and right boundaries of the rectangle, and the extreme values ​​of the vertical coordinates among all vertices are selected to determine the top and bottom boundaries of the rectangle, thus forming an axis-aligned bounding rectangle. For example, the circumscribed rectangle can be generated by strictly fitting the extreme values ​​of the coordinates of the goal quadrilateral vertices, or it can be extended slightly outwards based on the extreme values ​​to ensure that the mesh lines at the edge of the goal quadrilateral completely fall within the statistical range of the circumscribed rectangle.

[0073] The goal net is a grid composed of dense, fine lines, which generates a large number of high-frequency edges in the image. That is, the fine lines of the grid, forming the dense line structure of the net for the goal, create numerous dense edge features in the image. These fine lines are the core texture features that distinguish real goals from false targets such as advertising boards and field lines. Therefore, after determining the circumscribed rectangle, edge extraction processing is performed on the fine lines of the grid within the circumscribed rectangle to obtain the number of edge pixels. For example, the Canny algorithm can be used to extract these fine line edges. The Canny algorithm is a pre-defined edge extraction algorithm that can be used to identify pixel locations where grayscale changes significantly in an image. The number of edge pixels represents the number of pixels belonging to the fine lines within the circumscribed rectangle, used to quantify the total number of detected net edges within the circumscribed rectangle. Additionally, the total number of pixels in the circumscribed rectangle is determined; that is, the total number of pixels contained within the circumscribed rectangle is determined.

[0074] The mesh density value characterizes the density of the mesh within the circumscribed rectangle and can be used to determine whether the image region corresponding to the constructed goal quadrilateral actually contains a net structure. A real goal's image region contains numerous edge pixels forming the net, while fake goals are generally formed by advertising text, field markings, and other visual clutter, lacking the corresponding dense mesh edge features. Therefore, the mesh density value can serve as an indicator for distinguishing between real and fake goals. The mesh density value can be obtained based on the relative proportion of edge pixels to the total number of pixels. For example, the mesh density value can be directly taken as the ratio of edge pixels to the total number of pixels.

[0075] A density range is preset. The mesh density value is compared with the preset density range. Only when the mesh density value is within the preset density range will the step of determining the goal area in the video frame based on the area covered by the goal quadrilateral in the video frame be executed. If the mesh density value does not fall within the preset density range, it means that the current goal quadrilateral is likely from interfering objects such as billboards or markings, and the goal area will not be generated based on that goal quadrilateral. For example, the preset density range can be 6% to 15%. When the mesh density value does not meet the condition, the process can return to the previous beam segment matching step to select other combinations, or it can be directly determined that there is no valid goal area in this frame, ending the goal parsing process for this frame.

[0076] By taking the circumscribed rectangle corresponding to the goal quadrilateral as the statistical region, edge extraction is performed inside the circumscribed rectangle to obtain the number of edge pixels. The mesh density value is calculated by combining the total number of pixels in the circumscribed rectangle. The authenticity of the goal is verified by whether the mesh density value falls within the preset density range. The texture features of the real goal's net can be used to filter out fake goal quadrilaterals generated by interference objects in the picture, avoiding the generation of goal areas based on incorrect quadrilateral outlines, and improving the authenticity and reliability of the goal area output results.

[0077] In one implementation, the ball center tracking information includes a target position and a target confidence score. The target position represents the position information of the ball center in the video frame, and the target confidence score represents the accuracy of the position information. Determining the ball center tracking information in the video frame based on historical tracking information includes: determining the predicted position and predicted confidence score of the ball center in the video frame based on historical tracking information; wherein the predicted confidence score represents the accuracy of the predicted position; performing ball center detection processing on the video frame based on a preset target detection model to obtain candidate positions of the ball center in the video frame; wherein the preset target detection model is a pre-trained convolutional neural network model; if the distance between the candidate position and the predicted position is less than or equal to a preset gating radius, the candidate position is determined as the target position, and the predicted confidence score is updated based on the target position to obtain the target confidence score; if the distance between the candidate position and the predicted position is greater than the preset gating radius, the predicted position is determined as the target position, and the predicted confidence score is determined as the target confidence score.

[0078] Specifically, the ball center tracking information includes the target position and the target confidence score. The target position represents the location information corresponding to the center of the soccer ball within the final determined video frame, while the target confidence score represents the accuracy of the position information. The target confidence score is used to distinguish whether the target position originates from the actual image detection output. The target position and target confidence score are paired together to constitute the ball center tracking information for a single frame, and can be used as historical tracking information for the next video frame.

[0079] The tracking information of the ball's center in the current video frame is determined based on historical tracking information, completing cross-frame target association and state update. When determining the ball's center tracking information in a video frame based on historical tracking information, a preset Kalman filter is first used to predict the position of the ball's center in the current video frame, obtaining the predicted position and prediction confidence. The predicted position is the estimated coordinates of the ball's center obtained based on the motion state inference from historical tracking information, i.e., the point where the soccer ball might appear in the current frame image. The prediction confidence represents the accuracy of the predicted position, used to quantify the reliability of obtaining the position solely through historical motion extrapolation. Both the predicted position and prediction confidence are obtained from historical tracking information through motion state inference calculations. For example, a Kalman filter with a constant velocity motion assumption can be used for inference. In this embodiment, a four-state constant velocity Kalman filter can be used, where the four states are the x-coordinate, y-coordinate, x-direction velocity, and y-direction velocity of the ball's center pixel. The predicted position is obtained by extrapolation from the position and motion velocity parameters stored in the historical tracking information, and the prediction confidence, representing the estimation uncertainty, is output simultaneously. The prediction confidence can be obtained by transforming the covariance matrix output by the motion model, or it can be adaptively adjusted based on the cumulative situation of continuous target loss detection. The target refers to a soccer ball. For example, if the soccer ball's position was lost in the previous frame, the ball's center position in the historical tracking information is inferred based on Kalman filtering, not the actual detected position in the previous frame, resulting in a lower prediction confidence. This embodiment does not specifically limit the calculation process of the Kalman filter.

[0080] Based on a pre-defined target detection model, ball center detection is performed on video frames to obtain candidate positions of the ball center within the video frame. The pre-trained target detection model is a convolutional neural network model, such as the YOLO model. The target detection model takes the complete video frame image or a cropped portion of the video frame as input, and uses the convolutional neural network to extract the visual features of the soccer ball target in the image, outputting the corresponding detection box information. The candidate positions of the ball center are then calculated from the detection boxes. These candidate positions are the observation points of the ball center obtained through image detection methods. Due to environmental interference and other factors, multiple candidate positions may be identified in a single video frame.

[0081] Based on the predicted location and the identified candidate locations, the target location and target confidence can be determined. For example, using the predicted location as the center and a preset gating radius as the radius, candidate locations whose distance from the predicted location is less than the gating radius are determined. When the distance between the candidate location and the predicted location is less than or equal to the preset gating radius, it means that the candidate location detected in the current frame falls within the reasonable matching range given by motion inference. It can be considered that the candidate location and the soccer target corresponding to the historical tracking information belong to the same object. At this time, the candidate location is determined as the target location, and the prediction confidence is updated based on the target location to obtain the target confidence. For example, the prediction confidence can be appropriately increased. In this case, the target location comes from the actual image detection output, and the corresponding reliability is higher. The target confidence obtained after the update can reflect the high accuracy of the location information after the intervention of actual observation.

[0082] When the distance between the candidate position and the predicted position is greater than the preset gating radius, it indicates that the candidate position output by the image detection deviates from the reasonable range of the historical trajectory. This candidate position should not be associated with the soccer target corresponding to the current historical tracking information. In this case, the predicted position is directly determined as the target position, and the prediction confidence is directly determined as the target confidence. In this scenario, no available image observations are used for correction; the target position is entirely derived from the motion extrapolation of historical tracking information. The target confidence inherits the credibility of the extrapolated result, thus achieving continuity of trajectory points in scenarios with temporary occlusion. If no candidate position is identified, the predicted position can also be used as the target position, and the prediction confidence as the target confidence.

[0083] For each target location obtained, its trajectory can be connected to the target location determined in the previous frame to obtain the soccer ball's trajectory. If there are no candidate locations or the distance between each candidate location and the predicted location is greater than a preset gate radius, the target detection of the soccer ball is considered lost, and a target detection loss count is recorded. Tracking of the corresponding trajectory can be terminated after the loss count accumulates to a certain level. For example, when a trajectory loses more than the upper limit (typically 6 frames), that trajectory is terminated, meaning it is no longer used for goal detection; if the upper limit is not reached, extrapolation using the predicted location continues.

[0084] The preset gate radius can be a pre-defined spatial distance or adjusted based on consecutive undetected targets. That is, the loss count can be used to adjust the gate radius; the more losses, the larger the gate radius. The gate radius is calculated as gate + 0.5 × miss, where gate is the preset base gate size and miss is the number of loss counts. For example, assuming gate is 60, a miss of 0 results in a gate radius of 60; a miss of 1 results in a gate radius of 60.5; and a miss of 2 results in a gate radius of 61.

[0085] By obtaining the predicted position and confidence of the ball's center through historical tracking information, and combining it with target detection from a convolutional neural network to obtain candidate positions, the selection between candidate and predicted positions is completed using the gating radius. Corresponding target positions and target confidence are generated in both successful and unsuccessful detection matching scenarios. This approach can balance the accuracy of real image observation with the continuity of motion model extrapolation, achieving stable tracking of the soccer target across frames and providing continuous and reliable ball center tracking information for subsequent extraction of evidence related to goal events.

[0086] Figure 4 The flowchart illustrates the method for detecting goal events, as follows: Figure 4 As shown, a method for detecting a goal event according to an embodiment of this application may include: Step 410: Obtain video frames within the current time window; where the current time window represents a window of a preset time length prior to the current moment; Step 420: For each video frame within the current time window, determine the goal area and ball center tracking information in the video frame; whereby, the ball center tracking information represents the position information of the ball center and the accuracy of the position information; Step 430: If a video frame contains multiple target locations, generate multiple motion trajectories according to the order of the video frames in the current time window; wherein, the motion trajectory represents the movement path of the ball's center within the current time window, and the trajectory points of the motion trajectory are the target locations. Step 440: For each motion trajectory, determine the trajectory confidence based on the target confidence corresponding to each trajectory point in the motion trajectory; where the trajectory confidence represents the degree of authenticity of the motion trajectory. Step 450: If the trajectory confidence of the motion trajectory meets the preset confidence condition, then determine whether a goal event exists based on the target position corresponding to each trajectory point in the motion trajectory and the goal area in each video frame within the current time window.

[0087] Steps 410 and 420 have been described in detail above and will not be repeated here. Steps 430-450 will be described in detail below.

[0088] In step 430, for the current time window, multiple sets of ball center tracking information arranged in time sequence within the current time window are connected in series to form a motion trajectory that can reflect the changes in the movement of the football.

[0089] When more than one target location is identified within the same video frame, it indicates the presence of multiple points in the image that are recognized as a soccer ball. The target locations at different times need to be grouped and associated according to the temporal order of the video frames within the current time window to generate multiple motion trajectories. For example, if two target locations appear in the second video frame, the motion trajectory can branch out from the second frame, generating two motion trajectories. If subsequent video frames show multiple target locations, new trajectory branches can be generated. Each trajectory consists of multiple trajectory points, each corresponding to a target location. The number of trajectory points in the motion trajectory matches the number of video frames within the current time window.

[0090] In step 440, the motion trajectory represents the complete movement path of the ball's center within the current time window. It consists of a sequence of trajectory points arranged in time. The trajectory points of the motion trajectory are the target positions corresponding to each frame, and each trajectory point carries its own target confidence.

[0091] After generating multiple motion trajectories, for each trajectory, the trajectory confidence is determined based on the target confidence corresponding to each trajectory point within the trajectory. The trajectory confidence represents the realism of the entire motion trajectory, used to distinguish trajectories that better reflect real football movement from multiple candidate trajectories, filtering out low-confidence trajectories formed by image noise and false detection targets, and reducing the computational burden and risk of misjudgment caused by invalid trajectories participating in subsequent goal determination. For example, the trajectory confidence can be calculated as the average of the target confidence corresponding to each trajectory point.

[0092] In step 450, after calculating the trajectory confidence level for each trajectory, it is determined whether the trajectory confidence level of the trajectory meets a preset confidence level condition. The preset confidence level condition is a pre-set evaluation criterion used to filter valid trajectories. It can be a single threshold comparison condition or a relative filtering condition between multiple trajectories. Only trajectories whose trajectory confidence level meets the preset confidence level condition can enter the subsequent goal event determination process; trajectories that do not meet the confidence level condition will no longer participate in subsequent evidence extraction and event determination. For example, the preset confidence level condition could be to sort the trajectories from highest to lowest confidence level, retain the top K trajectories, and discard the rest. If there are fewer than K trajectories, all are retained.

[0093] For the retained motion trajectories after filtering, a goal event is determined by combining the target positions corresponding to each trajectory point with the goal areas corresponding to each video frame within the current time window. For example, the target position of a trajectory point is used as the temporal position of the ball's center, and the goal area of ​​the corresponding video frame is used as the spatial judgment benchmark. The spatial relationship between the ball's center and the goal area is compared point by point to extract event evidence at the trajectory level. Finally, all evidence is combined to determine whether a goal event exists within the current time window. When no motion trajectory meets the confidence condition, it can be directly determined that no goal event exists within the current time window.

[0094] When multiple target locations are present, multiple motion trajectories are generated in chronological order. The target confidence of the trajectory points is aggregated to obtain the trajectory confidence, which represents the authenticity of the trajectory. After filtering the valid motion trajectories using the confidence conditions, the event judgment is carried out by combining the target location and the goal area. This can filter out unreliable trajectories generated by false detection. Using the complete temporal motion path as the basis for analysis, the judgment bias caused by isolated points in a single frame is avoided, and the accuracy of the goal event recognition result is improved.

[0095] In one implementation, determining whether a goal event exists based on the target positions corresponding to each trajectory point in the motion trajectory and the goal area in each video frame within the current time window includes: acquiring a first scoring rule and a second scoring rule; the first scoring rule is the rule for proving a goal, and the second scoring rule is the rule for proving a goal was not scored; the first scoring rule corresponds one-to-one with a first weight, and the second scoring rule corresponds one-to-one with a second weight; the first weight represents the importance of the first scoring rule, and the second weight represents the importance of the second scoring rule; for each first scoring rule, a first target point is determined from each trajectory point in the motion trajectory, and if the target point corresponds to the first target point... If the trajectory of a moving object satisfies a first scoring rule, then the first weight corresponding to the first scoring rule is obtained. For each second scoring rule, a second target point is determined from each trajectory point of the trajectory. If the trajectory satisfies a second scoring rule based on the target position corresponding to the second target point and the goal area in the video frame corresponding to the second target point, then the second weight corresponding to the second scoring rule is obtained. Based on the obtained first and second weights, the scoring value information of the trajectory is determined. The scoring value information represents the probability of scoring a goal. If the scoring value information is within a preset scoring value range, then a goal event is determined to have occurred.

[0096] Specifically, multiple first-level scoring rules and multiple second-level scoring rules are pre-set. First-level scoring rules are positive evidence used to prove a goal was scored, while second-level scoring rules are negative evidence used to prove a goal was not scored. The first-level scoring rules correspond to various temporal-spatial conditions that indicate a goal was scored. Each first-level scoring rule has a one-to-one correspondence with a first weight, which represents the importance of the corresponding first-level scoring rule within the overall judgment system. Different first-level scoring rules can be configured with different first weights to differentiate the contribution of different positive evidence to the conclusion of a goal scored. Similarly, second-level scoring rules correspond to various temporal-spatial conditions that indicate a goal was not scored. Each second-level scoring rule has a one-to-one correspondence with a second weight, which represents the importance of the corresponding second-level scoring rule within the overall judgment system. Different second-level scoring rules can be configured with different second weights to differentiate the contribution of different negative evidence to the conclusion of a goal not scored.

[0097] The first scoring rule can include rules for determining whether a goal is "disappeared from the goal," "stopped from the goal," "reappeared in the net," or "entered the goal area." These situations can be considered positive evidence of a goal. The second scoring rule can include rules for determining whether a goal is "reversed from the goal," "left the goal area," or "never approached." These situations can be considered negative evidence of a goal. Table 1 shows an illustration of positive evidence, and Table 2 shows an illustration of negative evidence.

[0098] Table 1. Schematic diagram of positive evidence

[0099] Table 2. Schematic diagram of negative evidence

[0100] Authentic and valid trajectory points refer to trajectory points obtained from candidate locations detected by a pre-defined target detection model.

[0101] For each first scoring rule, trajectory points corresponding to the first scoring rule are selected from all trajectory points included in the motion trajectory as first target points. The first target point is one or more trajectory points used to verify the current first scoring rule; it is the analysis object for performing the first scoring rule verification. The first target point carries the target position and the goal area information corresponding to its video frame to complete the comparison and judgment of the rule conditions. Determining whether the motion trajectory meets the corresponding first scoring rule requires combining the target position of the first target point and the goal area corresponding to the video frame to which the first target point belongs, and checking whether the spatial position and temporal changes of the trajectory conform to all the conditions set by the first scoring rule. When it is determined that the motion trajectory meets the first scoring rule, the first weight matched by the first scoring rule is extracted and used for the calculation of subsequent scoring value information; if the corresponding conditions are not met, the first weight corresponding to the first scoring rule is not used. For example, the first target point can be the end trajectory point, the beginning trajectory point, or any trajectory point within the goal area of ​​the motion trajectory. When the same trajectory satisfies multiple first scoring rules, the first weights corresponding to all the first scoring rules that meet the conditions can be used, or some of the first weights can be selected to participate in the calculation according to the priority of the rules.

[0102] For each second scoring rule, a trajectory point corresponding to that rule is determined from all trajectory points of the motion trajectory, serving as the second target point. The second target point is one or more trajectory points used to verify the current second scoring rule. Based on the target position of the second target point and the goal area of ​​the corresponding video frame, it is determined whether the motion changes of the motion trajectory meet the conditions set by the second scoring rule. When the motion trajectory is determined to meet the corresponding second scoring rule, the second weight corresponding to that rule is obtained and used in the calculation of subsequent scoring values; if the conditions are not met, the second weight corresponding to that second scoring rule is not used. For example, the second target point can be a trajectory point near the goal area in the motion trajectory, or a trajectory point earlier or later in the time sequence within the time window. Multiple second scoring rules are independent of each other; a motion trajectory can trigger one or more second scoring rules simultaneously, thus obtaining multiple second weights.

[0103] After collecting all triggered first and second weights, the obtained first and second weights are combined to calculate the score information of the motion trajectory. The score information represents the probability of a goal event occurring for a single motion trajectory, and the scattered positive and negative evidence is aggregated through weights. The formula for calculating the score information can be: score = clip(0.5 + max(first weight)) Σ(second weight), 0, 1); Here, score represents the rating information, and clip(,0,1) represents that when it is less than 0, it is forced to be 0, and when it is greater than 1, it is forced to be 1.

[0104] For the multiple first weights obtained, the maximum value can be selected. For the multiple second weights obtained, the sum of the second weights can be calculated. Then, the maximum value of the first weights and the sum of the second weights are added to 0.5. Based on the clip function, the final score information is obtained.

[0105] For each retained motion trajectory, a corresponding score value can be obtained. If any trajectory is judged as a goal, a goal event is confirmed. A pre-set score value range is used to compare each score value with this range, determining whether a goal event exists within the current time window. The pre-set score value range is a numerical interval used to distinguish between goals and non-goals. The range can be divided into intervals corresponding to a valid goal, intervals corresponding to a invalid goal, and a transitional interval between the two. This transitional interval can be categorized as a goal or non-goal based on business requirements. When a score value falls within the pre-set score value range corresponding to a valid goal, a goal event is confirmed. For example, a score ≥ 0.65 outputs a goal; a score ≤ 0.35 outputs a non-goal. The intermediate interval (0.35, 0.65) is configured by the business scenario; in this embodiment, it can be judged as a non-goal to prioritize a low false negative rate.

[0106] Set up first and second scoring rules for corresponding goal and non-goal evidence, obtain first and second target points based on trajectory points to complete rule trigger verification, use the first and second weights after triggering to generate score value information representing the probability of a goal, and then combine the preset score value range to output the event conclusion, reduce the risk of misjudgment caused by relying solely on image visual features, and improve the interpretability and judgment stability of goal event recognition.

[0107] It should be noted that in various specific embodiments of this application, when processing is required based on data related to the characteristics of the target object, such as target object attribute information or a set of attribute information, the permission or consent of the target object will be obtained first. Furthermore, the collection, use, and processing of this data will comply with relevant regulations and standards. In addition, when embodiments of this application need to obtain target object attribute information, separate permission or consent from the target object will be obtained through pop-ups or redirection to a confirmation page. Only after obtaining the target object's separate permission or consent will the necessary target object-related data for the normal operation of the embodiments of this application be obtained.

[0108] Reference Figure 5 , Figure 5 This is a schematic diagram of the structure of a goal event detection device 500 provided in an embodiment of this application. The goal event detection device 500 includes: The video frame acquisition module 501 is used to acquire video frames within the current time window; wherein, the current time window represents a window with a preset time length before the current moment. The information determination module 502 is used to determine the goal area and ball center tracking information in each video frame within the current time window; wherein, the ball center tracking information represents the position information of the ball center and the accuracy of the position information; The goal detection module 503 is used to determine whether a goal event has occurred based on the goal area and ball center tracking information in each video frame within the current time window.

[0109] In one example, the information determination module 502 includes: The goal determination unit is used to perform line detection on video frames to obtain the goal area in the video frames; The ball center tracking unit is used to determine the ball center tracking information in the video frame based on historical tracking information; wherein, the historical tracking information is the ball center tracking information determined in the previous video frame.

[0110] In one example, the goal-determining unit is specifically used for: Based on the preset Hough line transform algorithm, line detection is performed on the video frame to obtain the horizontal and vertical line segments in the video frame; where the horizontal line segment represents the line segment with the slope within a first preset range, and the vertical line segment represents the line segment with the slope within a second preset range. Based on the size information of the video frame and the endpoint coordinates of each vertical line segment, the gatepost line segment pairs are determined from each vertical line segment; wherein, the gatepost line segment pair includes two gatepost line segments, and the endpoint coordinates of the vertical line segment include the endpoint coordinates of the upper endpoint and the lower endpoint. Based on the size information of the video frame, the endpoint coordinates of each horizontal line segment, and the endpoint coordinates of each gatepost line segment aligned with the gatepost line segment, the beam line segment is determined from each horizontal line segment; wherein, the endpoint coordinates of the horizontal line segment include the endpoint coordinates of the left endpoint and the endpoint coordinates of the right endpoint. The goal area in the video frame is determined by aligning the endpoint coordinates of each goalpost segment and the endpoint coordinates of the crossbar segment.

[0111] In one example, the size information of the video frame includes width and height information; the goal determination unit is specifically used for: For each vertical line segment, determine the horizontal and vertical projection lengths of the vertical line segment based on the coordinates of its endpoints. Based on the height information of the video frame, the horizontal projection length and the vertical projection length of each vertical line segment, at least two candidate goalposts are determined from each vertical line segment; The candidate goalposts are paired up to obtain candidate goalpost pairs; Based on the width and height information of the video frame, as well as the endpoint coordinates of the candidate goalposts in each candidate goalpost pair, the goalpost line segment pairs are determined from each candidate goalpost pair.

[0112] In one example, the size information of the video frame includes width and height information; the goal determination unit is specifically used for: For each horizontal line segment, determine the horizontal and vertical projection lengths of the line segment based on the coordinates of its endpoints. Based on the width information of the video frame, the horizontal projection length and vertical projection length of each horizontal line segment, candidate beams are determined from each horizontal line segment; Based on the height information of the video frame, the endpoint coordinates of each goalpost segment in the goalpost alignment, and the endpoint coordinates of each candidate crossbeam, the crossbeam segments are determined from each candidate crossbeam.

[0113] In one example, the goal-determining unit is specifically used for: Construct the goal quadrilateral based on the endpoint coordinates of the goalpost segments and the endpoint coordinates of the crossbar segments. The goal region in the video frame is determined based on the area covered by the goal quadrilateral in the video frame; wherein, the goal region includes a first region and a second region, the first region represents the area covered by the goal quadrilateral, and the second region represents the area outside the first region obtained by expanding the goal quadrilateral according to a preset ratio.

[0114] In one example, it also includes: The rectangle determination module is used to determine the circumscribed rectangle of the goal quadrilateral in the video frame; The pixel determination module is used to perform edge extraction processing on the thin grid lines within the outer rectangle to obtain the number of edge pixels and determine the total number of pixels in the outer rectangle; whereby the number of edge pixels represents the number of pixels within the outer rectangle that belong to the thin grid lines. The density determination module is used to determine the mesh density value of the circumscribed rectangle based on the number of edge pixels and the total number of pixels; wherein, the mesh density value characterizes the density of the mesh within the circumscribed rectangle; The halftone pattern verification module is used to determine the goal area in the video frame based on the area covered by the goal quadrilateral in the video frame if the halftone pattern density value is within a preset density range.

[0115] In one example, the ball center tracking information includes target position and target confidence. The target position represents the location information of the ball center in the video frame, and the target confidence represents the accuracy of the position information. The ball center tracking unit is specifically used for: Based on historical tracking information and a preset Kalman filter, the predicted position and prediction confidence of the sphere's center in the video frame are predicted; where the prediction confidence represents the accuracy of the predicted position. Based on a pre-set target detection model, the center of the sphere is detected in the video frame to obtain the candidate position of the center of the sphere in the video frame; wherein, the pre-set target detection model is a pre-trained convolutional neural network model. If the distance between the candidate position and the predicted position is less than or equal to the preset gating radius, the candidate position is determined as the target position, and the prediction confidence is updated according to the target position to obtain the target confidence. If the distance between the candidate position and the predicted position is greater than the preset gating radius, the predicted position is determined as the target position, and the predicted confidence is determined as the target confidence.

[0116] In one example, the ball center tracking information includes target position and target confidence, where target position represents the position information of the ball center in the video frame, and target confidence represents the accuracy of the position information; the goal detection module 503 includes: The trajectory generation unit is used to generate multiple motion trajectories based on the order of the video frames in the current time window if there are multiple target locations in the video frames; wherein, the motion trajectory represents the movement path of the ball's center in the current time window, and the trajectory points of the motion trajectory are the target locations; The confidence determination unit is used to determine the trajectory confidence of each motion trajectory based on the target confidence corresponding to each trajectory point in the motion trajectory; where the trajectory confidence represents the degree of authenticity of the motion trajectory. The goal detection unit is used to determine whether a goal event exists based on the target position corresponding to each trajectory point in the motion trajectory and the goal area in each video frame within the current time window, if the trajectory confidence of the motion trajectory meets the preset confidence condition.

[0117] In one example, the goal detection unit is specifically used for: Obtain the first scoring rule and the second scoring rule; wherein, the first scoring rule is the rule for proving a goal, and the second scoring rule is the rule for proving a goal was not scored. The first scoring rule corresponds one-to-one with the first weight, and the second scoring rule corresponds one-to-one with the second weight. The first weight represents the importance of the first scoring rule, and the second weight represents the importance of the second scoring rule. For each first scoring rule, the first target point is determined from each trajectory point of the motion trajectory. If the motion trajectory satisfies the first scoring rule based on the target position corresponding to the first target point and the goal area in the video frame corresponding to the first target point, then the first weight corresponding to the first scoring rule is obtained. For each second scoring rule, the second target point is determined from each trajectory point of the motion trajectory. If the motion trajectory satisfies the second scoring rule based on the target position corresponding to the second target point and the goal area in the video frame corresponding to the second target point, then the second weight corresponding to the second scoring rule is obtained. Based on the obtained first and second weights, the score information of the movement trajectory is determined; whereby the score information represents the probability of scoring a goal; If the score value is within the preset score value range, then a goal event is determined to have occurred.

[0118] It should be noted that the information interaction and execution process between the above-mentioned devices / units are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, and they will not be repeated here.

[0119] Figure 6 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 6 As shown, the electronic device 600 of this embodiment includes: at least one processor 601 ( Figure 6 (Only one is shown in the diagram), memory 602, and computer program 603 stored in said memory 602 and executable on said at least one processor 601, wherein the processor 601 executes said computer program 603 to implement the steps in the embodiments of the detection methods for any of the above-described goal events.

[0120] Electronic device 600 can be a computing device such as a desktop computer, laptop, handheld computer, or cloud server. This electronic device may include, but is not limited to, a processor 601 and a memory 602. Those skilled in the art will understand that... Figure 6 This is merely an example of electronic device 600 and does not constitute a limitation on electronic device 600. It may include more or fewer components than shown, or combine certain components, or different components, such as input / output devices, network access devices, etc.

[0121] The processor 601 may be a Central Processing Unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.

[0122] In some embodiments, the memory 602 may be an internal storage unit of the electronic device 600, such as a hard disk or memory of the electronic device 600. In other embodiments, the memory 602 may be an external storage device of the electronic device 600, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the electronic device 600. Furthermore, the memory 602 may include both internal and external storage units of the electronic device 600. The memory 602 is used to store the operating system, applications, bootloader, data, and other programs, such as the program code of the computer program. The memory 602 can also be used to temporarily store data that has been output or will be output.

[0123] This application also provides an electronic device, which includes: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, wherein the processor executes the computer program to implement the steps in any of the above method embodiments.

[0124] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps described in the various method embodiments above.

[0125] This application provides a computer program product that, when run on a mobile terminal, enables the mobile terminal to implement the steps described in the above-described method embodiments.

[0126] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments of this application can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include at least: any entity or device capable of carrying the computer program code to a photographic device / terminal device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electrical carrier signals or telecommunication signals.

[0127] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. A method for detecting a goal event, characterized in that, include: Acquire video frames within the current time window; wherein, the current time window represents a window of a preset time length prior to the current moment; For each video frame within the current time window, determine the goal area and ball center tracking information in the video frame; wherein, the ball center tracking information represents the position information of the ball center and the accuracy of the position information; Based on the goal area and ball center tracking information in each video frame within the current time window, determine whether a goal event has occurred.

2. The method according to claim 1, characterized in that, Determining the goal area and ball center tracking information in the video frame includes: Line detection is performed on the video frame to obtain the goal area in the video frame; Based on historical tracking information, the ball center tracking information in the video frame is determined; wherein, the historical tracking information is the ball center tracking information determined in the previous video frame.

3. The method according to claim 2, characterized in that, The step of performing line detection on the video frame to obtain the goal area in the video frame includes: Based on the preset Hough line transform algorithm, line detection is performed on the video frame to obtain horizontal and vertical line segments in the video frame; wherein, the horizontal line segment represents a line segment with a slope within a first preset range, and the vertical line segment represents a line segment with a slope within a second preset range. Based on the size information of the video frame and the endpoint coordinates of each vertical line segment, a pair of gatepost line segments is determined from each vertical line segment; wherein, the pair of gatepost line segments includes two gatepost line segments, and the endpoint coordinates of the vertical line segment include the endpoint coordinates of the upper endpoint and the lower endpoint. Based on the size information of the video frame, the endpoint coordinates of each of the horizontal line segments, and the endpoint coordinates of each of the doorpost line segments aligned with the doorpost line segments, the beam line segment is determined from each of the horizontal line segments; wherein, the endpoint coordinates of the horizontal line segment include the endpoint coordinates of the left endpoint and the endpoint coordinates of the right endpoint. The goal area in the video frame is determined based on the endpoint coordinates of the goalpost segments and the endpoint coordinates of the crossbeam segments.

4. The method according to claim 3, characterized in that, The size information of the video frame includes width and height information; The step of determining the gatepost line segment pairs from each of the vertical line segments based on the size information of the video frame and the endpoint coordinates of each of the vertical line segments includes: For each vertical line segment, the horizontal projection length and vertical projection length of the vertical line segment are determined based on the coordinates of its endpoints. Based on the height information of the video frame, the horizontal projection length and the vertical projection length of each vertical line segment, at least two candidate goalposts are determined from each vertical line segment; The candidate goalposts are combined in pairs to obtain candidate goalpost pairs; Based on the width and height information of the video frame, and the endpoint coordinates of the candidate gateposts in each candidate gatepost pair, the gatepost line segment pairs are determined from each candidate gatepost pair.

5. The method according to claim 3, characterized in that, The size information of the video frame includes width and height information; The step of determining the beam segment from the horizontal lines based on the size information of the video frame, the endpoint coordinates of each horizontal line segment, and the endpoint coordinates of each gatepost line segment aligned with the gatepost line segments includes: For each horizontal line segment, the horizontal projection length and vertical projection length of the horizontal line segment are determined based on the coordinates of its endpoints. Based on the width information of the video frame, the horizontal projection length and vertical projection length of each horizontal line segment, candidate beams are determined from each horizontal line segment; Based on the height information of the video frame, the endpoint coordinates of each gatepost segment in the gatepost alignment, and the endpoint coordinates of each candidate beam, the beam segment is determined from each candidate beam.

6. The method according to claim 3, characterized in that, The step of determining the goal area in the video frame based on the endpoint coordinates of the goalpost segments and the endpoint coordinates of the crossbeam segments includes: Construct a goal quadrilateral based on the endpoint coordinates of the goalpost segments and the endpoint coordinates of the crossbeam segments. The goal region in the video frame is determined based on the area covered by the goal quadrilateral in the video frame; wherein the goal region includes a first region and a second region, the first region representing the area covered by the goal quadrilateral, and the second region representing the area outside the first region obtained by expanding the goal quadrilateral according to a preset ratio.

7. The method according to claim 6, characterized in that, The method further includes: Determine the circumscribed rectangle of the goal quadrilateral in the video frame; Edge extraction processing is performed on the thin grid lines within the circumscribed rectangle to obtain the number of edge pixels and determine the total number of pixels in the circumscribed rectangle; wherein, the number of edge pixels represents the number of pixels within the circumscribed rectangle that belong to the thin grid lines; The mesh density value of the circumscribed rectangle is determined based on the number of edge pixels and the total number of pixels; wherein the mesh density value characterizes the density of the mesh within the circumscribed rectangle. If the mesh density value is within a preset density range, then the process of determining the goal area in the video frame based on the area covered by the goal quadrilateral in the video frame is performed.

8. The method according to claim 2, characterized in that, The ball center tracking information includes target position and target confidence. The target position represents the position information of the ball center in the video frame, and the target confidence represents the accuracy of the position information. The step of determining the ball center tracking information in the video frame based on historical tracking information includes: Based on the historical tracking information and a preset Kalman filter, the predicted position and prediction confidence of the sphere center in the video frame are predicted; wherein, the prediction confidence represents the accuracy of the predicted position. Based on a preset target detection model, the video frame is processed to detect the center of the sphere, thereby obtaining candidate positions of the center of the sphere in the video frame; wherein, the preset target detection model is a pre-trained convolutional neural network model; If the distance between the candidate position and the predicted position is less than or equal to a preset gating radius, then the candidate position is determined as the target position, and the predicted confidence is updated according to the target position to obtain the target confidence. If the distance between the candidate position and the predicted position is greater than a preset gating radius, then the predicted position is determined as the target position, and the predicted confidence level is determined as the target confidence level.

9. The method according to claim 1, characterized in that, The ball center tracking information includes target position and target confidence. The target position represents the position information of the ball center in the video frame, and the target confidence represents the accuracy of the position information. The step of determining whether a goal event has occurred based on the goal area and ball center tracking information in each video frame within the current time window includes: If a video frame contains multiple target locations, multiple motion trajectories are generated according to the order of the video frames within the current time window; wherein, the motion trajectory represents the movement path of the ball's center within the current time window, and the trajectory points of the motion trajectory are the target locations; For each motion trajectory, the trajectory confidence is determined based on the target confidence corresponding to each trajectory point in the motion trajectory; wherein, the trajectory confidence represents the degree of authenticity of the motion trajectory. If the trajectory confidence of the motion trajectory meets the preset confidence condition, then based on the target position corresponding to each trajectory point in the motion trajectory and the goal area in each video frame within the current time window, it is determined whether a goal event exists.

10. The method according to claim 9, characterized in that, The step of determining whether a goal event has occurred based on the target positions corresponding to each trajectory point in the motion trajectory and the goal area in each video frame within the current time window includes: Obtain a first scoring rule and a second scoring rule; wherein, the first scoring rule is the rule for proving a goal, the second scoring rule is the rule for proving a goal was not scored, the first scoring rule corresponds one-to-one with a first weight, the second scoring rule corresponds one-to-one with a second weight, the first weight represents the importance of the first scoring rule, and the second weight represents the importance of the second scoring rule; For each first scoring rule, a first target point is determined from each trajectory point of the motion trajectory. If the motion trajectory satisfies the first scoring rule based on the target position corresponding to the first target point and the goal area in the video frame corresponding to the first target point, then the first weight corresponding to the first scoring rule is obtained. For each second scoring rule, a second target point is determined from each trajectory point of the motion trajectory. If the motion trajectory satisfies the second scoring rule based on the target position corresponding to the second target point and the goal area in the video frame corresponding to the second target point, then the second weight corresponding to the second scoring rule is obtained. Based on the obtained first weight and second weight, the score information of the movement trajectory is determined; wherein, the score information represents the probability of scoring a goal; If the score value information is within the preset score value range, then a goal event is determined to have occurred.