Dynamic real-time inference method, apparatus, device, medium, and program product

CN123014176APending Publication Date: 2026-10-30SHENZHEN BSX TECH ELECTRONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611166135.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-03
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

[0003]本发明提供一种动态实时推理方法、装置、设备、介质及程序产品,以解决基于固定模型难以适应大规模数据动态变化的问题

Benefits of technology

[0009]上述动态实时推理方法、装置、设备、介质及程序产品所提供的一个方案中,能基于预设模式感知目标数据流最新状况,及时获取数据表现特征,快速响应数据变化,满足实时分析需求,如在金融交易中及时捕捉价格波动,结合最新与历史数据特征预测未来关键事件概率,生成针对性事件感知策略,提高预测准确性,助力提前规划应对,像气象预测中提前预警灾害,多级尺度动态分段处理及权重分配,可根据不同需求灵活调整分析重点,提高资源利用率,在工业生产监测中能聚焦关键环节,边缘侧推理引擎分析多级对象,减少数据传输延迟,提升分析效率,降低中心服务器压力,适用于大规模数据流处理。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123014176A_ABST
    Figure CN123014176A_ABST
Patent Text Reader

Abstract

The application is suitable for the technical field of data reasoning, and provides a dynamic real-time reasoning method, device, equipment, medium and program product. Data condition perception of a target data stream in adjacent time periods is performed based on a data perception mode of preset identification parameters, data performance characteristics of the target data stream in the adjacent time periods are obtained, the target data stream is combined with each data performance characteristic of a historical record to perform key event occurrence probability prediction in a latest time period, and corresponding event perception strategies are generated according to prediction results to perform dynamic segmentation processing of the target data stream in multiple scales, to obtain dynamic segmented data in several scales and assign priority weights, to combine the target data stream in the latest time period with each dynamic segmented data based on the priority weights to obtain multi-level analysis objects, to perform event analysis on the multi-level analysis objects by a reasoning engine deployed in advance on an edge side to obtain event reasoning information, and to solve the problem that a fixed model is difficult to adapt to dynamic changes of large-scale data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of data reasoning technology, and in particular to a dynamic real-time reasoning method, apparatus, device, medium, and program product. Background Technology

[0002] With the rapid development of information technology, the amount of data generated in various fields has exploded. This data is not only huge in quantity, but also diverse, including structured data (such as tabular data in databases) and unstructured data (such as text, images, videos, etc.). Many application scenarios have high requirements for real-time data processing and analysis. For large-scale data streams, traditional data analysis methods are often based on fixed models and rules. Traditional methods will encounter performance bottlenecks in the data processing and analysis process and are difficult to adapt to the dynamic changes of data. Summary of the Invention

[0003] This invention provides a dynamic real-time inference method, apparatus, device, medium, and program product to solve the problem that fixed models are difficult to adapt to large-scale dynamic changes in data.

[0004] In a first aspect, embodiments of this application provide a dynamic real-time inference method, including: Based on a data perception mode with preset recognition parameters, the target data stream is perceived in the adjacent time period to obtain the data performance characteristics of the target data stream in the adjacent time period. By combining the data performance characteristics of adjacent time periods with the data performance characteristics of historical records, the probability of occurrence of key events in the latest time period of the target data stream is predicted, and a corresponding event perception strategy is generated based on the prediction results. The target data stream is dynamically segmented at multiple scales according to the event-aware strategy to obtain dynamically segmented data at several scales, and a corresponding priority weight is assigned to each of the dynamically segmented data. Based on priority weights, the target data stream collected in the latest time period is combined with the dynamic segmented data to obtain multi-level analysis objects. Event analysis is performed on the multi-level analysis objects by an inference engine pre-deployed on the edge side to obtain event inference information.

[0005] Secondly, embodiments of this application provide a dynamic real-time inference device, including: The data perception module is used to perceive the data status of the target data stream in the vicinity of the time period based on the data perception mode of the preset recognition parameters, and to obtain the data performance characteristics of the target data stream in the vicinity of the time period. The event awareness module is used to combine the data performance characteristics of adjacent time periods with the data performance characteristics of historical records to predict the probability of occurrence of key events in the latest time period of the target data stream, and generate corresponding event awareness strategies based on the prediction results. The dynamic segmentation module is used to perform multi-level scale dynamic segmentation processing on the target data stream according to the event perception strategy, to obtain dynamic segmented data of several scales, and to assign corresponding priority weights to each dynamic segmented data. The event reasoning module is used to combine the target data stream collected in the latest time period with the dynamic segmented data based on priority weights to obtain multi-level analysis objects. The multi-level analysis objects are then analyzed by an inference engine pre-deployed on the edge side to obtain event reasoning information.

[0006] Thirdly, embodiments of this application provide a computer 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 steps of the above-described dynamic real-time inference method.

[0007] Fourthly, embodiments of this application provide a readable storage medium storing a computer program that, when executed by a processor, implements the steps of the aforementioned dynamic real-time inference method.

[0008] Fifthly, embodiments of this application provide a computer program product, which includes a computer program that, when executed by a processor, enables the implementation of the steps of the above-described dynamic real-time inference method.

