Basketball skill and tactic real-time analysis system based on large language model
Patent Information
- Application Number
- CN202611099949.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-23
- Publication Date
- 2026-10-13
AI Technical Summary
[0003]然而,现有技术存在以下明显缺陷:第一,相关性与因果性混淆,现有系统大多基于统计相关性进行分析,无法区分战术行动与比赛结果之间的真实因果关系和单纯的伴随现象,例如系统可能发现挡拆后换防与底角三分空位之间存在强相关性,但无法判断前者是否因果性地导致了后者的形成,使得分析结果的指导价值大打折扣;第二,缺乏反事实推理能力,现有系统只能对已经发生的比赛事件进行描述性分析,无法回答假设性问题,无法为教练提供前瞻性的战术决策支持;第三,可解释性差,大多数深度学习模型是黑箱模型,即使能够给出准确的预测结果,也无法解释为什么会得出这样的结论;第四,交互方式不友好,现有系统通常需要教练具备一定的数据分析能力,通过复杂的操作界面获取分析结果,无法支持自然语言交互,在比赛紧张的暂停时间内使用效率低下
本发明通过自主构建篮球领域专用大语言模型,使系统能够准确识别挡拆、换防、传切配合等复杂战术事件及其内在逻辑,在此基础上,将该模型与带约束因果结构相结合,利用时空加权因果强度计算公式从比赛数据中自动挖掘出战术因果图结构,并通过时间延迟约束和空间位置约束过滤掉大量虚假关联,从而区分开战术行动之间的因果关系与单纯的伴随现象,同时,基于结构因果模型和后门调整准则搭建反事实推理框架,教练可以直接用自然语言提出假设性问题,系统能在战术因果图上执行干预操作,综合球员体能、比赛时间、比分差距等上下文因素进行多步概率推演,并利用大语言模型的生成能力输出包含关键节点分析和战术建议在内的可解释说明,为教练提供了前瞻性决策支持。
Smart Images