[0009] The aforementioned dynamic real-time inference methods, devices, equipment, media, and program products provide a solution that can perceive the latest status of the target data stream based on a preset pattern, promptly acquire data performance characteristics, quickly respond to data changes, and meet real-time analysis needs. For example, in financial transactions, it can promptly capture price fluctuations, combine the latest and historical data characteristics to predict the probability of future key events, generate targeted event perception strategies, improve prediction accuracy, and help plan and respond in advance. In meteorological forecasting, it can provide early warnings of disasters. Multi-level scale dynamic segmentation processing and weight allocation can flexibly adjust the focus of analysis according to different needs, improve resource utilization, focus on key links in industrial production monitoring, and analyze multi-level objects with edge-side inference engines to reduce data transmission latency, improve analysis efficiency, reduce the pressure on the central server, and is suitable for large-scale data stream processing. Attached Figure Description

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

[0011] Figure 1 This is a flowchart illustrating a dynamic real-time inference method according to an embodiment of the present invention; Figure 2 yes Figure 1 A schematic diagram of the implementation process of step S10; Figure 3 yes Figure 1 A schematic diagram of the implementation process of step S20; Figure 4 yes Figure 1 A schematic diagram of the implementation process of step S30; Figure 5 yes Figure 1 A schematic diagram of the implementation process of step S40; Figure 6 This is a schematic diagram of the structure of a dynamic real-time inference system according to an embodiment of the present invention; Figure 7 This is a schematic diagram of the structure of a computer device according to an embodiment of the present invention. Detailed Implementation

[0012] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0013] It should be understood that, when used in this specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components, and / or collections thereof. It should also be understood that, as used in this specification and the appended claims, the term "and / or" refers to any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0014] Furthermore, in the description of this invention and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0015] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of the invention include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0016] It should be understood that the sequence number of each step in the following embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0017] To illustrate the technical solution of the present invention, specific embodiments are described below.

[0018] With the rapid development of information technology, the amount of data generated in various fields has exploded. This data is not only huge in quantity, but also diverse, including structured data (such as tabular data in databases) and unstructured data (such as text, images, videos, etc.). Many application scenarios have high requirements for real-time data processing and analysis. For large-scale data streams, traditional data analysis methods are often based on fixed models and rules. Traditional methods will encounter performance bottlenecks in the data processing and analysis process and are difficult to adapt to the dynamic changes of data.

[0019] To address the aforementioned issues, this application proposes a dynamic real-time inference method, apparatus, device, medium, and program product. One solution provided by these methods and products can perceive the latest status of a target data stream based on a preset pattern, promptly acquire data performance characteristics, and quickly respond to data changes, meeting real-time analysis needs. For example, in financial transactions, it can promptly capture price fluctuations, combine the latest and historical data characteristics to predict the probability of future key events, generate targeted event perception strategies, improve prediction accuracy, and assist in advance planning and response. Similarly, in meteorological forecasting, it can provide early warnings of disasters. Multi-level scale dynamic segmentation and weight allocation allow for flexible adjustment of analysis focus according to different needs, improving resource utilization. In industrial production monitoring, it can focus on key links, with edge-side inference engines analyzing multi-level objects, reducing data transmission latency, improving analysis efficiency, and reducing the pressure on central servers, making it suitable for large-scale data stream processing.

[0020] In one embodiment, such as Figure 1 As shown, a dynamic real-time inference method is provided, including the following steps: S10: Based on the data perception mode with preset recognition parameters, the target data stream is perceived in the adjacent time period to obtain the data performance characteristics of the target data stream in the adjacent time period. S20: Combine the data performance characteristics of adjacent time periods with the data performance characteristics of historical records to predict the probability of occurrence of key events in the latest time period of the target data stream, and generate corresponding event perception strategies based on the prediction results. S30: Perform multi-level scale dynamic segmentation processing on the target data stream according to the event perception strategy to obtain dynamic segmented data of several scales, and assign corresponding priority weights to each dynamic segmented data. S40: Based on priority weights, the target data stream collected in the latest time period is combined with each dynamic segment data to obtain a multi-level analysis object. The multi-level analysis object is then analyzed by an inference engine pre-deployed on the edge side to obtain event inference information.

[0021] In this embodiment, a suitable time range is determined as a time window based on preset identification parameters and the characteristics and analysis requirements of the target data stream. For example, if the target data stream is network traffic data and it is necessary to analyze the traffic changes every 5 minutes in real time, then the time window can be set to 5 minutes. The rules and processes for data analysis are determined based on the preset identification parameters. For example, for stock trading data streams, the analysis framework may include analysis rules for trading volume, price fluctuation range, trading frequency, etc.

[0022] The establishment of a time window provides a clear time boundary for data collection and analysis, allowing the analysis to focus on data in the immediate vicinity, avoiding unnecessary processing of large amounts of historical data, and improving the efficiency and relevance of the analysis. The scheduling data analysis framework provides unified rules and standards for subsequent data processing and feature analysis, ensuring that different data can be analyzed in the same way, and guaranteeing the consistency and comparability of the analysis results.

[0023] Based on the time window range, extract data from the target data stream for the corresponding time period. For example, if the time window is set to 5 minutes, then extract the data stream within 5 minutes from the current time as the data part of the adjacent time period.

[0024] Based on the rules in the data analysis framework, features are extracted from the segmented data. For example, for meteorological data streams, the analysis framework may specify the extraction of features such as temperature, humidity, and wind speed. By calculating and statistically analyzing data from adjacent time periods, the specific values ​​of these features are obtained. The extracted features are then integrated to form the data performance characteristics of the target data stream in adjacent time periods. For example, features such as temperature, humidity, and wind speed can be combined into a feature vector to comprehensively describe the performance of meteorological data in adjacent time periods.

[0025] By arranging the data performance characteristics of adjacent time periods and historical data performance characteristics in chronological order, a data feature sequence composed of data performance characteristics of each time period is obtained. For example, if the target data stream is daily stock price data, the data performance characteristics such as the latest day's price fluctuations and trading volume can be arranged in chronological order with the corresponding characteristics of each day in the past period (such as one month). This arrangement can be achieved using the sorting function of the database or the sorting algorithm in the programming language.

[0026] Analyze the overall distribution of features in the data feature sequence to generate several representative labels that reflect the changing trend of the data feature sequence. For example, for stock price data feature sequence, by analyzing the price fluctuations and changes in trading volume, representative labels such as "uptrend", "downtrend", and "consolidation trend" can be generated. Statistical analysis methods, such as calculating the mean, variance, and trend line, can be used, combined with clustering algorithms in machine learning, to divide the data feature sequence into different categories, with each category corresponding to a representative label.

[0027] Based on the representative labels, the changing trend of the data feature sequence is established, and the probability of various key events occurring in the latest time period is predicted according to the changing trend, so as to obtain the probability parameters of various key events. For example, based on the representative labels such as "upward trend" and "downward trend" of stock price data, combined with the frequency of key events such as limit up and limit down under these trends in historical data, the probability of limit up and limit down occurring in the future period can be predicted. Probabilistic statistical models, such as Bayesian models and Markov chain models, can be used to calculate the probability based on historical data and representative labels.

[0028] By combining the probability parameters of various key events into future prediction scenarios, adaptive value analysis is performed on the target data stream collected in the latest time period to obtain various data analysis forms and value parameters for the target data stream in the latest time period. For example, for stock data, if the probability of a future limit-up is high, then momentum indicator analysis in technical analysis may be suitable. By analyzing the effectiveness and accuracy of different analysis forms in this prediction scenario, their value parameters are determined. The effects of different data analysis forms in similar historical scenarios can be compared through experiments, and value parameters can be assigned to each data analysis form in combination with expert experience.

[0029] Several data analysis methods are selected based on value parameters, and corresponding priority weights are generated for each data analysis method as an event perception strategy. For example, in stock analysis, if the momentum indicator in technical analysis has a high value parameter, this analysis method is selected first, and a higher priority weight is assigned according to its value parameter. The data analysis methods can be sorted according to the size of the value parameter, and the data analysis methods with the higher ranking are selected, and priority weights are allocated according to the proportion of the value parameter.

[0030] Determining the appropriate data analysis methods for the target data stream based on the event-aware strategy requires reviewing the data analysis methods selected in the event-aware strategy based on probability prediction and value analysis of key events. For example, if the event-aware strategy indicates that for stock price data streams, short-term trend analysis, trading volume analysis, and other data analysis methods are suitable when predicting significant future fluctuations, the relevant list of data analysis methods can be directly extracted from the event-aware strategy document or stored strategy information.

[0031] Starting with the last data node in a nearby time period, data within a corresponding range is selected from the target data stream based on the data analysis method to obtain dynamically segmented data at a specified level. For example, for a stock price data stream, if the data analysis method used is short-term trend analysis, the data from the most recent 10 trading days might be selected as a dynamic segment starting from the current moment; if volume analysis is used, the data from the most recent 20 trading days might be selected as another dynamic segment. Using data query and filtering functions, the corresponding data segments can be extracted from the target data stream according to the data range required by the data analysis method. Database query statements, such as the SQL SELECT statement, combined with time range conditions, can be used for data extraction.

[0032] The event-aware strategy assigns corresponding priority weights to dynamic segmented data at each scale. For example, if the event-aware strategy stipulates that short-term trend analysis is more important than trading volume analysis, then the data segment corresponding to short-term trend analysis will be assigned a higher priority weight. Based on the priority weights set for different data analysis forms in the event-aware strategy, they are mapped to the corresponding data segments. The mapping relationship between data segments and priority weights can be established through programming.

[0033] The system collects the latest target data stream for a given time period and combines it sequentially with dynamic segment data based on priority weights. This generates a multi-level analysis object consisting of multiple analysis objects with an analytical order. For example, for stock market data, dynamic segment data may include price and volume data from the past 5, 10, and 20 days. The target data stream for the latest time period is real-time price and volume data. According to priority weights, the real-time data is first combined with the data from the past 5 days, and then with the data from the past 10 and 20 days, forming analysis objects at different levels. The system uses data acquisition tools to obtain the target data stream for the latest time period and implements the data combination operation through programming. Data structures (such as lists and arrays) can be used to store the multi-level analysis objects.

[0034] The analysis object with the highest priority in the multi-level analysis objects is set as the inference target of the inference engine pre-deployed on the edge side. The correlation between the target data stream and the dynamically segmented data corresponding to the inference target is analyzed to obtain the analysis form characteristics. Based on the analysis form characteristics, the inference environment of the inference engine is deployed. For example, if the highest priority analysis object is the combination of real-time data and data from the past 5 days, the correlation between its price fluctuations and trading volume changes is analyzed. Based on this correlation, the algorithm, parameters, etc., that the inference engine needs to use are determined, and the deployment of the inference environment is completed. The inference target is passed to the inference engine through the programming interface, and data analysis and mining techniques are used to perform correlation analysis. Based on the analysis results, the parameters and models of the inference engine are configured.