Figure CN122905064A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of sports artificial intelligence technology, specifically a real-time basketball skills and tactics analysis system based on a large language model. Background Technology
[0002] With the rapid development of artificial intelligence technology, basketball game analysis has moved from the traditional manual statistical stage to the data-driven intelligent analysis stage. In existing technologies, most basketball analysis systems use machine learning and deep learning algorithms to perform correlation analysis on game data in order to predict game results or evaluate player performance. These systems typically collect game video data in real time through multiple high-definition cameras deployed around the basketball court, combine object detection algorithms and multi-object tracking algorithms to obtain player and basketball motion status data, and use event recognition models based on video pre-trained models to automatically identify various game events such as pick-and-roll, switching, passing, and shooting. Finally, the collected multimodal data is converted into standardized tactical event sequence data for analysis.
[0003] However, existing technologies have the following obvious drawbacks: First, they confuse correlation with causation. Most existing systems rely on statistical correlation for analysis, failing to distinguish between the true causal relationship between tactical actions and game results and mere accompanying phenomena. For example, a system might find a strong correlation between a switch after a pick-and-roll and an open three-pointer in the corner, but it cannot determine whether the former causally led to the latter, significantly diminishing the guiding value of the analysis results. Second, they lack counterfactual reasoning capabilities. Existing systems can only perform descriptive analysis of past game events, unable to answer hypothetical questions or provide coaches with forward-looking tactical decision support. Third, they have poor interpretability. Most deep learning models are black-box models; even if they can provide accurate predictions, they cannot explain why such conclusions are reached. Fourth, their interaction methods are unfriendly. Existing systems typically require coaches to possess certain data analysis skills and obtain analysis results through complex interfaces, lacking support for natural language interaction and being inefficient during tense timeouts in games. Summary of the Invention
[0004] The purpose of this invention is to overcome the shortcomings of existing technologies and provide a real-time basketball tactics and techniques analysis system based on a large language model. By independently constructing a basketball-specific large language model, it utilizes its semantic understanding capabilities to convert standardized tactical event sequence data into high-dimensional semantic vector representations. A spatiotemporal weighted causal strength calculation formula is used to quantify the strength of causal relationships between tactical events. Simultaneously, it introduces time delay constraints and spatial location constraints unique to the basketball tactics domain, and filters out spurious causal relationships through conditional independence testing. This allows for the automatic identification of sparse tactical causal graph structures from game data, distinguishing causal relationships from accompanying phenomena. Based on this, a counterfactual reasoning framework is constructed using a structural causal model and a backdoor adjustment criterion. This framework supports coaches in posing hypothetical questions in natural language, performing interpretable multi-step counterfactual deductions, and outputting quantitative results. Furthermore, it is equipped with a natural language interaction module and a visualization module, supporting voice interaction and intuitively displaying analysis results in the form of directed acyclic graphs, animated comparisons, etc., thereby providing real-time tactical decision support for basketball coaches.
[0005] To solve the above-mentioned technical problems, the present invention provides the following technical solution: a real-time basketball tactics and skills analysis system based on a large language model, the system comprising: Multimodal data acquisition and preprocessing module: Real-time acquisition of video data, player tracking data, event data and statistical data of basketball games, and preprocessing to generate standardized tactical event sequence data; The causal structure discovery module in the basketball tactics domain connects with the multimodal data acquisition and preprocessing module. It utilizes the semantic understanding capabilities of a large language model to automatically identify sparse tactical causal graph structures from standardized tactical event sequence data, and distinguishes the causal relationships and accompanying phenomena between tactical actions. Counterfactual deduction module: Connected to the causal structure discovery module in the basketball tactics domain, based on the constructed tactical causal graph, it receives users' natural language hypothetical questions, performs interpretable multi-step counterfactual deduction, and outputs quantitative deduction results; Natural Language Interaction Module: Connected to the Counterfactual Inference Module, it receives natural language queries from users and converts the output of the Counterfactual Inference Module into natural language responses; Visualization module: Connected to the causal structure discovery module and counterfactual deduction module in the field of basketball tactics, respectively, it is used to visualize the tactical causal graph structure and the counterfactual deduction process and results.
[0006] Furthermore, the multimodal data acquisition and preprocessing module synchronously acquires game video data through multiple high-definition cameras deployed around the basketball court, tracks the movement status data of players and the basketball in real time, obtains game event data and technical statistics through official data interfaces, and converts all data into standardized tactical event sequence data in a unified format.
[0007] Furthermore, the basketball tactics domain causal structure discovery module is based on a large language model. It uses basketball game commentary texts, tactical analysis reports, and coaching manuals for supervised fine-tuning to construct a basketball-specific large language model. The large language model is then used to convert standardized tactical event sequence data into high-dimensional semantic vector representations. Based on the semantic vector representations of tactical events and causal constraints, a spatiotemporal weighted causal strength calculation formula is used to quantify the causal relationship strength between each pair of tactical events. During the learning process, time delay constraints and spatial location constraints specific to the basketball tactics domain are introduced, and a large number of false causal relationships are filtered out through conditional independence tests. Finally, the reasoning capabilities of the basketball-specific large language model are used to verify and correct the learned causal graph structure line by line.
[0008] Furthermore, the specific steps for the basketball tactics domain causal structure discovery module to construct a basketball-specific large language model are as follows: Collect multimodal data related to basketball games, including game video captions, official commentary texts, post-game tactical analysis articles, player interview records, and game statistical reports; clean the collected data to remove duplicate, noisy, and irrelevant data, and retain the effective content related to basketball tactics; All cleaned data were converted into a unified text format. Using a combination of automatic and manual annotation, key information on tactical events, player actions, and game scenarios in the text data was annotated to build a high-quality basketball tactics corpus. Select the general large language model as the base model and load its pre-trained weights for initialization; The basic model was incrementally pre-trained using a constructed basketball tactics domain corpus. During the incremental pre-training process, a dynamic masking strategy and contrastive learning method were adopted to improve the model's semantic understanding ability and domain adaptability. We construct a supervised dataset containing various basketball tactical analysis tasks, including tactical event classification, tactical intent recognition, and tactical process description; and use the supervised dataset to perform supervised fine-tuning on the incrementally pre-trained model to optimize the model's performance on specific tasks. Establish a comprehensive model evaluation index system, use an independent test set to evaluate the fine-tuned model, and iteratively optimize the model based on the evaluation results until the model performance meets the preset requirements.
[0009] Furthermore, the basketball tactics domain causal structure discovery module uses a spatiotemporal weighted causal strength calculation formula to quantify the causal relationship strength between each pair of tactical events. The formula expression is as follows: ,in, Indicates tactical events Tactical events The causal strength, with a value range of ; Indicates that in a given set of confusing variables Under the conditions, and Conditional mutual information between them is used to measure and The degree of statistical dependence between them; The time consistency factor is used to measure... and Does the time delay between them conform to the general rules of basketball tactics? Spatial correlation factor, used to measure and Do the spatial relationships between them conform to the general principles of basketball tactics? These are the weight coefficients for conditional mutual information, temporal consistency factor, and spatial correlation factor, respectively, satisfying... .
[0010] Furthermore, the counterfactual reasoning module constructs a counterfactual reasoning framework based on a structural causal model and causal inference criteria. It utilizes the semantic understanding capabilities of a basketball-specific large language model to analyze users' natural language hypothetical questions, extracting intervention variables, intervention values, and inference targets through named entity recognition and relation extraction techniques. Based on the extracted intervention variables and values, it intervenes in the tactical causal graph, severing all parent node connections of the intervention variables and setting the intervention variables to specified values. Based on the post-intervention causal graph, it uses a backdoor adjustment formula to calculate the probability distribution of the post-intervention results, employs a random search algorithm for multiple multi-step probability inferences, and calculates the probability distribution and expected value of the inference target. During the inference process, it dynamically adjusts the inference probability by comprehensively considering contextual factors. Finally, it leverages the generative capabilities of the basketball-specific large language model to generate a structured and interpretable description of the inference process.
[0011] Furthermore, the backdoor adjustment formula is expressed as follows: ,in, This represents the probability distribution of the outcome variable Y when the intervention variable X is forcibly set to the value x; This indicates an intervention operation on variable X, severing the connection between X and all its parent nodes; This represents the set of confusing variables that satisfy the backdoor criteria, i.e., the set of variables that can block all backdoor paths from X to Y; This represents the conditional probability distribution of Y given X=x and Z=z; This represents the prior probability distribution of the confounding variable Z taking the value of z.
[0012] Furthermore, the contextual factors include: Players' individual abilities: Point guards' probability of scoring on drives, inside players' probability of scoring from free throws, and corner players' probability of scoring from three-point range, all calculated based on historical data. Real-time physical condition: The remaining physical condition of the point guard estimated based on the distance traveled and heart rate data in this game; Defensive player status: rating the physical condition and defensive ability of the player defending the point guard; Game time: Remaining time in the current quarter; Score difference: The current score difference between the two teams.
[0013] Furthermore, the natural language interaction module constructs end-to-end natural language interaction functionality based on a basketball-specific large language model; it supports users to submit query requests in conversational natural language, including various types such as tactical analysis, player performance evaluation, and counterfactual assumptions; it uses intent recognition and slot filling technologies to understand the user's query intent and key information; it converts the structured results output by the counterfactual inference module into natural language answers, with the answer length controlled within a range suitable for rapid reading; and it supports voice input and voice output functions, employing speech recognition and speech synthesis models to achieve complete voice interaction.
[0014] Compared with existing technologies, this real-time basketball skills and tactics analysis system based on a large language model has the following advantages: This invention constructs a dedicated large language model for basketball, enabling the system to accurately identify complex tactical events such as pick-and-roll, switching, and pass-and-cut plays and their underlying logic. Based on this, the model is combined with a constrained causal structure, automatically extracting the tactical causal graph structure from game data using a spatiotemporal weighted causal strength calculation formula. Time delay constraints and spatial location constraints filter out numerous spurious associations, thus distinguishing the causal relationships between tactical actions from mere accompanying phenomena. Simultaneously, a counterfactual reasoning framework is built based on the structural causal model and the backdoor adjustment criterion. Coaches can directly pose hypothetical questions in natural language, and the system can perform intervention operations on the tactical causal graph. It comprehensively considers contextual factors such as player fitness, game time, and score difference to perform multi-step probabilistic deductions, and utilizes the generative capabilities of the large language model to output interpretable explanations including key node analysis and tactical suggestions, providing coaches with forward-looking decision support.
[0015] Other advantages, objectives and features of the invention will be set forth in part in the description which follows, and in part will be apparent to those skilled in the art from the following examination or study, or may be learned from the practice of the invention. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are merely some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without any creative effort.
[0017] Figure 1 This is a block diagram of a real-time basketball skills and tactics analysis system based on a large language model. Figure 2 This is a flowchart of the causal structure discovery module in the basketball tactics domain of a real-time basketball skills and tactics analysis system based on a large language model. Figure 3 This is a flowchart of the counterfactual reasoning module of a real-time basketball skills and tactics analysis system based on a large language model. Detailed Implementation
[0018] To further illustrate the technical means and effects of the present invention in achieving its intended purpose, the following detailed description of the specific implementation methods, structures, features, and effects of the present invention, in conjunction with the accompanying drawings and preferred embodiments, is provided below.
[0019] Reference Figure 1 This invention proposes a real-time basketball tactics and techniques analysis system based on a large language model. It adopts a data processing mechanism that uses a self-constructed basketball-specific large language model and a constrained causal structure learning algorithm to achieve accurate separation of tactical causal relationships and accompanying phenomena, and to perform high-confidence real-time analysis and counterfactual inference of the execution effect of basketball tactics and techniques.
[0020] Specifically, the multimodal data acquisition and preprocessing module of this invention acquires and standardizes the original game data; the basketball tactics domain causal structure discovery module uses a self-constructed domain large language model to perform deep semantic encoding on tactical events, and automatically learns the sparse tactical causal graph structure from the data by introducing causal strength calculation with spatiotemporal constraints; the counterfactual inference module performs causal intervention operations based on the learned causal graph, and performs quantitative inference on hypothetical tactical choices through backdoor adjustment criteria; the natural language interaction module realizes seamless natural language communication between the coach and the system; and the visualization module transforms the abstract calculation results into intuitive graphical displays.
[0021] Specifically, the multimodal data acquisition and preprocessing module synchronously acquires game video data at a preset frame rate using multiple high-definition cameras deployed around the basketball court. Simultaneously, it utilizes computer vision algorithms to extract real-time motion data from the video data, including the position, speed, acceleration, and direction of motion of all players and the basketball. It also obtains game event data and technical statistics through official data interfaces. The module thoroughly cleans all acquired data, removing duplicates, missing data, and abnormal data. For player tracking data, it employs a Kalman filter algorithm to smooth the motion trajectory and eliminate noise caused by camera shake and obstruction. Using the system's unified clock as a reference, the module precisely aligns video data, player tracking data, event data, and statistical data according to timestamps, ensuring that different types of data at the same moment correspond accurately.
[0022] The multimodal data acquisition and preprocessing module takes the attacking team gaining possession of the ball as the starting point and the end of the attack as the ending point, dividing the continuous game data into multiple independent attacking rounds. It extracts tactical event features from the data of each attacking round. Each tactical event includes fields such as timestamp, event type, participating players, spatial position, and event result. All tactical events in each attacking round are arranged in chronological order, and finally a standardized tactical event sequence dataset stored in a unified JSON format is generated.
[0023] For example, the multimodal data acquisition and preprocessing module acquires complete data from a professional basketball game, including 4 quarters of high-definition video totaling 48 minutes, player tracking data with a sampling frequency of 25Hz, timestamp records of all game events, and full-game technical statistics of both teams' players. It removes three instances of positional jumps caused by player obstruction from the original player tracking data, smooths the movement trajectories of all players, precisely aligns the timestamps of the video frames with the timestamps of the player tracking data, segments the game data, and obtains a total of 186 complete offensive possessions. Each offensive possession contains an average of 12 tactical events, ultimately generating a standardized tactical event sequence dataset containing approximately 2200 tactical events.
[0024] The base model uses the Qwen-7B-v2 large language model, initialized with its pre-trained weights. Incremental pre-training parameters are set as follows: learning rate 1e-5, batch size 32, 3 training epochs, and maximum sequence length 512. The contrastive learning method employs the SimCSE unsupervised contrastive learning framework, using InfoNCE loss with a temperature coefficient of 0.05. Supervised fine-tuning parameters are set as follows: learning rate 2e-5, batch size 16, 5 training epochs, using a cosine annealing learning rate scheduling strategy, and a weight decay coefficient of 1e-4. The model evaluation metrics include: accuracy and F1 score for tactical event classification (preset requirement ≥92%), accuracy and F1 score for tactical intent recognition (preset requirement ≥88%), and BLEU-4 score for tactical process description (preset requirement ≥0.75). Specifically, such as Figure 2 As shown, the causal structure discovery module in the basketball tactics domain employs a dedicated large language model for the basketball domain. It collects multimodal data related to basketball games, including game video subtitles, official commentary texts, post-game tactical analysis articles, player interviews, and game statistics reports. After cleaning the collected data, it retains the effective content related to basketball tactics. All data is converted into a unified text format, and a combination of automatic and manual annotation is used to label key information such as tactical events, player actions, and game scenarios in the text data, constructing a high-quality corpus for the basketball tactics domain. The causal structure discovery module selects a high-performance general-purpose large language model as the base model, loads its pre-trained weights for initialization, and incrementally pre-trains the base model using the constructed basketball tactics domain corpus. Dynamic masking strategies and contrastive learning methods are employed to improve the model's semantic understanding ability and domain adaptability. The causal structure discovery module in the basketball tactics domain constructs a supervised dataset containing various basketball tactical analysis tasks, performs supervised fine-tuning on the incrementally pre-trained model, establishes a comprehensive model evaluation index system, evaluates the fine-tuned model using an independent test set, iteratively optimizes based on the evaluation results, and finally quantizes and compresses the trained model and deploys it to edge computing devices.
[0025] The causal structure discovery module in the basketball tactics domain utilizes a large language model specifically designed for the basketball domain to convert the structured features of each tactical event into natural language descriptive text. The tactical event descriptive text is then input into the model, and the output of the last hidden layer of the model is extracted as a high-dimensional semantic vector representation of the tactical event.
[0026] The specific steps for constructing a large language model specifically for the basketball domain are as follows: Collect multimodal data related to basketball games, including game video captions, official commentary texts, post-game tactical analysis articles, player interview records, and game statistical reports; clean the collected data to remove duplicate, noisy, and irrelevant data, and retain the effective content related to basketball tactics; All cleaned data were converted into a unified text format. Using a combination of automatic and manual annotation, key information on tactical events, player actions, and game scenarios in the text data was annotated to build a high-quality basketball tactics corpus. Select the general large language model as the base model and load its pre-trained weights for initialization; The basic model was incrementally pre-trained using a constructed basketball tactics domain corpus. During the incremental pre-training process, a dynamic masking strategy and contrastive learning method were adopted to improve the model's semantic understanding ability and domain adaptability. We construct a supervised dataset containing various basketball tactical analysis tasks, including tactical event classification, tactical intent recognition, and tactical process description; and use the supervised dataset to perform supervised fine-tuning on the incrementally pre-trained model to optimize the model's performance on specific tasks. Establish a comprehensive model evaluation index system, use an independent test set to evaluate the fine-tuned model, and iteratively optimize the model based on the evaluation results until the model performance meets the preset requirements.
[0027] For each pair of tactical events X and Y, the module calculates the spatiotemporal weighted causal strength of X with respect to Y, which serves as the core basis for determining whether a causal relationship exists. This calculation process can be expressed as follows: In the formula, Indicates tactical events Tactical events The causal strength, with a value range of ; Indicates that in a given set of confusing variables Under the conditions, and Conditional mutual information between them is used to measure and The degree of statistical dependence between them; The time consistency factor is used to measure... and Does the time delay between them conform to the general rules of basketball tactics? Spatial correlation factor, used to measure and Do the spatial relationships between them conform to the general principles of basketball tactics? These are the weight coefficients for conditional mutual information, temporal consistency factor, and spatial correlation factor, respectively, satisfying... .
[0028] The time consistency factor The calculation formula is: ,in For tactical events and The actual time difference between them The standard time delay mean for this type of tactical event pair, when Exceeding When the interval is, Set directly to .
[0029] The spatial correlation factor The calculation formula is: ,in For the event Players and events involved at the time of occurrence The spatial Euclidean distance of the player at the time of occurrence. The maximum reasonable spatial distance for this type of tactical event pair; when hour, Set directly to .
[0030] The weighting coefficient , , The initial value was determined using the analytic hierarchy process (AHP) combined with historical data calibration. , , Subsequent iterations using 10-fold cross-validation optimized the error to less than [value missing]. The causal strength threshold is set to ,when At that time, determine the tactical event and There are candidate causal relationships.
[0031] The basketball tactics domain causal structure discovery module compares the calculated causal strength with a preset threshold. For tactical event pairs with causal strength exceeding the threshold, conditional independence is further tested using chi-square and mutual information tests to determine whether a statistical dependency still exists between the two events while controlling for confounding variables. This filters out a large number of spurious causal relationships. The basketball tactics domain causal structure discovery module utilizes the reasoning capabilities of a basketball-specific large language model to verify and correct the preliminary causal graph structure line by line. For each candidate causal edge, the large language model analyzes a large number of offensive rounds containing the two events to determine whether the former event actually led to the formation of the latter event, ultimately obtaining an accurate sparse tactical causal graph structure.
[0032] The conditional independence test employs a dual verification method combining the chi-square test and the mutual information test: the significance level α for the chi-square test is set to 0.05, and the degrees of freedom are... Where r is the number of value categories of X and c is the number of value categories of Y. When the p-value of the chi-square test is <0.05, a statistical dependency is initially determined. The threshold for the mutual information test is set to 0.15. When the conditional mutual information is >0.15, a statistical dependency is further confirmed. The confounding variable set Z is initially selected as all tactical event variables that are statistically correlated with both X and Y and occurred earlier than X. The final judgment criterion is: when both the p-value of the chi-square test is <0.05 and the conditional mutual information is >0.15, the candidate causal edge is retained; otherwise, it is judged as a false causal relationship and is removed.
[0033] like Figure 3 As shown, the counterfactual deduction module receives the intervention variables, intervention values, and deduction targets parsed by the natural language interaction module as input parameters for counterfactual deduction. The module locates the node corresponding to the intervention variable in the tactical causal graph of the current offensive round, cuts off all parent node connections of that node to eliminate the influence of other variables on the intervention variable, and then sets the value of the intervention variable to the specified intervention value, generating a post-intervention causal graph. The counterfactual deduction module identifies the set of confounding variables Z that satisfies the backdoor criterion in the post-intervention causal graph; that is, the set of variables that can block all backdoor paths from X to Y and do not contain descendant nodes of X. The counterfactual deduction module learns the conditional probability distribution from historical match data. Prior probability distribution of confounding variables Then, the probability distribution of the intervention results is obtained by weighted summation. This calculation process is expressed as follows: ,in, This represents the probability distribution of the outcome variable Y when the intervention variable X is forcibly set to the value x; This indicates an intervention operation on variable X, severing the connection between X and all its parent nodes; This represents the set of confusing variables that satisfy the backdoor criteria, i.e., the set of variables that can block all backdoor paths from X to Y; This represents the conditional probability distribution of Y given X=x and Z=z; This represents the prior probability distribution of the confounding variable Z taking the value of z.
[0034] The method for determining the confusion variable set Z is as follows: First, a depth-first search algorithm is used to traverse all paths from X to Y in the tactical causal graph to identify all backdoor paths containing edges pointing to X; then, according to the principle of minimum variable set, the minimum variable combination that can block all backdoor paths and does not contain X descendant nodes is selected as Z; if there are multiple minimum variable sets, the set with the fewest number of variables and the lowest data acquisition difficulty is selected first.
[0035] The conditional probability distribution P(Y|X=x,Z=z) is learned from historical match data using the Bayesian network maximum likelihood estimation algorithm. For sparse data, Laplace smoothing is used with a smoothing coefficient of 1. The accuracy of the probability distribution is verified using 5-fold cross-validation, requiring the mean absolute error to be less than 0.03.
[0036] The counterfactual deduction module, based on the causal graph after intervention, uses the Monte Carlo random search algorithm to perform multiple multi-step probability deductions, calculating the probability distribution and expected value of the deduction target. Specifically, the state of the current offensive round is defined as the initial state, which includes information such as the position, speed, possession, game time, and score of all players. Starting from the initial state, based on the causal relationships and transition probabilities between nodes in the causal graph after intervention, the next possible tactical event is randomly selected to generate a new state. This process is repeated until the termination state (end of the attack or end of the game time) is reached, completing one deduction. By executing a preset number of independent deductions, the number of times the deduction target appears in all deductions is counted, and the probability distribution and expected value of the deduction target are calculated.
[0037] The Monte Carlo random search algorithm has a preset number of independent simulations of 10,000. The termination condition is that the probability variance of the simulation target is less than 0.001 or the maximum number of simulations is reached. The convergence is verified by the Geweke test. When the absolute value of the test statistic is less than 1.96, the simulation result is considered to have converged. The reliability of the simulation result is verified by comparing it with the actual results of 1,000 historical identical tactical scenarios. The prediction accuracy is required to be ≥85%.
[0038] During the random search and deduction process, a context-aware dynamic probability adjustment mechanism is adopted. This mechanism comprehensively considers contextual factors such as player individual ability, real-time physical condition, match time, and score difference to dynamically adjust the transition probabilities between tactical events. Specifically, the adjusted transition probability calculation formula is as follows: In the formula, The adjusted transition probability from tactical event A to tactical event B; The base transition probabilities are learned from historical data; For the i-th context factor The corresponding weight coefficients range from [0.5, 2.0]. When the contextual factors are favorable to the occurrence of event B, the weight coefficient is greater than 1, and when the contextual factors are unfavorable to the occurrence of event B, the weight coefficient is less than 1.
[0039] The weighting coefficients for each contextual factor are calculated as follows: Player individual ability weighting coefficient: ,in The historical success rate of the player's corresponding technical move (calculated using data from the last 50 games). The average success rate of this technique for players in the same position over the past season; for example, the scoring probability of a point guard on a drive. This refers to the player's points scored on drives to the basket in their last 50 games / total number of drives to the basket. The league's average penetration scoring rate for point guards is 0.32.
[0040] Real-time physical condition weighting coefficient: ,in For the player's remaining physical condition, , The total distance a player travels during the match. The duration during which a player's cumulative heart rate exceeds 150 beats per minute in this match.
[0041] Match time weighting factor: when the remaining time seconds, ;when Second seconds, ;when At the second, high-risk tactics (such as three-pointers and drives) Low-risk tactics (such as free throws and mid-range shots) .
[0042] Score difference weighting coefficient: When the lead is... Time-sharing (Fast break / Three-pointer) (Positional warfare); when point Time-sharing ;when Time-sharing (Fast break / Three-pointer) (positional warfare).
[0043] Specifically, the natural language interaction module receives voice input from the coach, or text input from the coach via a touchscreen. The module uses a speech recognition model to convert the coach's voice input into text format, then utilizes a basketball-specific large language model for intent recognition to determine the user's query intent. It extracts key information from the question text using named entity recognition and relation extraction techniques. The identified query intent and extracted key information are sent to the counterfactual reasoning module, triggering the counterfactual reasoning process. The natural language interaction module receives the structured reasoning results output by the counterfactual reasoning module, uses a basketball-specific large language model to convert them into a concise and clear natural language response, keeping the response length within a range suitable for rapid reading. Finally, a speech synthesis model converts the natural language response into speech, which is played back to the coach through a speaker, achieving complete voice interaction.
[0044] The named entity recognition uses a BERT-BiLSTM-CRF model fine-tuned for the basketball domain. The identified entity types include four categories: tactical actions, player positions, statistics, and game status. The entity recognition F1 score is required to be ≥93%. Relationship extraction uses a TextCNN model to extract intervention and target relationships between entities, with an accuracy requirement of ≥90%. Pre-defined slot mapping rules distinguish intervention variables from deduction targets: entities containing hypothetical introductory words such as "if," "suppose," "hypothesis," and "if" that describe specific tactical actions are mapped as intervention variables; entities containing result keywords such as "probability," "effect," "scoring," "win rate," and "success rate" are mapped as deduction targets. Intent recognition uses a classification head from a basketball-specific large language model, with classification categories including tactical analysis, player evaluation, and counterfactual deduction, with a classification accuracy requirement of ≥95%.
[0045] Specifically, the visualization module receives tactical causal graph structure data output by the basketball tactics causal structure discovery module, including node information, edge information, and causal strength information. It displays the tactical causal graph structure in the form of a directed acyclic graph, using circular nodes to represent tactical events, directed edges with arrows to represent causal relationships, edge thickness to represent causal strength, and edge color to represent the positive or negative nature of the causal relationship. The visualization module allows users to view detailed causal relationship information through clicks, drags, zooms, and other operations. The visualization module also receives deduction process data and quantitative result data output by the counterfactual deduction module, including real game process data, hypothetical game process data, and comparative data on the effects of different tactical choices. It synchronously displays player movement trajectories and ball passing routes in both real and hypothetical game processes using 2D animation, allowing coaches to intuitively see the differences brought about by different tactical choices. The visualization module displays the quantitative results of counterfactual deduction in various chart formats such as bar charts, line charts, and pie charts, including scoring probabilities, win rate changes, and player performance predictions corresponding to different offensive choices.
[0046] Optionally, the system also includes a real-time optimization mechanism. By acquiring the hardware performance parameters of the edge computing device, the hardware performance parameters are used to accelerate the model inference and causal calculation processes in parallel. The accelerated calculation results are then used for real-time analysis. Specifically, based on the number of CPU cores and GPU computing power of the edge computing device, the causal strength calculation and counterfactual inference tasks are divided into multiple sub-tasks and assigned to different computing cores for parallel execution. At the same time, model pruning and quantization techniques are used to further improve the model inference speed.
[0047] Optionally, the system further includes a confidence assessment mechanism, which obtains the causal strength value and verification result of each edge in the causal graph, and uses the causal strength value and verification result to calculate the confidence of each causal relationship, in order to assess the reliability of the analysis results.
[0048] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications or alterations to the above-disclosed technical content to create equivalent embodiments without departing from the scope of the present invention. Any simple modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of the present invention without departing from the scope of the present invention shall still fall within the scope of the present invention.
Claims
1. A real-time basketball tactics and skills analysis system based on a large language model, characterized in that, The system includes: Multimodal data acquisition and preprocessing module: Real-time acquisition of video data, player tracking data, event data and statistical data of basketball games, and preprocessing to generate standardized tactical event sequence data; The causal structure discovery module in the basketball tactics domain connects with the multimodal data acquisition and preprocessing module. It utilizes the semantic understanding capabilities of a large language model to automatically identify sparse tactical causal graph structures from standardized tactical event sequence data, and distinguishes the causal relationships and accompanying phenomena between tactical actions. Counterfactual deduction module: Connected to the causal structure discovery module in the basketball tactics domain, based on the constructed tactical causal graph, it receives users' natural language hypothetical questions, performs interpretable multi-step counterfactual deduction, and outputs quantitative deduction results; Natural Language Interaction Module: Connected to the Counterfactual Inference Module, it receives natural language queries from users and converts the output of the Counterfactual Inference Module into natural language responses; Visualization module: Connected to the causal structure discovery module and counterfactual deduction module in the field of basketball tactics, respectively, it is used to visualize the tactical causal graph structure and the counterfactual deduction process and results.
2. The real-time basketball tactics and skills analysis system based on a large language model according to claim 1, characterized in that, The multimodal data acquisition and preprocessing module synchronously collects game video data through multiple high-definition cameras deployed around the basketball court, tracks the movement status data of players and the basketball in real time, obtains game event data and technical statistics through official data interfaces, and converts all data into standardized tactical event sequence data in a unified format.
3. The real-time basketball tactics and skills analysis system based on a large language model according to claim 1, characterized in that, The basketball tactics domain causal structure discovery module is based on a large language model. It uses basketball game commentary texts, tactical analysis reports, and coach tactical manuals for supervision and fine-tuning to construct a basketball-specific large language model. It then uses the large language model to convert standardized tactical event sequence data into high-dimensional semantic vector representations. Based on the semantic vector representations of tactical events and causal constraints, it uses a spatiotemporal weighted causal strength calculation formula to quantify the causal relationship strength between each pair of tactical events. During the learning process, it introduces time delay constraints and spatial location constraints unique to the basketball tactics domain and filters out a large number of false causal relationships through conditional independence tests. By leveraging the reasoning capabilities of a large language model in the basketball domain, the learned causal graph structure is verified and corrected line by line.
4. The real-time basketball tactics and skills analysis system based on a large language model according to claim 3, characterized in that, The specific steps for the basketball tactics domain causal structure discovery module to construct a basketball-specific large language model are as follows: Collect multimodal data related to basketball games, including game video captions, official commentary texts, post-game tactical analysis articles, player interview records, and game statistical reports; clean the collected data to remove duplicate, noisy, and irrelevant data, and retain the effective content related to basketball tactics; All cleaned data were converted into a unified text format. Using a combination of automatic and manual annotation, key information on tactical events, player actions, and game scenarios in the text data was annotated to build a basketball tactics corpus. Select the general large language model as the base model and load its pre-trained weights for initialization; The basic model was incrementally pre-trained using a constructed basketball tactics domain corpus. During the incremental pre-training process, a dynamic masking strategy and contrastive learning method were adopted to improve the model's semantic understanding ability and domain adaptability. A supervised dataset containing various basketball tactical analysis tasks was constructed, including tactical event classification, tactical intent recognition, and tactical process description; the model was then fine-tuned under supervision using the supervised dataset after incremental pre-training to optimize model performance. Establish a model evaluation index system, use an independent test set to evaluate the fine-tuned model, and iteratively optimize the model based on the evaluation results until the model performance meets the preset requirements.
5. The real-time basketball tactics and skills analysis system based on a large language model according to claim 3, characterized in that, The basketball tactics domain causal structure discovery module uses a spatiotemporal weighted causal strength calculation formula to quantify the causal relationship strength between each pair of tactical events. The formula expression is as follows: ,in, Indicates tactical events Tactical events The causal strength, with a value range of ; Indicates that in a given set of confusing variables Under the conditions, and Conditional mutual information between them is used to measure and The degree of statistical dependence between them; The time consistency factor is used to measure... and Does the time delay between them conform to the general rules of basketball tactics? Spatial correlation factor, used to measure and Do the spatial relationships between them conform to the general principles of basketball tactics? These are the weight coefficients for conditional mutual information, temporal consistency factor, and spatial correlation factor, respectively, satisfying... .
6. The real-time basketball tactics and skills analysis system based on a large language model according to claim 1, characterized in that, The counterfactual reasoning module constructs a counterfactual reasoning framework based on a structural causal model and causal inference criteria. It utilizes the semantic understanding capabilities of a basketball-specific large language model to analyze users' natural language hypothetical questions, extracting intervention variables, intervention values, and inference targets through named entity recognition and relation extraction techniques. Based on the extracted intervention variables and values, it intervenes in the tactical causal graph, severing all parent node connections of the intervention variables and setting them to specified values. Based on the intervened causal graph, it uses a backdoor adjustment formula to calculate the probability distribution of the results after intervention, and employs a random search algorithm to perform multiple multi-step probability inferences to calculate the probability distribution and expected value of the inference target. During the inference process, it dynamically adjusts the inference probability by comprehensively considering contextual factors. Finally, it leverages the generative capabilities of the basketball-specific large language model to generate a structured and interpretable description of the inference process.
7. The real-time basketball tactics and skills analysis system based on a large language model according to claim 6, characterized in that, The backdoor adjustment formula is expressed as follows: ,in, This represents the probability distribution of the outcome variable Y when the intervention variable X is forcibly set to the value x; This indicates an intervention operation on variable X, severing the connection between X and all its parent nodes; This represents the set of confusing variables that satisfy the backdoor criteria, i.e., the set of variables that can block all backdoor paths from X to Y; This represents the conditional probability distribution of Y given X=x and Z=z; This represents the prior probability distribution of the confounding variable Z taking the value of z.
8. The real-time basketball tactics and skills analysis system based on a large language model according to claim 6, characterized in that, The contextual factors include: Players' individual abilities: Point guards' probability of scoring on drives, inside players' probability of scoring from free throws, and corner players' probability of scoring from three-point range, all calculated based on historical data. Real-time physical condition: The remaining physical condition of the point guard estimated based on the distance traveled and heart rate data in this game; Defensive player status: rating the physical condition and defensive ability of the player defending the point guard; Game time: Remaining time in the current quarter; Score difference: The current score difference between the two teams.
9. The real-time basketball tactics and skills analysis system based on a large language model according to claim 1, characterized in that, The natural language interaction module is built on a dedicated large language model for basketball to create an end-to-end natural language interaction function; it supports users to make query requests in conversational natural language, including various types of queries such as tactical analysis, player performance evaluation, and counterfactual assumptions. It employs intent recognition and slot filling technologies to understand the user's query intent and key information; it converts the structured results output by the counterfactual reasoning module into natural language answers, with the answer length controlled within a range suitable for rapid reading; and it supports voice input and voice output functions, using speech recognition and speech synthesis models to achieve complete voice interaction.