[0035] The inference engine analyzes the inference target based on the specified inference environment to obtain target inference data. After obtaining the target inference data of the analysis objects in the specified analysis order, the analysis object of the next analysis order in the multi-level analysis objects is set as the inference target, until the target inference data of each analysis object in the multi-level analysis objects are obtained. For example, the analysis object combining real-time data and data from the past 5 days is analyzed first to obtain inference data such as price trends and changes in trading volume. Then, the analysis object combining real-time data and data from the past 10 days is used as the new inference target for analysis. The inference engine analyzes the inference target using machine learning algorithms, statistical analysis methods, etc., according to the deployed inference environment, and processes the multi-level analysis objects sequentially through a loop structure.

[0036] By combining the target inference data of each analysis object in a multi-level analysis, event inference information can be obtained. For example, by combining real-time data with dynamically segmented data from different time periods to analyze price trends, changes in trading volume, and other inference data, event inference information about the future trend of the stock market can be derived. Data fusion and comprehensive analysis methods can be used to integrate the inference data of different analysis objects. Data merging, calculation, and analysis can be achieved by writing code.

[0037] In one embodiment, such as Figure 2 As shown, step S10, which involves sensing the data status of the target data stream in the vicinity of a data perception mode based on preset identification parameters, and obtaining the data performance characteristics of the target data stream in the vicinity of a data perception mode, specifically includes the following steps: S11: Based on the data perception mode with preset identification parameters, a time window and scheduling data analysis framework are established for the target data stream; S12: Perform a specified form of data segmentation on the target data stream according to the time window to obtain the data portion of the target data stream in the adjacent time period; S13: Based on the data analysis framework, perform feature analysis on the data representation of the data portion to obtain the data representation characteristics of the target data stream in the adjacent time period.

[0038] In this embodiment, the time window is established by determining the time window based on preset identification parameters and the characteristics and analysis requirements of the target data stream. For example, if the target data stream is transaction data from an e-commerce platform, in order to analyze the characteristics of the daily peak transaction period, the time window can be set to one day, from 0:00 to 24:00 each day. The time range can be set by programming, such as using Python's datetime module to define the start and end times of the time window.

[0039] Based on preset identification parameters, data analysis rules and processes are formulated. For e-commerce transaction data, the data analysis framework may include analysis rules for transaction amount, transaction quantity, product category, etc. Configuration files or databases can be used to store and manage these analysis rules for easy subsequent calling and modification. Programming languages ​​(such as Python, Java, etc.) combined with relevant time processing libraries and data management tools (such as MySQL, MongoDB, etc.) are used to realize the establishment of time windows and the scheduling of the data analysis framework.

[0040] Based on the time window range, filter data from the target data stream that meets the time conditions. For example, if the time window is one day, query the e-commerce transaction data for that day from the database. You can use SQL statements to filter the data, such as SELECT * FROM transactions WHERE transaction_time BETWEEN 'start_time' AND 'end_time'.

[0041] The filtered data can be segmented according to a specified format. For example, a day's transaction data can be divided into 24 time periods by hour. Data segmentation can be achieved using loop structures and data processing functions in programming languages, while database query functions and the data processing capabilities of programming languages ​​can be used to complete the data filtering and segmentation.

[0042] Based on the rules in the data analysis framework, relevant features are extracted from the segmented data. For e-commerce transaction data, features such as the total transaction amount per hour, the number of transactions, and popular product categories may be extracted. Statistical analysis methods (such as summation, counting, grouping statistics, etc.) can be used to extract features.

[0043] The extracted features are integrated to form the data performance characteristics of the target data stream in the vicinity of the time period. For example, features such as the total transaction amount, transaction quantity, and popular product categories for each hour can be combined into a feature vector. Data structures (such as lists and dictionaries) can be used to store and integrate features, and statistical analysis libraries (such as NumPy and Pandas) and machine learning libraries (such as Scikit-learn) can be used for feature extraction and integration.

[0044] The establishment of a time window defines a clear time boundary for data collection and analysis, allowing the analysis to focus on data in the immediate vicinity, avoiding the processing of a large amount of irrelevant historical data, and improving the efficiency and relevance of the analysis. For example, when analyzing e-commerce transaction data, focusing only on data within a single day can more accurately grasp the transaction situation of that day. The scheduling data analysis framework provides unified rules and standards for subsequent data processing and feature analysis, ensuring that different data can be analyzed using the same methods, thus guaranteeing the consistency and comparability of the analysis results. For example, processing transaction data from different dates using the same analysis framework facilitates comparison and trend analysis.

[0045] Data segmentation through time windows allows for accurate acquisition of data from the target data stream within adjacent time periods, reflecting the real-time status of the data and providing the latest information for subsequent analysis and decision-making. For example, in e-commerce platforms, timely acquisition of the latest transaction data can help merchants adjust their marketing strategies in real time. Segmenting the target data stream into smaller time periods reduces the complexity of data processing, making subsequent feature analysis more efficient and accurate. For instance, after segmenting a day's transaction data by hours, analyzing the data for each hour is much easier than processing the data for the entire day.

[0046] In one embodiment, such as Figure 3 As shown, in step S20, the data performance characteristics of adjacent time periods are combined with the data performance characteristics of historical records to predict the probability of occurrence of key events in the latest time period of the target data stream, and a corresponding event perception strategy is generated based on the prediction results. Specifically, this includes the following steps: S21: Arrange the data performance characteristics of adjacent time periods and the data performance characteristics of historical records according to the time order to obtain a data feature sequence composed of the data performance characteristics of each time period; S22: Analyze the overall distribution of the data feature sequence to generate several representative labels that reflect the changing trend of the data feature sequence; S23: Based on each of the representative labels, establish the changing trend of the data feature sequence, and predict the probability of various key events occurring in the latest time period according to the changing trend, so as to obtain the probability parameters of various key events. S24: Combine the probability parameters of various key events into future prediction scenarios, and conduct adaptive value analysis of the target data stream collected in the latest time period to obtain various data analysis forms and value parameters of the target data stream in the latest time period. S25: Select several data analysis forms based on the value parameters, generate corresponding priority weights for each data analysis form, and use all data analysis forms with priority weights together as an event perception strategy.

[0047] In this embodiment, data performance characteristics of adjacent time periods and historical data performance characteristics are obtained from a data storage system (such as a database). For example, if the target data stream is stock price data, daily price fluctuations, trading volume, and other data performance characteristics can be extracted from a financial database. These data performance characteristics are sorted in chronological order. Sorting functions in programming languages ​​(such as Python) can be used to sort the data based on timestamps. For example, the sorted() function can be used in combination with a time field for sorting. The sorted data performance characteristics are combined into a data feature sequence. This sequence can be stored using data structures such as lists or arrays. Data is obtained using database query statements (such as SQL), and sorting and sequence construction are performed using programming languages ​​(such as Python).

[0048] Statistical analysis is performed on data feature sequences to calculate statistics such as mean, variance, and standard deviation, revealing the overall distribution of the data. For example, for stock price data feature sequences, the mean and variance of daily prices are calculated. Trend analysis methods (such as moving averages and linear regression) are used to identify data trends. For instance, the moving average of stock prices can be used to determine whether prices are rising, falling, or consolidating. Based on the results of statistical analysis and trend identification, labels representing the changing trends of the data feature sequences are generated. For example, if stock prices are trending upwards, an "upward trend" label can be generated; if price fluctuations are small, a "consolidation trend" label can be generated. Statistical analysis libraries (such as NumPy and Pandas) are used for statistical calculations, and machine learning libraries (such as Scikit-learn) are used for trend analysis.

[0049] Based on representative labels, we construct trend scenarios for data feature sequences. For example, for stock price data, we construct different trend scenarios based on labels such as "uptrend," "downtrend," and "consolidation trend." We then select appropriate probability models (such as Bayesian models and Markov chain models) to predict the probability of various key events occurring in the latest time period. For instance, we use a Bayesian model to predict the probability of key events such as stock price limits (limit up or limit down) based on historical data and current trend scenarios. Using the selected probability model, combined with historical data and current trend scenarios, we calculate the probability parameters of various key events. We then use a probability statistics library (such as SciPy) to implement the probability model and perform probability calculations.

[0050] By combining the probability parameters of various key events, future prediction scenarios can be formed. For example, the probability parameters of key events such as stock price limits, price limits, and consolidation can be combined into a comprehensive future prediction scenario. Based on the future prediction scenario, adaptive value analysis can be performed on different forms of data analysis (such as technical analysis and fundamental analysis). The effects of different forms of data analysis in similar historical scenarios can be compared through experiments. By combining expert experience, value parameters can be assigned to each form of data analysis. Value analysis can be performed using data analysis and evaluation methods, combined with historical data and expert knowledge.

[0051] The data analysis methods are sorted according to value parameters, and several data analysis methods with higher value parameters are selected. For example, in stock analysis, if the value parameter of technical analysis is higher, then technical analysis is selected first. Priority weights are assigned to the selected data analysis methods according to the magnitude of the value parameters. The value parameters can be normalized, and then weights are assigned according to the normalized values. The selected data analysis methods and their corresponding priority weights are combined into an event-aware strategy. The data analysis methods are sorted using a sorting algorithm, and weights are assigned using mathematical calculation methods.

[0052] In one embodiment, such as Figure 4 As shown, in step S30, the target data stream is dynamically segmented at multiple scales according to the event-aware strategy to obtain dynamically segmented data at several scales, and corresponding priority weights are assigned to each of the dynamically segmented data. Specifically, this includes the following steps: S31: Starting with the last data node in the adjacent time period, select data from the target data stream within a corresponding range based on the data analysis form included in the event perception strategy to obtain dynamic segmented data at the specified level scale. S32: Assign corresponding priority weights to the dynamic segmented data at each specified level scale according to the priority weights included in the event-aware strategy.

[0053] In this embodiment, the event-aware strategy document is parsed in detail. The event-aware strategy may exist in the form of configuration files, database records, or text. Information related to the recommended data analysis methods for the target data stream is extracted from it. The parsed data analysis methods are organized into a list. For example, if the event-aware strategy indicates that the applicable analysis methods for stock price data streams include moving average analysis, volume analysis, momentum indicator analysis, etc., these analysis methods are listed one by one. The configuration file is read and processed using a programming language (such as Python's configparser module to process .ini files), or the event-aware strategy information is queried from the database using SQL statements.

[0054] To accurately locate the last data node in a nearby time period within the target data stream, for example, if the target data stream is sensor data recorded in chronological order, the latest data point can be determined by timestamps. Depending on the different data analysis methods, the required data range can be determined. For moving average analysis, it may be necessary to select data from the past 20 time periods; for some short-term fluctuation analysis, only data from the past 5 time periods may be needed. Extracting data from the target data stream within a specified range forms dynamically segmented data. Data filtering operations can be used, such as extracting data in the database using conditional query statements (such as the WHERE clause in SQL) combined with the time range, and using data processing libraries (such as pandas in Python) for data filtering and extraction, combined with the database's query function to complete the data selection.

[0055] Review the priority weights set for different data analysis methods in the event-aware strategy, and map these weights to the corresponding dynamically segmented data. For example, in the event-aware strategy, the weight of moving average analysis is 0.6, the weight of trading volume analysis is 0.3, and the weight of momentum indicator analysis is 0.1. Then, the data segments corresponding to moving average analysis, trading volume analysis, and momentum indicator analysis are assigned priority weights of 0.6, 0.3, and 0.1, respectively. In actual allocation, it may be necessary to adjust the weights appropriately according to the data situation to ensure that the weight allocation is reasonable, and verify the allocation results to ensure that the total weight meets expectations (such as a total of 1). Use programming to implement the mapping and adjustment of weights, and verify the rationality of the weight allocation through calculation and logical judgment.

[0056] In one embodiment, such as Figure 5 As shown, in step S40, the target data stream of the latest time period is combined with the dynamic segmented data based on priority weights to obtain a multi-level analysis object. The multi-level analysis object is then subjected to event analysis by an inference engine pre-deployed on the edge side to obtain event inference information. Specifically, this includes the following steps: S41: Continuously collect target data streams until the corresponding target data stream is collected in the latest time period, and combine the target data stream of the latest time period with each dynamic segment data in sequence based on priority weight to generate a multi-level analysis object composed of multiple analysis objects with analysis order. S42: Set the analysis object with the highest priority analysis order among the multi-level analysis objects as the inference target of the inference engine pre-deployed on the edge side, so as to analyze the inference target through the inference engine and obtain target inference data; S43: After obtaining the target inference data of the analysis objects in the specified analysis order, set the analysis object of the next analysis order in the multi-level analysis objects as the inference target, until the target inference data of each analysis object of the multi-level analysis objects are obtained; S44: Combine the target reasoning data of each analysis object of the multi-level analysis object to obtain event reasoning information.

[0057] In this embodiment, a data acquisition device or interface is used to continuously collect the latest target data stream at set time intervals. For example, if the target data stream is sensor data, the data can be acquired periodically through a sensor network; if it is network traffic data, it can be collected using a network monitoring tool.

[0058] Based on the priority weights previously assigned to each dynamic segment of data, the target data stream for the latest time period is sequentially combined with the data from each dynamic segment. This can be achieved through operations such as data splicing and association. For example, real-time stock price data can be combined with historical price data from different time scales (such as the past 5 days, 10 days, and 20 days) in a priority order.

[0059] The combined data is organized into analytical objects with an analytical order, forming multi-level analytical objects. Data structures (such as lists and arrays) can be used to store these analytical objects. Each analytical object contains a combination of the target data stream and the corresponding dynamic segmented data. A programming language (such as Python) combined with a data acquisition library (such as pyserial for sensor data acquisition) and a data processing library (such as pandas) is used to complete the data acquisition and combination operations.

[0060] The analysis object with the highest priority analysis order is selected from the multi-level analysis objects and used as the inference target of the inference engine. The priority order can be determined by indexing or tagging. According to the data characteristics and analysis requirements of the inference target, the inference engine is configured and initialized as necessary, such as loading the corresponding model and setting parameters.

[0061] The inference engine is started to analyze the inference target. The inference engine can process and analyze the data based on machine learning algorithms, rule engines, etc., to obtain the target inference data. The inference target is passed to the inference engine using the inference engine's API interface, and the corresponding inference methods are called for analysis. For example, if TensorFlow is used as the inference engine, model loading and inference operations can be performed through its provided functions.

[0062] After completing the reasoning of one analysis object, the next analysis object is set as the new reasoning target according to the pre-set analysis order. The sequential iteration can be implemented using a loop structure. The operation of step S42 is repeated to analyze the new reasoning target and obtain the corresponding target reasoning data until all analysis objects have completed the reasoning. The sequential iteration of analysis objects is implemented using loop statements in programming languages ​​(such as for loops), and the reasoning engine is called to perform repeated reasoning.

[0063] This involves integrating the target inference data of various analytical objects across multiple levels of analysis. This can be achieved through operations such as data merging and summarizing. For example, stock price prediction data obtained from analyses at different time scales can be combined to extract valuable information and form event inference information. Data analysis and mining techniques, such as statistical analysis and pattern recognition, can be used to extract key information. Data processing libraries (such as pandas) can be used for data integration, and data analysis tools (such as scikit-learn) can be used for information extraction.

[0064] In one embodiment, step S42, which involves analyzing the inference target using an inference engine to obtain target inference data, specifically includes the following steps: S421: Analyze the correlation between the target data stream and the dynamic segmented data corresponding to the inference target to obtain the analysis form characteristics, and deploy the inference environment of the inference engine according to the analysis form characteristics; S422: The inference engine analyzes the inference target based on the specified inference environment to obtain target inference data.

[0065] In this embodiment, key features are extracted from the target data stream and the dynamic segmented data. For example, if the target data stream is stock price data and the dynamic segmented data is historical price and trading volume data, features such as price fluctuation range and trading volume change rate can be extracted. Statistical analysis methods (such as correlation analysis and causal analysis) are used to determine the relationship between the target data stream and the dynamic segmented data. For example, the correlation coefficient between stock price and trading volume is calculated to determine the degree of correlation between the two.

[0066] Based on the results of the correlation analysis, the characteristics of the analysis form are summarized. For example, if a strong positive correlation is found between stock price and trading volume, then "price-volume positive correlation" can be used as an analysis form characteristic. According to the analysis form characteristic, an appropriate inference model is selected. For example, if the analysis form characteristic indicates that the data has a linear relationship, a linear regression model can be selected; if the data has a complex nonlinear relationship, a neural network model can be selected.

[0067] Configure the parameters of the selected inference model. For example, set the learning rate and number of iterations for a linear regression model; for a neural network model, set the number of layers and neurons, load the required libraries and dependencies, and initialize the inference engine so that it can perform analysis using the configured model and parameters.

[0068] Use Python's pandas library for data processing and feature extraction, the scipy.stats library for statistical analysis, and the scikit-learn library for model selection and parameter configuration. For deep learning models, TensorFlow or PyTorch can be used for model building and training.

[0069] The inference target (i.e., the combination of the target data stream and dynamically segmented data) is input into the deployed inference engine. The inference engine calculates and analyzes the input data according to the configured model and parameters. For example, a linear regression model calculates the predicted value based on the input data; a neural network model calculates the output result through forward propagation. The inference engine outputs the analysis result, i.e., the target inference data. For example, for stock price prediction, the predicted price value is output; for event probability prediction, the probability of the event is output, and the inference engine's inference method is called for calculation. For example, in scikit-learn, the predict() method is used for prediction; in TensorFlow, a pre-trained model is used for forward propagation calculation.

[0070] By analyzing the correlation between the target data stream and the dynamically segmented data, we can gain a deeper understanding of the intrinsic relationships between the data, thereby enabling us to select analytical methods and models more accurately. For example, in stock market analysis, understanding the relationship between price and trading volume can help select a more suitable predictive model and improve the accuracy of price prediction. Deploying the inference engine in the inference environment according to the characteristics of the analysis form can make the inference engine better adapt to the data characteristics and analysis needs. Appropriate model and parameter configuration can improve inference efficiency and accuracy and avoid erroneous results caused by using inappropriate models.

[0071] Analyzing the inference target within a pre-deployed inference environment allows for accurate data processing using configured models and parameters, yielding valuable inference data that can inform subsequent decision-making. For instance, in stock investment, predicted price data can help investors decide whether to buy or sell stocks. Analyzing within a specified inference environment ensures the coherence and consistency of the entire inference process. From data correlation analysis to inference environment deployment and final inference analysis, each step is closely linked, working together to complete the task of analyzing the inference target.

[0072] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0073] In one embodiment, a dynamic real-time inference device is provided, which corresponds one-to-one with the dynamic real-time inference method described in the above embodiments. For example... Figure 6 As shown, the functional modules of this dynamic real-time inference device are described in detail below: The data perception module is used to perceive the data status of the target data stream in the vicinity of the time period based on the data perception mode of the preset recognition parameters, and to obtain the data performance characteristics of the target data stream in the vicinity of the time period. The event awareness module is used to combine the data performance characteristics of adjacent time periods with the data performance characteristics of historical records to predict the probability of occurrence of key events in the latest time period of the target data stream, and generate corresponding event awareness strategies based on the prediction results. The dynamic segmentation module is used to perform multi-level scale dynamic segmentation processing on the target data stream according to the event perception strategy, to obtain dynamic segmented data of several scales, and to assign corresponding priority weights to each dynamic segmented data. The event reasoning module is used to combine the target data stream collected in the latest time period with the dynamic segmented data based on priority weights to obtain multi-level analysis objects. The multi-level analysis objects are then analyzed by an inference engine pre-deployed on the edge side to obtain event reasoning information.

[0074] 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.

[0075] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0076] This application also provides a computer device, such as... Figure 7As shown, the computer device includes: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor. When the processor executes the computer program, it implements the steps in any of the above method embodiments, or when the processor executes the computer program, it implements the functions of each module / unit in the above device embodiments.

[0077] For example, the computer program may be divided into one or more modules / units, which are stored in the memory and executed by the processor to complete this application. The one or more modules / units may be a series of computer program instruction segments capable of performing a specific function, which describe the execution process of the computer program in the computer device.

[0078] Those skilled in the art will understand that Figure 7 The computer device described is merely an example and does not constitute a limitation on the computer device. It may include more or fewer components than shown, or combine certain components, or different components. For example, the computer device may also include input / output devices, network access devices, buses, etc.

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

[0080] The memory can be an internal storage unit of the computer device, such as a hard drive or RAM. The memory can also be an external storage device of the computer device, such as a plug-in hard drive, Smart Media Card (SMC), Secure Digital (SD) card, or Flash Card. Furthermore, the memory can include both internal and external storage units of the computer device.

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

[0082] This application provides a computer program product that, when run on an electronic device, enables the electronic device to perform the steps described in the various method embodiments above.

[0083] 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 computer program code to a photographing 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.

[0084] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0085] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0086] In the embodiments provided in this application, it should be understood that the disclosed apparatus / devices and methods can be implemented in other ways. For example, the apparatus / device embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.

[0087] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0088] 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 dynamic real-time reasoning method, characterized in that, include: Based on a data perception mode with preset recognition parameters, the target data stream is perceived in the adjacent time period to obtain the data performance characteristics of the target data stream in the adjacent time period. By combining the data performance characteristics of adjacent time periods with the data performance characteristics of historical records, the probability of occurrence of key events in adjacent time periods is predicted for the target data stream, and corresponding event perception strategies are generated based on the prediction results. The target data stream is dynamically segmented at multiple scales according to the event-aware strategy to obtain dynamically segmented data at several scales, and a corresponding priority weight is assigned to each of the dynamically segmented data. Based on priority weights, target data streams from adjacent time periods are combined with dynamic segmented data to obtain multi-level analysis objects. Event analysis is then performed on these multi-level analysis objects using an inference engine pre-deployed at the edge to obtain event inference information.

2. The dynamic real-time reasoning method as described in claim 1, characterized in that, The steps of sensing the data status of a target data stream in a nearby time period based on a data sensing mode with preset recognition parameters, and obtaining the data performance characteristics of the target data stream in a nearby time period, include: A data perception mode based on preset identification parameters is used to establish a time window and a scheduling data analysis framework for the target data stream. The target data stream is segmented in a specified manner according to the time window to obtain the data portion of the target data stream in the adjacent time period; Based on the data analysis framework, the data portion is subjected to feature analysis of its data representation to obtain the data representation characteristics of the target data stream in a nearby time period.

3. The dynamic real-time reasoning method as described in claim 1, characterized in that, The steps of combining the performance characteristics of data from adjacent time periods with the performance characteristics of data from historical records to predict the probability of occurrence of key events in the latest time period of the target data stream, and generating corresponding event-aware strategies based on the prediction results, include: The data performance characteristics of adjacent time periods are arranged in chronological order with the data performance characteristics of historical periods to obtain a data feature sequence composed of the data performance characteristics of each time period. The data feature sequence is analyzed for its overall feature distribution to generate several representative labels that reflect the changing trend of the data feature sequence. Based on the representative labels, the changing trend of the data feature sequence is established, and the probability of various key events occurring in the latest time period is predicted according to the changing trend, so as to obtain the probability parameters of various key events. By combining the probability parameters of various key events into future prediction scenarios, we can perform adaptive value analysis on the target data stream collected in the latest time period to obtain various data analysis forms and value parameters of the target data stream in the latest time period. Several data analysis methods are selected based on the value parameters, and corresponding priority weights are generated for each data analysis method. All data analysis methods with priority weights are used together as an event perception strategy.

4. The dynamic real-time reasoning method as described in claim 3, characterized in that, The steps of performing multi-level scale dynamic segmentation processing on the target data stream according to the event-aware strategy to obtain dynamic segmented data of several scales, and assigning corresponding priority weights to each dynamic segmented data include: Starting with the last data node in a nearby time period, the target data stream is selected within a corresponding range based on the data analysis methods included in the event-aware strategy to obtain dynamic segmented data at a specified level scale. Based on the priority weights included in the event-aware strategy, corresponding priority weights are assigned to the dynamically segmented data at each specified level scale.

5. The dynamic real-time reasoning method as described in claim 1, characterized in that, The steps of combining the target data stream of the latest time period with the dynamic segmented data based on priority weights to obtain multi-level analysis objects, and performing event analysis on the multi-level analysis objects through an inference engine pre-deployed on the edge side to obtain event inference information include: The target data stream is continuously collected until the corresponding target data stream is collected in the latest time period. Based on the priority weight, the target data stream of the latest time period is combined with the dynamic segment data in sequence to generate a multi-level analysis object composed of multiple analysis objects with an analysis order. The analysis object with the highest priority analysis order among the multi-level analysis objects is set as the inference target of the inference engine pre-deployed on the edge side, so that the inference engine analyzes the inference target to obtain target inference data; After obtaining the target inference data of the analysis objects in the specified analysis order, the analysis object in the next analysis order of the multi-level analysis objects is set as the inference target, until the target inference data of each analysis object of the multi-level analysis objects is obtained; The target reasoning data of each analysis object in the multi-level analysis object are combined to obtain event reasoning information.

6. The dynamic real-time reasoning method as described in claim 5, characterized in that, The steps of analyzing the inference target using an inference engine to obtain target inference data include: The correlation between the target data stream and the dynamic segmented data corresponding to the reasoning target is analyzed to obtain the analysis form characteristics, and the reasoning engine is deployed in the reasoning environment according to the analysis form characteristics; The inference engine analyzes the inference target based on the specified inference environment to obtain target inference data.

7. A dynamic real-time inference device, characterized in that, include: The data perception module is used to perceive the data status of the target data stream in the vicinity of the time period based on the data perception mode of the preset recognition parameters, and to obtain the data performance characteristics of the target data stream in the vicinity of the time period. The event awareness module is used to combine the data performance characteristics of adjacent time periods with the data performance characteristics of historical records to predict the probability of occurrence of key events in the latest time period of the target data stream, and generate corresponding event awareness strategies based on the prediction results. The dynamic segmentation module is used to perform multi-level scale dynamic segmentation processing on the target data stream according to the event perception strategy, to obtain dynamic segmented data of several scales, and to assign corresponding priority weights to each dynamic segmented data. The event reasoning module is used to combine the target data stream collected in the latest time period with the dynamic segmented data based on priority weights to obtain multi-level analysis objects. The multi-level analysis objects are then analyzed by an inference engine pre-deployed on the edge side to obtain event reasoning information.

8. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the dynamic real-time inference method as described in any one of claims 1 to 6.

9. A readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the dynamic real-time inference method as described in any one of claims 1 to 6.

10. A computer program product, characterized in that, The computer program product includes a computer program that, when executed by a processor, enables the implementation of the steps of the dynamic real-time inference method as described in any one of claims 1 to 6.