Data acquisition method, system and device and electronic equipment
By acquiring the initial state space parameters of the server, predicting the target traffic information for future periods, and dynamically adjusting the data collection frequency, the problem of unbalanced resource utilization in existing technologies is solved, and efficient resource management and monitoring are achieved in the intelligent connected vehicle scenario.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUANGZHOU AUTOMOBILE GROUP CO LTD
- Filing Date
- 2026-01-05
- Publication Date
- 2026-04-10
AI Technical Summary
Existing data collection methods cannot effectively balance resource consumption when resources are limited, resulting in insufficient monitoring accuracy and anomaly detection capabilities. Especially in environments with tight resources and large traffic fluctuations, strategies cannot be adjusted in time to cope with sudden traffic surges, leading to resource overload or missed collection of critical anomalies.
By acquiring the initial state space parameters of the server, the target traffic information for future periods is predicted, the data collection frequency is dynamically adjusted, and the data collection strategy is optimized to adapt to traffic changes by combining feature extraction networks and prediction models with reinforcement learning, thus ensuring a balance in resource utilization and monitoring accuracy.
It enables the effective utilization of resources in intelligent connected vehicle scenarios, ensures the stable operation of the monitoring system and the high efficiency of anomaly detection, avoids resource waste and omission of key data, and improves the adaptability and efficiency of the operation and maintenance system.
Smart Images

Figure CN121842016A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing, and more particularly to a data acquisition method, system, apparatus, and electronic device. Background Technology
[0002] Currently, data collection typically employs fixed-ratio sampling, stratified random sampling, and sliding window downsampling strategies. However, fixed-ratio sampling collects data at a fixed rate in all situations, lacking flexibility and unable to adjust based on real-time resource load. Stratified random sampling divides data into different tiers based on business characteristics, with each tier having its own independent sampling probability, but it cannot accurately predict and respond to traffic peaks, especially under resource constraints, and may overlook important anomalies such as system service errors or sensor malfunctions, thus affecting overall monitoring accuracy and anomaly detection capabilities. In resource-constrained environments, sliding window strategies are usually adjusted based on fixed thresholds, which are not always suitable for all situations, especially when resource utilization fluctuates significantly, leading to resource overload due to untimely strategy adjustments. Therefore, the above methods still suffer from the technical problem of failing to effectively balance resource consumption. Summary of the Invention
[0003] This application provides a data acquisition method, system, device, and electronic device, aiming to solve the technical problem of the inability to effectively balance resource consumption.
[0004] According to one embodiment of this application, a data acquisition method is provided. The method may include: obtaining initial state space parameters of a server in the current time period, wherein the initial state space parameters characterize the resource usage status of the server in the current time period; predicting target traffic information of the server in a future time period based on the initial state space parameters, wherein the target traffic information characterizes the processing volume of traffic data to be processed by the server in the future time period; obtaining target state space parameters based on the target traffic information and the initial state space parameters, wherein the target state space parameters characterize the resource usage status of the server in the future time period; determining the data acquisition frequency of the server in the future time period based on the target state space parameters; and transmitting the data to be processed from the vehicle to the server according to the data acquisition frequency.
[0005] The above-described optional embodiments of this application can achieve the following beneficial effects: By obtaining the initial state space parameters of the server in the current time period, the usage status of server resources can be understood in real time, such as the utilization rate of the Central Processing Unit (CPU), memory usage, and network bandwidth utilization. Based on the initial state space parameters, the target traffic information of the server in future time periods can be predicted to determine the processing volume of the traffic data to be processed in future time periods (e.g., traffic load). Thus, based on the predicted target traffic information and the initial state space parameters, the target state space parameters are obtained. Through the target state space parameters, the data collection frequency in future time periods is determined. This process is dynamic and can intelligently adjust the data collection frequency according to the traffic prediction results to adjust the real-time demand for resources in the server, thereby solving the technical problem of not being able to effectively balance resource consumption and achieving the technical effect of effectively balancing resource consumption.
[0006] Optionally, based on the initial state space parameters, the target traffic information of the server in the future time period is predicted, including: obtaining the historical traffic information of the server in the historical time period, wherein the historical traffic information is used to characterize the historical processing volume of the server's traffic data in the historical time period, and the historical time period is the time period before the current time period; and predicting the target traffic information of the server in the future time period based on the initial state space parameters and the historical traffic information.
[0007] The above-mentioned optional embodiments of this application can achieve the following beneficial effects: By obtaining the historical traffic information of the server in historical time periods, the historical patterns and trends of this historical traffic information can be used for prediction. Combined with the initial state space parameters and historical traffic information, a more realistic traffic prediction can be made. For example, when the server's load or traffic pattern changes, timely and accurate prediction results can be provided by quickly adapting to these changes. This is crucial for adjusting the data collection frequency in real time to cope with sudden traffic surges, thereby significantly improving operation and maintenance efficiency and resource utilization efficiency, and effectively addressing the challenges of high-frequency business traffic in intelligent connected vehicle scenarios.
[0008] Optionally, based on the initial state space parameters and historical traffic information, the target traffic information of the server in the future period is predicted, including: using a feature extraction network to extract features from the initial state space parameters to obtain first feature data; and using a prediction model to predict the first feature data and historical traffic information to obtain the target traffic information.
[0009] The above-described optional embodiments of this application can achieve the following beneficial effects: By using a feature extraction network to process the initial state space parameters, key and abstract features can be extracted from complex resource usage states to obtain first feature data. Compared with the initial state space parameters, this first feature data has stronger expressive power and less redundancy. Combined with historical traffic information, the prediction model can learn the patterns and trends of traffic changes, making the prediction of target traffic information more accurate and providing a more reliable data foundation for subsequent resource allocation and data collection frequency adjustment.
[0010] Optionally, based on the target state space parameters, the data acquisition frequency of the server in the future time period is determined, including: using a feature extraction network to extract features from the target state space parameters to obtain second feature data; using a state space feature extraction model to process the second feature data to obtain the data acquisition frequency, wherein the feature extraction network, the prediction model, and the state space feature extraction model are jointly trained based on historical state space parameters and the historical data acquisition frequencies corresponding to the historical state space parameters.
[0011] The above-mentioned optional embodiments of this application can achieve the following beneficial effects: The above-mentioned feature processing and decision-making process based on deep learning, namely the feature extraction network, prediction model, and state space feature extraction model jointly trained based on historical state space parameters and the historical data collection frequency corresponding to the historical state space parameters, makes full use of historical data, can intelligently respond to traffic changes, and automatically adjust the data collection strategy, which not only ensures the necessary monitoring accuracy but also avoids resource waste and improves the server's processing capacity and overall efficiency. In this step, both the prediction model and the state space feature extraction model use feature extraction networks for feature extraction, thereby reducing model complexity. Through continuous self-learning and optimization of deep learning, the accuracy and efficiency of decision-making can be gradually improved, better serving the operation and maintenance needs in the intelligent connected vehicle scenario.
[0012] Optionally, the feature extraction network, prediction model, and state space feature extraction model are trained using the following method: Using the initial feature extraction network, features are extracted from historical state space parameters to obtain first historical feature data; the initial prediction model is used to predict the first historical feature data to obtain a predicted traffic sequence; samples of the predicted traffic sequence are used to transform the historical state space parameters to obtain transformed state space parameters; the initial state space feature extraction model is used to extract features from the transformed state space parameters to obtain second historical feature data; the initial state space feature extraction model is used to process the second historical feature data to obtain the target data collection frequency; based on the target data collection frequency and the historical data collection frequency, a reward function is constructed, which includes a resource penalty term, a precision reward term, and a cost penalty term. The resource penalty term is used to adjust the resource usage in the server, the precision reward term is used to adjust the server's resource failure rate, and the cost penalty term is used to adjust the amount of sampled data in the server; the reward function is used to update the model parameters of the initial feature extraction network, the initial prediction model, and the initial state space feature extraction model to obtain the trained feature extraction network, prediction model, and state space feature extraction model.
[0013] The optional embodiments described above in this application achieve the following beneficial effects: By processing historical state space parameters through an initial feature extraction network to obtain first historical feature data, it is possible to deeply learn and understand the potential patterns in the historical feature data, such as complex features like resource usage and business indicator trends, thereby improving the accuracy of predicted traffic sequences. Transforming historical state space parameters using the initial predicted traffic sequence to generate transformed state space parameters ensures that the prediction results can be effectively integrated into the state space, providing more comprehensive information for decision-making, including estimates of future resource needs, and helping to achieve a more reasonable balance between resource management and data collection. The initial state space feature extraction model is used to process the transformed state space parameters and extract second historical feature data. Through the above two-stage feature extraction, features that have a significant impact on data collection frequency can be identified and utilized more meticulously. This hierarchical feature processing method enhances the generalization ability and prediction accuracy of the feature extraction network, prediction model, and state space feature extraction model. After processing the second historical feature data, the initial state space feature extraction model outputs the target data collection frequency. This is an intelligent decision based on the current server resource status and expected traffic. The dynamic adjustment of the collection frequency ensures that necessary monitoring accuracy is maintained even under resource constraints, while avoiding over-collection when resources are abundant, thus optimizing resource utilization efficiency. Based on the target data collection frequency and historical data collection frequency, a reward function can be constructed. The resource penalty term in this reward function can be used to optimize resource allocation and avoid resource waste; the accuracy reward term can prioritize capturing anomalies and improve the fault detection rate; and the cost penalty term controls the total amount of data collected, avoiding unnecessary cost increases. Using the feedback from the reward function, the parameters of the initial feature extraction network, the initial prediction model, and the initial state space feature extraction model are updated, iteratively optimizing the corresponding model performance. This reinforcement learning-based training mechanism enables the feature extraction network, prediction model, and state space feature extraction model to continuously learn and adapt to environmental changes, improving adaptability and stability in the face of various traffic patterns.
[0014] According to one embodiment of this application, a data acquisition system is also provided. The system may include: a vehicle-mounted terminal for transmitting data to be processed to a server; a server for acquiring initial state space parameters for the current time period, wherein the initial state space parameters characterize the resource usage status of the server during the current time period; predicting target traffic information for a future time period based on the initial state space parameters, wherein the target traffic information characterizes the processing volume of traffic data to be processed by the server in the future time period; obtaining target state space parameters based on the target traffic information and the initial state space parameters, wherein the target state space parameters characterize the resource usage status of the server in the future time period; determining the data acquisition frequency of the server in the future time period based on the target state space parameters; and acquiring data to be processed from the vehicle-mounted terminal according to the data acquisition frequency.
[0015] According to one embodiment of this application, a data acquisition device is also provided, comprising: an acquisition unit, configured to acquire initial state space parameters of a server in the current time period, wherein the initial state space parameters characterize the resource usage status of the server in the current time period; a prediction unit, configured to predict target traffic information of the server in a future time period based on the initial state space parameters, wherein the target traffic information characterizes the processing volume of traffic data to be processed by the server in the future time period; a processing unit, configured to obtain target state space parameters based on the target traffic information and the initial state space parameters, wherein the target state space parameters characterize the resource usage status of the server in the future time period; a determination unit, configured to determine the data acquisition frequency of the server in the future time period based on the target state space parameters; and a transmission unit, configured to transmit the data to be processed from the vehicle to the server according to the data acquisition frequency.
[0016] According to another aspect of the embodiments of this application, an electronic device is provided, including a processor; a memory for storing processor-executable instructions; wherein the processor is configured to execute instructions to implement the method described above.
[0017] According to another aspect of the embodiments of this application, a computer-readable storage medium is provided, wherein a computer program is stored in the computer-readable storage medium, and the computer program is configured to perform the above-described method when run by a processor.
[0018] According to another aspect of the embodiments of this application, a computer program product is provided, including a computer program that, when executed by a processor, implements the above-described method.
[0019] According to another aspect of the embodiments of this application, a vehicle is provided, including an on-board processor and an on-board memory, wherein the on-board memory is used to store computer programs; and the on-board processor is used to execute the computer programs stored in the memory to implement the above-described method.
[0020] It should be noted that the general descriptions above and the detailed descriptions below are merely illustrative and explanatory for this application and do not constitute a limitation thereof. Attached Figure Description
[0021] Figure 1 This is a flowchart of a data acquisition method provided in an embodiment of this application;
[0022] Figure 2 This is a schematic diagram of a vehicle adaptive sampling system based on reinforcement learning provided in an embodiment of this application;
[0023] Figure 3 This is a structural diagram of a data acquisition system provided in one embodiment of this application;
[0024] Figure 4 This is a structural diagram of a data acquisition device provided in one embodiment of this application;
[0025] Figure 5 This is a structural diagram of an electronic device provided in an embodiment of this application. Detailed Implementation
[0026] To make the technical problems, technical solutions, and beneficial effects solved by this application clearer, the following detailed description is provided in conjunction with embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0027] Currently, in intelligent connected vehicle scenarios, vehicles report service call status via embedded points (e.g., in-vehicle entertainment service "audio follows speed") to monitor end-to-end link quality (e.g., latency, failure rate). High-frequency services (e.g., real-time data reporting at 100ms / time) can generate massive requests during sudden surges, causing a sudden spike in CPU and memory resources for cloud services, leading to service degradation or even outages.
[0028] In related technologies, data acquisition methods include fixed-ratio sampling, stratified random sampling, and sliding window downsampling. Sliding window downsampling is a technique that dynamically adjusts the data acquisition frequency. By statistically analyzing the request volume or resource usage within a specified time window in real time, it adaptively adjusts the sampling rate for the next time window. Sliding window downsampling is dynamic, allowing it to adjust its strategy based on real-time data changes within the window; it can rely on data from the most recent time window, avoiding interference from historical data; and it can prevent frequent strategy oscillations caused by sudden traffic spikes by sliding the window.
[0029] However, the above methods still suffer from problems such as rigid static rules, missed failure requests, and difficulty in balancing resource waste and monitoring accuracy. Specifically, rigid static rules prevent dynamic adjustment based on real-time load (e.g., CPU, network latency), potentially leading to overload under high load. Missed failure requests occur when downsampling data, inadvertently filtering out failed requests (unless full sampling is forced), impacting monitoring accuracy. Therefore, the above methods have a technical problem in effectively balancing resource consumption.
[0030] To address the aforementioned issues, this application provides a data acquisition method. This method may include: obtaining initial state space parameters of a server in the current time period, wherein the initial state space parameters characterize the resource usage status of the server in the current time period; predicting target traffic information of the server in a future time period based on the initial state space parameters, wherein the target traffic information characterizes the processing volume of traffic data to be processed by the server in the future time period; converting the target traffic information and the initial state space parameters to obtain target state space parameters, wherein the target state space parameters characterize the resource usage status of the server in the future time period; determining the data acquisition frequency of the server in the future time period based on the target state space parameters; and transmitting the data to be processed from the vehicle to the server according to the data acquisition frequency.
[0031] The data transmission method provided in this application achieves the following technical effects: By obtaining the initial state space parameters of the server in the current time period, the usage status of server resources (e.g., CPU utilization, memory usage, network bandwidth utilization, etc.) can be understood in real time. Based on the initial state space parameters, the target traffic information of the server in the future time period can be predicted to determine the processing volume of the traffic data to be processed in the future time period (e.g., traffic load). Thus, based on the predicted target traffic information and the initial state space parameters, the target state space parameters are obtained. Through the target state space parameters, the data collection frequency in the future time period is determined. The above process is dynamic and can intelligently adjust the data collection frequency according to the traffic prediction results to adjust the real-time demand for resources in the server, thereby solving the technical problem of not being able to effectively balance resource consumption and achieving the technical effect of effectively balancing resource consumption.
[0032] This application provides a data acquisition method, please refer to the embodiments thereof. Figure 1 , Figure 1 This is a flowchart of a data acquisition method provided in an embodiment of this application, including the following steps:
[0033] S102: Obtain the initial state space parameters of the server in the current time period.
[0034] In step S102, the aforementioned initial state space parameters can be used to characterize the resource usage status of the server during the current time period. These initial state space parameters can be referred to as state space information; that is, the information contained in the state space may include, but is not limited to: resource metrics such as CPU utilization, memory usage, and network bandwidth utilization; business metrics such as current request frequency, queries per second (QPS), service error rate, and sampling rate; and the mean, variance, and trend of traffic during the current time period, such as the rate of change of the QPS over the past 5 seconds. Traffic flow time-series characteristics; and preset monitoring accuracy lower limits (e.g., critical events must have a sampling rate greater than 95%). External constraints such as ( ).
[0035] Optionally, by obtaining the initial state space parameters of the server in the cloud at the current time period, the resource usage status of the server can be fully reflected, which is the basis for subsequent dynamic sampling strategy decisions.
[0036] Optionally, CPU utilization can be used to represent the processor's activity level, expressed as a percentage, illustrating the real-time occupancy of CPU resources. Memory usage can be used to represent the current amount of memory resources used by the server, such as allocated, cached, and active memory. Network bandwidth utilization can be used to represent the efficiency of data transmission on the server's network interfaces, helping to understand the consumption of network resources. Current request frequency can be used to represent the number of requests processed per second, used to assess business load. Service error rate can be used to represent the proportion of errors that occur when the server processes requests, helping to identify potential problems in servers in the cloud. Failed request percentage can be used to represent the proportion of failed requests among all requests, which is particularly important for anomaly detection. The preset monitoring accuracy lower limit can be used to represent the set minimum sampling rate, ensuring that the monitoring of critical events is not missed.
[0037] Optionally, network traffic can be monitored in real time by a monitoring tool deployed on the server. Traffic data within each time window can be recorded, thereby calculating statistical indicators such as the mean and variance of traffic during the current period, as well as the trend of traffic changes.
[0038] Optionally, by calling the server's system monitoring interface, CPU utilization, memory usage, and network bandwidth utilization can be obtained in real time. By analyzing the application logs running on the server, the current request frequency, service error rate, and percentage of failed requests can be obtained, and the preset monitoring accuracy lower limit can be queried from the operations and maintenance database.
[0039] It should be noted that the specific content and acquisition method of the above initial state space parameters are only illustrative examples, and no specific restrictions are imposed on the specific content and acquisition method of the initial state space parameters here.
[0040] In this embodiment, the aforementioned initial state space parameters collectively constitute the server's state space. The real-time values of these initial state space parameters reflect the immediate challenges and resource demands faced by the server. By acquiring these initial state space parameters, the server's operational status and business needs can be assessed in real time, providing crucial information for subsequent steps such as traffic prediction, balancing resource consumption and monitoring accuracy, and adjusting data acquisition frequency.
[0041] S104: Based on the initial state space parameters, predict the target traffic information of the server in the future time period.
[0042] In step S104, the target traffic information can be used to characterize the amount of traffic data to be processed by the server in the future time period. It can be the QPS prediction sequence for the future time period, for example, the QPS prediction value for the next 2 seconds, with 1 prediction point per second, for a total of 2 values, and finally the prediction is the QPS prediction sequence for the next 2 seconds [QPS_t+1, QPS_t+2].
[0043] Optionally, after obtaining the initial state space parameters of the server in the current period, the target traffic information of the server in the future period can be predicted based on the initial state space parameters using a prediction model. The target traffic information is mainly used to characterize the amount of traffic data that the server is expected to process in the future period, especially the trend of traffic value changes, which is crucial for the formulation of operation and maintenance strategies in the intelligent connected vehicle scenario.
[0044] Optionally, the above prediction process can be accomplished using machine learning techniques, such as a Transformer prediction module. This Transformer module can process time-series data, capture long-term dependencies in traffic changes, and thus provide accurate traffic predictions. In this way, the data collection frequency can be adjusted based on the prediction results before traffic peaks arrive, balancing resource consumption and monitoring accuracy, avoiding excessive consumption of server resources during sudden high traffic periods, while ensuring that critical data is not missed, maintaining stable server operation and efficient monitoring.
[0045] In this embodiment of the application, by predicting the amount of traffic data to be processed by the server in the future, the operation and maintenance system in the intelligent connected vehicle scenario can be provided with predictive capabilities, enabling the operation and maintenance system to proactively rather than passively respond to the upcoming traffic challenges. This is an important link in realizing intelligent resource management and efficient data collection.
[0046] S106: Based on the target flow information and the initial state space parameters, obtain the target state space parameters.
[0047] In step S106, the aforementioned target state space parameters can be used to characterize the resource usage status of the server in a future time period.
[0048] Alternatively, the initial state-space parameters can be expressed by the following formula:
[0049] =
[0050] in, It can be used to indicate CPU utilization; It can be used to represent memory usage; It can be used to represent network bandwidth utilization; It can be used to represent network bandwidth utilization; It can be used to indicate the current request frequency; It can be used to represent service error rate; It can be used to indicate the percentage of failed requests; It can be used to indicate the lower limit of monitoring accuracy (e.g., critical events must meet the lower limit of sampling rate).
[0051] Optionally, after predicting the server's target traffic information for future time periods based on the initial state space parameters, the target state space parameters can be obtained based on the target traffic information and the initial state space parameters. For example, the initial state space parameters can be transformed using the target traffic information to obtain the target state space parameters. Alternatively, the initial state space parameters can be expanded to the initial state space parameters plus the future QPS value predicted by the Transformer, resulting in the target state space parameters, which can be expressed by the following formula:
[0052] =
[0053]
[0054] in, It can be used to represent the QPS prediction value for the next second; It can be used to represent the QPS prediction value for the next 2 seconds; It can be used to represent the original state plus the future QPS value predicted by the Transformer.
[0055] In this embodiment, through the above processing, the target state space parameters not only include the current resource usage status of the server but also incorporate predictive information for the future, providing more comprehensive data support for subsequent decision-making. Based on the target state space parameters, reinforcement learning algorithms can be used to dynamically adjust the data collection frequency to adapt to future traffic changes, while ensuring effective resource utilization and maintaining monitoring accuracy. This prediction-based state transition mechanism enhances the server's adaptability and stability in complex dynamic environments.
[0056] S108: Based on the target state space parameters, determine the data acquisition frequency of the server in the future time period.
[0057] In step S108, after obtaining the target state space parameters based on the target traffic information and the initial state space parameters, the data collection frequency of the server in the future time period can be determined based on the target state space parameters. The aforementioned data collection frequency can be the sampling rate of the server in the future time period, and can be used to determine the collection frequency for data acquisition.
[0058] Optionally, by analyzing resource usage (e.g., CPU, memory, and bandwidth utilization) reflected in the target state space parameters and future traffic predictions, the resource pressure level faced by the server in the future can be determined. An optimization objective can be set based on a reward function design, such as minimizing resource consumption, maximizing monitoring accuracy and efficiency, while ensuring a high recall rate for failed requests. Then, a reinforcement learning model is used to dynamically adjust the data collection frequency based on the target state space parameters and the optimization objective. The reinforcement learning model can output a continuous sampling rate value. If future traffic is predicted to be low and resources are sufficient, a high data collection frequency can be maintained to ensure comprehensive and detailed monitoring. If future traffic is predicted to be high and resources are close to saturation, the data collection frequency can be significantly reduced to avoid resource overload, while ensuring the collection of key data according to a preset monitoring accuracy lower limit.
[0059] Optionally, the state-space feature extraction model can learn from historical data to predict future traffic (i.e., target traffic information) and reduce the sampling rate in advance during the initial stage of traffic increase. For example, if it is predicted that the number of requests will increase by 300% in the next 2 seconds, the sampling rate can be automatically reduced from 20% to 8%.
[0060] In this embodiment, through the above steps, the operation and maintenance system can adjust its data collection strategy to effectively respond to upcoming traffic changes and ensure stable server operation and monitoring requirements under various circumstances. Determining the dynamic data collection frequency is one of the key measures for achieving efficient operation.
[0061] S110: Transmit the data to be processed from the vehicle to the server according to the data acquisition frequency.
[0062] In step S110, after determining the server's data acquisition frequency for the future time period based on the target state space parameters, the data to be processed from the vehicle can be transmitted to the server according to the data acquisition frequency. This data to be processed can include vehicle operating status data, service call data, abnormal event data, and other relevant data.
[0063] Optionally, vehicle operating status data may include location information, speed and acceleration, battery status, and sensor data. Location information can be used to represent the vehicle's real-time location, for analyzing the vehicle's geographical distribution and driving routes. Speed and acceleration can be used to represent the vehicle's speed and acceleration data, helping to monitor the vehicle's powertrain status. Battery status can be used to represent information such as the electric vehicle's battery charge, temperature, and voltage, which is crucial for the electric vehicle's health management and performance optimization. Sensor data can be used to represent data from sensors inside and outside the vehicle, such as temperature sensors, pressure sensors, and cameras, for monitoring the vehicle's environment and internal status.
[0064] Optionally, service call data may include in-vehicle entertainment services, safety system services, and communication services. In-vehicle entertainment services may include data such as call frequency, response time, and failure rate for entertainment services like audio-responsive systems, used to assess service quality and user satisfaction. Safety system services may indicate the usage status of services such as braking systems, airbags, and blind spot monitoring, which are crucial for ensuring driving safety. Communication services may indicate communication status data between the vehicle and the cloud or between vehicles, including communication latency and packet loss rate, which helps optimize communication strategies and network configurations.
[0065] Optionally, abnormal event data may include fault reports and incident data. Fault reports, which record vehicle component failures, system anomalies, or software errors, are crucial for rapid response and fault handling. Incident data, which represents information related to events such as vehicle collisions and emergency braking, is used for incident analysis and preventative measures development.
[0066] Optionally, other relevant data may include user behavior data and environmental data. User behavior data can be used to represent a user's driving habits, service preferences, etc., which helps in personalized services and user experience optimization. Environmental data may include weather and road conditions in the driving area, used for environmental perception and intelligent decision support.
[0067] It should be noted that the above data to be processed is only an example, and no specific restrictions are placed on the content of the data to be processed.
[0068] Optionally, based on the data acquisition frequency, data transmission operations can be performed, that is, the data to be processed at the vehicle end can be transmitted to the server at a specified frequency. This process ensures that the server can receive an appropriate amount of data based on the latest traffic forecasts and resource status, without overconsuming resources or missing critical information.
[0069] Optionally, the vehicle-mounted monitoring system can filter the real-time data based on a determined data acquisition frequency. If the data acquisition frequency is set to 10%, only 10% of the real-time data samples will be transmitted to the server. The filtered data will be packaged, encoded according to protocol requirements, and then transmitted to the server over the network. During this process, data compression and encryption can also be performed to improve transmission efficiency and data security.
[0070] Optionally, after receiving the data to be processed from the vehicle, the server can process it according to the current resource status. This includes steps such as data decoding, storage, and analysis to update the monitoring status in real time and provide a basis for subsequent decision-making. On the server side, adjusting the data collection frequency helps to more accurately detect anomalies. For example, if the proportion of failed requests is abnormally high at a low collection frequency, an immediate response can be taken, such as increasing the data collection frequency, triggering alarms, or conducting in-depth analysis, to ensure that critical anomalies are handled promptly.
[0071] In this embodiment, the above steps achieve efficient data collection and transmission, ensuring the rational utilization of server resources while maintaining the monitoring accuracy and anomaly detection capabilities of the operation and maintenance system. This dynamically adjusted data collection mechanism is an important strategy for addressing the challenges of large data volumes, high time sensitivity, and resource constraints in intelligent connected vehicle scenarios.
[0072] Based on steps S102 to S110 above, by obtaining the initial state space parameters of the server in the current time period, the usage status of server resources (e.g., CPU utilization, memory usage, network bandwidth utilization, etc.) can be understood in real time. Based on the initial state space parameters, the target traffic information of the server in future time periods can be predicted, and the target traffic information of the traffic data to be processed can be predicted in advance to determine the processing volume of the traffic data to be processed in future time periods (e.g., traffic load). Thus, based on the predicted target traffic information and the initial state space parameters, the target state space parameters are obtained. Through the target state space parameters, the data collection frequency in future time periods is determined. The above process is dynamic and can intelligently adjust the data collection frequency according to the traffic prediction results to adjust the real-time demand for resources in the server, thereby solving the technical problem of not being able to effectively balance resource consumption and achieving the technical effect of effectively balancing resource consumption.
[0073] The method described in this embodiment will now be further explained.
[0074] As an optional embodiment, step S104, based on the initial state space parameters, predicts the target traffic information of the server in the future time period, including: obtaining the historical traffic information of the server in the historical time period, wherein the historical traffic information is used to characterize the historical processing volume of the server's traffic data in the historical time period, and the historical time period is the time period before the current time period; and predicting the target traffic information of the server in the future time period based on the initial state space parameters and the historical traffic information.
[0075] In this embodiment, historical traffic information of the server over a historical period can be collected. This historical traffic information reflects the server's traffic processing behavior within a specific time window, such as average QPS, peak traffic, and traffic trends over a past period. The historical period can refer to the period preceding the current period to more closely correlate the current state with future predictions.
[0076] Optionally, after obtaining historical traffic information of the server over a historical period, the initial state space parameters can be combined with the historical traffic information for feature extraction and engineering processing to generate input features for prediction. For example, preprocessing steps such as data cleaning, missing value imputation, feature selection, and feature scaling can be performed to ensure that the prediction model obtains high-quality input data.
[0077] Optionally, after generating the input features for prediction, the processed features can be input into the prediction model to obtain the server's target traffic information for future periods.
[0078] In this embodiment, the above steps enable more accurate prediction of server target traffic information for future periods based on initial state space parameters and historical traffic information. This predictive capability allows the operation and maintenance system in intelligent connected vehicle scenarios to make appropriate resource planning and data collection strategy adjustments before traffic changes occur, improving the stability and efficiency of the operation and maintenance system. Simultaneously, by applying historical traffic information, traffic patterns can be better understood, prediction bias can be reduced, and the reliability and practicality of the prediction results can be ensured.
[0079] As an optional implementation method, based on initial state space parameters and historical traffic information, the target traffic information of the server in a future time period is predicted, including: using a feature extraction network to extract features from the initial state space parameters to obtain first feature data; and using a prediction model to predict the first feature data and historical traffic information to obtain target traffic information.
[0080] In this embodiment, the aforementioned feature extraction network can be a bottom-level feature extraction network. The first feature data contains a deep understanding of initial state-space parameters such as CPU utilization, memory usage, network bandwidth utilization, current request frequency, service error rate, and failed request percentage, which facilitates more accurate traffic prediction by the prediction model. The prediction model can be a Transformer prediction model, also known as a Transformer prediction module.
[0081] Optionally, the extracted first feature data is integrated with historical traffic information and input into the Transformer prediction model. Since the prediction model has been trained on a large amount of historical data, it can understand the patterns and trends of traffic changes. Based on the first feature data and historical traffic information, the prediction model can predict the server's traffic trend in future periods, obtaining target traffic information, including expected QPS, potential traffic peaks or troughs, etc.
[0082] Optionally, a feature extraction network can be used to extract features from the initial state space parameters to obtain the first feature data. For example, a one-dimensional convolutional neural network (1D-CNN) or LSTM can be used as a shared encoder to output a high-dimensional feature vector, extracting general features from the input data (initial state space parameters). This avoids feature redundancy caused by the independent learning of the Transformer prediction module and the state space feature extraction module. By sharing parameters, the complexity of the prediction model is reduced, and joint optimization of the Transformer prediction module and the state space feature extraction module is promoted.
[0083] Optionally, the spatial state extraction module (e.g., a state space feature extraction model) and the prediction module can share the underlying feature extraction network. The fully connected layers of the Transformer prediction module can be modified to map the Transformer prediction module output to the QPS prediction values for the next 2 seconds (e.g., 1 prediction point per second, for a total of 2 values). The final prediction is the QPS prediction sequence [QPS_t+1, QPS_t+2] for the next 2 seconds.
[0084] In this embodiment, by implementing the above steps, dynamic traffic prediction based on reinforcement learning can be achieved, thereby guiding the optimization of data collection, effectively addressing the challenges brought by sudden traffic surges, and ensuring the stable operation of servers and the efficient operation of monitoring systems. This method based on deep feature extraction and historical data prediction embodies the intelligence and predictive nature of the operation and maintenance system, and is an important component for realizing advanced operation and maintenance automation.
[0085] In this embodiment, the prediction model can be a Transformer prediction module, which takes general features and historical traffic information (e.g., QPS in the last 10 seconds) as input. The fully connected layer of the Transformer prediction module is modified to map its output to the predicted QPS value for the next 2 seconds. QPS represents the maximum number of query requests that can be processed, the number of requests that can be received and processed per second. In the context of intelligent connected vehicles, QPS can refer to the number of service calls or data interactions between the vehicle and the cloud server per second.
[0086] As an optional embodiment, step S108, based on the target state space parameters, determines the data acquisition frequency of the server in the future time period, including: using a feature extraction network to extract features from the target state space parameters to obtain second feature data; using a state space feature extraction model to process the second feature data to obtain the data acquisition frequency, wherein the feature extraction network, prediction model, and state space feature extraction model are jointly trained based on historical state space parameters and the historical data acquisition frequencies corresponding to the historical state space parameters.
[0087] In this embodiment, the second feature data may include abstract representations of features such as target traffic information, resource indicators, business indicators, and external constraints, and serves as the input to the state-space feature extraction model. Both the prediction model and the state-space feature extraction model can utilize feature extraction networks to reduce their complexity.
[0088] Optionally, in determining the server's data collection frequency for a future period based on the target state space parameters, a pre-trained feature extraction network can be used to extract features from the target state space parameters, extracting deeper feature information to generate second feature data. This second feature data can then be input into the state space feature extraction model. Through learning from historical data, this state space feature extraction model can predict a reasonable data collection frequency for the future period based on the input feature data.
[0089] Optionally, the data acquisition frequency output by the state-space feature extraction model is dynamically adjusted, taking into account various aspects of the target state-space parameters, with the goal of achieving a balance between resource consumption and monitoring accuracy. For example, when resources are scarce and the target traffic prediction is high, the data acquisition frequency should be reduced to prevent overload.
[0090] In this embodiment, the method based on historical data training and deep feature extraction effectively improves the intelligence and accuracy of the operation and maintenance system's decision-making in dynamic environments, which is a key step in achieving resource optimization and high recall rate for abnormal events. Furthermore, joint training based on historical state space parameters and the corresponding historical data collection frequencies ensures the consistency and coordination of the three stages: feature extraction, traffic prediction, and frequency decision-making, thereby improving the stability and efficiency of the operation and maintenance system.
[0091] As an optional implementation, the feature extraction network, prediction model, and state space feature extraction model can be trained using the following method: Using the initial feature extraction network, features are extracted from historical state space parameters to obtain first historical feature data; the initial prediction model is used to predict the first historical feature data to obtain a predicted traffic sequence; samples of the predicted traffic sequence are used to transform the historical state space parameters to obtain transformed state space parameters; the initial state space feature extraction model is used to extract features from the transformed state space parameters to obtain second historical feature data; the initial state space feature extraction model is used to process the second historical feature data to obtain the target data acquisition frequency; based on the target data acquisition frequency and the historical data acquisition frequency, a reward function is constructed, wherein the reward function includes a resource penalty term, a precision reward term, and a cost penalty term. The resource penalty term is used to adjust the resource usage in the server, the precision reward term is used to adjust the server's resource failure rate, and the cost penalty term is used to adjust the amount of sampled data in the server; the reward function is used to update the model parameters of the initial feature extraction network, the initial prediction model, and the initial state space feature extraction model to obtain the trained feature extraction network, prediction model, and state space feature extraction model.
[0092] In this embodiment, an auxiliary initial feature extraction network can be used to analyze historical state space parameters (e.g., CPU utilization, memory usage, bandwidth usage, service request frequency, error rate, etc.). These historical state space parameters can be preprocessed, such as through standardization and denoising. Then, the initial feature extraction network (e.g., convolutional neural network, long short-term memory network, or other suitable neural network model) performs deep learning on these historical state space parameters to extract high-level abstract features related to server performance and business load, i.e., obtaining the first historical feature data. This first historical feature data constitutes a deep understanding of the historical state, which helps predict future traffic patterns and server demand.
[0093] Optionally, the initial prediction model (e.g., a Transformer or other model with time series prediction capabilities) can receive first historical feature data from an initial feature extraction network as input. By learning patterns and trends in the first historical feature data, it predicts traffic sequences over a future period, resulting in predicted traffic sequences. These predicted traffic sequences are based on patterns observed in the first historical feature data and can provide prior information about future adjustments to data collection frequency. Subsequently, the historical state-space parameters can be transformed based on the predicted traffic sequence samples. For example, if an increase in request frequency is predicted, the transformed state-space parameters can reflect a higher load level, which will guide subsequent action decisions. Transforming the state-space parameters is to incorporate predictive information into the decision-making process, ensuring that decisions are based on recent predictions, rather than just historical data.
[0094] Optionally, the initial state space feature extraction model can be further processed to transform the state space parameters, and a more complex model architecture can be used to extract deeper features. These features not only reflect immediate resource requirements and business conditions, but also take into account future demand predictions brought about by predicted traffic sequences, thereby making the obtained second historical feature data more comprehensive.
[0095] Optionally, after processing by the initial state space feature extraction model, the second historical feature data can be transformed into a format that is easy for the initial state space feature extraction model to understand and make decisions. Based on these features, the initial state space feature extraction model can calculate the appropriate data collection frequency for future periods, i.e., the target data collection frequency, through optimization algorithms (such as reinforcement learning), ensuring that the collection strategy can dynamically respond to changes in server load and business needs.
[0096] Optionally, an initial feature extraction network is used to process the historical state-space parameters to extract features related to traffic prediction and data collection frequency, generating first historical feature data. This first historical feature data is then input into the initial prediction model to predict the traffic sequence for a specific past period, resulting in a predicted traffic sequence. Subsequently, the predicted traffic sequence obtained from the initial prediction model can be integrated into the historical state-space parameters, transforming them to obtain a new version containing traffic prediction information—that is, transformed state-space parameters. This transformation enhances the initial prediction model's sensitivity to traffic changes, allowing for more comprehensive consideration in subsequent decisions. The transformed state-space parameters are then further feature-extracted using the initial state-space feature extraction model to obtain second historical feature data. This second historical feature data is then processed using the initial state-space feature extraction model to obtain the target data collection frequency.
[0097] Optionally, after obtaining the target data collection frequency, a reward function can be constructed based on the difference between the target data collection frequency and the historical data collection frequency. This reward function includes a resource penalty term. + + Precision reward items + and cost penalty items This reward function can be used to comprehensively evaluate the performance of the feature extraction network, prediction model, and state space feature extraction model, and to help the feature extraction network, prediction model, and state space feature extraction model learn how to find a balance between resource consumption, monitoring accuracy, and cost-effectiveness.
[0098] Optionally, the design of the reward function, i.e., the design of the loss function, can maximize long-term gains by weighting and combining multiple optimization objectives to drive the prediction model to balance resource consumption and monitoring accuracy. Simultaneously, giving higher weights to failed requests can improve the detection rate of missed failed requests. Reward Function The design can be described by the following formula:
[0099] = + + )+ +
[0100] in, It can be used to indicate CPU utilization; It can be used to represent memory usage; It can be used to represent network bandwidth utilization; It can be used to represent service error rate; It can be used to indicate the percentage of failed requests; It can be used to represent sampling overhead, which is the additional burden cost that performing sampling operations (such as data collection) incurs on the operation and maintenance system; , , The resource penalty, accuracy penalty, and cost penalty can be adjusted respectively.
[0101] Alternatively, the reward function can be... Assigning high weights (e.g., rewarding failed requests 100 times more than successful requests) allows for priority sampling of all failed requests. A composite reward function can be designed to simultaneously optimize resource consumption (CPU, bandwidth) and monitoring accuracy (failure recall, statistical error).
[0102] Optionally, the resource penalty is used to adjust the utilization of resources in the server; the higher the CPU / memory / bandwidth utilization, the larger the resource penalty. The precision reward is used to adjust the server's resource failure rate; the higher the service error rate or the proportion of failed requests, the larger the precision reward. The cost penalty is used to adjust the amount of sampled data in the server; a penalty is imposed when the amount of sampled data is too large (e.g., storage costs exceed limits). For example, when the CPU utilization increases from 70% to 90%, the overall reward value decreases (penalty increases); when the failure recall rate increases from 95% to 99%, the overall reward value increases.
[0103] Optionally, after obtaining the reward function, the reward function can be used as a feedback signal to update the model parameters of the initial feature extraction network, the initial prediction model, and the initial state space feature extraction model through the backpropagation algorithm. The initial feature extraction network, the initial prediction model, and the initial state space feature extraction model are iteratively optimized to obtain the trained feature extraction network, prediction model, and state space feature extraction model until a satisfactory prediction effect and data collection frequency are achieved.
[0104] Through the above steps, the initial feature extraction network, initial prediction model, and initial state space feature extraction model are continuously optimized and adjusted based on historical data. This ensures that the data collection strategy becomes increasingly accurate over time, while minimizing resource waste and cost, and achieving intelligent management and effective utilization of resources.
[0105] In this embodiment, the input to the state-space feature extraction model can be the original state plus a Transformer to predict future QPS values; the output can be the sampling rate corresponding to future time points. Predicting future QPS values using the original state plus a Transformer means predicting future data traffic. This is achieved by jointly estimating the QPS using the original state space and the future QPS. A higher QPS means more requests are sent within the same time period, thus increasing the overall traffic.
[0106] Optionally, the state space can be expanded, extending the original state (preset parameters, pre-defined metric values, and business metrics) to the original state plus the future QPS value predicted by the Transformer. The original state plus the future QPS value predicted by the Transformer can be expressed by the following formula:
[0107] =
[0108]
[0109] in, It can be used to represent the QPS prediction value for the next second; It can be used to represent the QPS prediction value for the next 2 seconds; It can be used to represent the original state plus the future QPS value predicted by the Transformer.
[0110] Optionally, during training and online inference, the environment simulator can build a simulation environment based on historical logs to simulate request sequences under different loads; the exploration strategy can be ε-greedy (initial ε=0.5, gradually decaying), where ε is a probability value between 0 and 1, representing the probability that the algorithm chooses random exploration (rather than the currently known best action) at any given time; greedy can be used to represent a greedy strategy, i.e., choosing the action with the highest expected reward in the current state. Reward calculation can be aggregated every 10 seconds. The target network can be mitigated by using double Q-learning, which synchronizes parameters every 100 steps.
[0111] In this embodiment of the invention, by obtaining the initial state space parameters of the server within the current time period, the usage status of server resources (e.g., CPU utilization, memory usage, network bandwidth utilization, etc.) can be understood in real time. Based on the initial state space parameters, the target traffic information of the server in future time periods can be predicted to determine the processing volume of the traffic data to be processed in future time periods (e.g., traffic load). Thus, based on the predicted target traffic information and the initial state space parameters, the target state space parameters are obtained. Through the target state space parameters, the data collection frequency in future time periods is determined. The above process is dynamic and can intelligently adjust the data collection frequency according to the traffic prediction results to adjust the real-time demand on server resources, thereby solving the technical problem of not being able to effectively balance resource consumption and achieving the technical effect of effectively balancing resource consumption.
[0112] In related technologies, there are issues such as resource overload under high-frequency pulse traffic, the risk of missed detection of failed requests, and the balance between resource waste and monitoring accuracy. Specifically, the resource overload problem under high-frequency pulse traffic is that in vehicle data tracking scenarios, high-frequency services such as audio-based motion tracking report data at 100ms intervals, resulting in burst traffic of tens of thousands of requests per second. This causes a sudden spike in cloud service resources such as CPU, memory, and network bandwidth, leading to service degradation or downtime. The risk of missed detection of failed requests is that failed requests represent critical abnormal events (e.g., sensor failure, communication terminal, service errors), and these data represent a small percentage, making random sampling prone to missed detection. The balance between resource waste and monitoring accuracy is that under low load, a fixed sampling rate (e.g., 10%) leads to over-collection of data, wasting storage and computing resources; while under high load, insufficient sampling results in monitoring blind spots.
[0113] To address the aforementioned issues, this application proposes a vehicle adaptive sampling system based on reinforcement learning. Figure 2 This is a schematic diagram of a vehicle adaptive sampling system based on reinforcement learning, provided in one embodiment of this application. Figure 2 As shown, it includes a feature extraction network 202 and a prediction module 204.
[0114] Feature extraction network 202 can be used as the underlying feature extraction network.
[0115] Prediction module 204 can be a Transformer prediction module.
[0116] In this embodiment, the Transformer prediction module can be embedded into the state space to provide future traffic trends. The state space feature extraction model and the Transformer prediction module are trained end-to-end. Both modules share the underlying feature extraction network. For example, the feature extraction network extracts shared features, and the Transformer prediction module processes these shared features and historical traffic sequences to obtain predictions for the next two seconds.
[0117] Optionally, the spatial state extraction module (e.g., a state-space feature extraction model) and the prediction module can share a low-level feature extraction network. This low-level feature extraction network can use 1D-CNN or LSTM as a shared encoder to output high-dimensional feature vectors. The state-space and prediction modules share the network's feature extraction module, avoiding feature redundancy caused by independent learning by the Transformer prediction and state-space feature extraction modules. By sharing parameters, model complexity is reduced, and joint optimization of the prediction and state-space feature extraction modules is facilitated.
[0118] Optionally, the Transformer prediction module can take general input features plus historical traffic sequences (e.g., QPS for the last 10 seconds). The fully connected layers of the Transformer prediction module can be modified to map the output to QPS predictions for the next 2 seconds (e.g., 1 prediction point per second, for a total of 2 values). The final prediction is a QPS prediction sequence for the next 2 seconds [QPS_t+1, QPS_t+2].
[0119] Optionally, the state-space feature extraction model learns from historical data to predict future traffic (e.g., audio-responsive services are frequently triggered during specific time periods), and reduces the sampling rate in advance during the initial stage of traffic increase. For example, if it is predicted that the number of requests will increase by 300% in the next 2 seconds, the sampling rate will be automatically reduced from 20% to 8%.
[0120] Optionally, the input to the state-space feature extraction model can be the original state plus the Transformer's predicted future QPS value; the output can be the sampling rate corresponding to the future time step.
[0121] In this embodiment, reinforcement learning is introduced into the data sampling and collection business domain of the operation and maintenance system in the intelligent connected vehicle scenario; in the spatial design module, the Transformer prediction module is embedded into the state space, and the core mechanism of adaptive action decision-making is adopted to solve the high-frequency pulse traffic resource overload; in the reward function module, multiple optimization objectives are weighted and combined to drive the prediction model to balance resource consumption and monitoring accuracy.
[0122] According to an embodiment of this application, a data acquisition system is also provided. It should be noted that this data acquisition system can be used to execute the data acquisition method described in the embodiments of the present invention.
[0123] This application also provides a data acquisition system 30, please refer to... Figure 3 , Figure 3 This is a structural diagram of a data acquisition system provided in one embodiment of this application, as shown below. Figure 3 As shown, the data acquisition system 300 may include: vehicle terminal 302 and server 304.
[0124] Vehicle terminal 302 is used to transmit the data to be processed to the server.
[0125] Server 304 is used to obtain the initial state space parameters for the current time period, wherein the initial state space parameters are used to characterize the resource usage status of the server in the current time period; based on the initial state space parameters, target traffic information for the future time period is predicted, wherein the target traffic information is used to characterize the amount of traffic data to be processed by the server in the future time period; based on the target traffic information and the initial state space parameters, target state space parameters are obtained, wherein the target state space parameters are used to characterize the resource usage status of the server in the future time period; based on the target state space parameters, the data collection frequency of the server in the future time period is determined; and data to be processed is collected from the vehicle terminal according to the data collection frequency.
[0126] Optionally, the vehicle and cloud can collaborate using different strategies, allowing for the design of an action space. The action space can employ either discrete or continuous actions. Discrete actions are suitable for edge / vehicle terminals with low computing power, while continuous actions are suitable for cloud-based applications with high computing power but requiring finer-grained control. Continuous actions can directly output a sampling rate (e.g., 0.23), suitable for fine-grained control.
[0127] In this embodiment, a data acquisition system is proposed. This system transmits data to be processed to a server via a vehicle terminal 302. The server 304 obtains initial state space parameters for the current time period, where the initial state space parameters characterize the resource usage status of the server during the current time period. Based on the initial state space parameters, target traffic information for a future time period is predicted, where the target traffic information characterizes the processing volume of traffic data to be processed by the server in the future time period. Based on the target traffic information and the initial state space parameters, target state space parameters are obtained, where the target state space parameters characterize the resource usage status of the server in the future time period. Based on the target state space parameters, the data acquisition frequency of the server in the future time period is determined. Data to be processed is acquired from the vehicle terminal according to the data acquisition frequency, thereby solving the technical problem of ineffective resource consumption balancing and achieving the technical effect of effectively balancing resource consumption.
[0128] According to an embodiment of this application, a data acquisition device is also provided. It should be noted that this data acquisition device can be used to execute the data acquisition method in the embodiments of the present invention.
[0129] This application embodiment also provides a data acquisition device 40, please refer to... Figure 4 , Figure 4 This is a structural diagram of a data acquisition device provided in one embodiment of this application, as shown below. Figure 4As shown, the data acquisition device 40 may include: an acquisition unit 402, a prediction unit 404, a processing unit 406, a determination unit 408, and a transmission unit 410.
[0130] The acquisition unit 402 is used to acquire the initial state space parameters of the server in the current time period, wherein the initial state space parameters are used to characterize the resource usage status of the server in the current time period.
[0131] The prediction unit 404 is used to predict the target traffic information of the server in the future time period based on the initial state space parameters, wherein the target traffic information is used to characterize the amount of traffic data to be processed by the server in the future time period.
[0132] The processing unit 406 is used to transform based on the target traffic information and the initial state space parameters to obtain the target state space parameters, wherein the target state space parameters are used to characterize the resource usage status of the server in a future time period.
[0133] The determination unit 408 is used to determine the data acquisition frequency of the server in a future time period based on the target state space parameters.
[0134] The transmission unit 410 is used to transmit the data to be processed at the vehicle end to the server according to the data acquisition frequency.
[0135] Optionally, the prediction unit 404 includes: an acquisition subunit, used to acquire historical traffic information of the server in a historical time period, wherein the historical traffic information is used to characterize the historical processing volume of the server's traffic data in the historical time period, and the historical time period is the previous time period of the current time period; and a first prediction subunit, used to predict the target traffic information of the server in a future time period based on the initial state space parameters and the historical traffic information.
[0136] Optionally, the first prediction subunit includes: a first extraction subunit, used to extract features from the initial state space parameters using a feature extraction network to obtain first feature data; and a second prediction subunit, used to predict the first feature data and historical traffic information using a prediction model to obtain target traffic information.
[0137] Optionally, the determining unit 408 includes: a second extraction subunit, used to extract features from the target state space parameters using a feature extraction network to obtain second feature data; and a first processing subunit, used to process the second feature data using a state space feature extraction model to obtain the data acquisition frequency, wherein the feature extraction network, the prediction model, and the state space feature extraction model are jointly trained based on historical state space parameters and the historical data acquisition frequencies corresponding to the historical state space parameters.
[0138] Optionally, the data acquisition device 40 is further configured to train a feature extraction network, a prediction model, and a state space feature extraction model through the following sub-units: a third extraction sub-unit, configured to extract features from historical state space parameters using the initial feature extraction network to obtain first historical feature data; a third prediction sub-unit, configured to predict the first historical feature data using the initial prediction model to obtain a predicted flow sequence; a transformation sub-unit, configured to transform the historical state space parameters using the predicted flow sequence samples to obtain transformed state space parameters; and to extract features from the transformed state space parameters using the initial state space feature extraction model to obtain second historical feature data; and a second processing sub-unit, configured to train the initial state space feature extraction network, a prediction model, and a state space feature extraction model using the initial state space feature extraction model to obtain second historical feature data; and a third prediction sub-unit, configured to train the first historical feature data using the initial state space feature extraction network to obtain a predicted flow sequence; a third prediction sub-unit, configured to train the first historical feature data using the initial state space feature extraction network to obtain a predicted flow sequence; a fourth prediction sub-unit, configured to train the first historical feature data using the initial state space feature extraction model to obtain second historical feature data; and a fifth prediction sub-unit, configured to train the first historical feature data using the initial state space feature extraction model to obtain second historical feature data; and a sixth prediction sub-unit, configured to train the first historical feature data using the initial state space feature extraction model to obtain second historical feature data; and a seventh prediction sub-unit, configured to train the first historical feature data using the initial state space feature extraction model to obtain second historical feature data. The initial state-space feature extraction model processes the second historical feature data to obtain the target data acquisition frequency. A sub-unit is constructed to build a reward function based on the target data acquisition frequency and historical data acquisition frequencies. This reward function includes a resource penalty term, a precision reward term, and a cost penalty term. The resource penalty term adjusts the resource usage in the server, the precision reward term adjusts the server's resource failure rate, and the cost penalty term adjusts the amount of sampled data in the server. An update sub-unit uses the reward function to update the model parameters of the initial feature extraction network, the initial prediction model, and the initial state-space feature extraction model, resulting in the trained feature extraction network, prediction model, and state-space feature extraction model.
[0139] The data acquisition device provided in this application embodiment achieves the following technical effects: the acquisition unit 402 acquires the initial state space parameters of the server in the current time period, wherein the initial state space parameters are used to characterize the resource usage status of the server in the current time period; the prediction unit 404 predicts the target traffic information of the server in the future time period based on the initial state space parameters, wherein the target traffic information is used to characterize the processing volume of traffic data to be processed by the server in the future time period; the processing unit 406 obtains the target state space parameters based on the target traffic information and the initial state space parameters, wherein the target state space parameters are used to characterize the resource usage status of the server in the future time period; the determination unit 408 determines the data acquisition frequency of the server in the future time period based on the target state space parameters; and the transmission unit 410 transmits the data to be processed from the vehicle to the server according to the data acquisition frequency, thereby solving the technical problem of not being able to effectively balance resource consumption and achieving the technical effect of effectively balancing resource consumption.
[0140] It should be noted that the above-mentioned units can be implemented by software or hardware. For the latter, they can be implemented in the following ways, but are not limited to: all the above modules are located in the same processor; or, the above modules are located in different processors in any combination.
[0141] This application also provides an electronic device 50, please refer to... Figure 5 , Figure 5 This is a structural diagram of an electronic device provided in one embodiment of this application, including a processor 510 and a memory 520. The memory 510 is used to store computer programs; the processor 520 is used to execute the programs stored in the memory 510 to implement the data acquisition method described in any embodiment of this application.
[0142] Optionally, in this embodiment, the processor can be configured to perform the following steps via a computer program:
[0143] Step S1: Obtain the initial state space parameters of the server in the current time period, wherein the initial state space parameters are used to characterize the resource usage status of the server in the current time period;
[0144] Step S2: Based on the initial state space parameters, predict the target traffic information of the server in the future time period, wherein the target traffic information is used to characterize the amount of traffic data to be processed by the server in the future time period.
[0145] Step S3: Based on the target traffic information and the initial state space parameters, the target state space parameters are obtained, wherein the target state space parameters are used to characterize the resource usage status of the server in the future time period.
[0146] Step S4: Based on the target state space parameters, determine the data acquisition frequency of the server in the future time period;
[0147] Step S5: According to the data collection frequency, transmit the data to be processed from the vehicle to the server.
[0148] The electronic device provided in this application achieves the following technical effects: By acquiring the initial state space parameters of the server in the current time period, the usage status of server resources (e.g., CPU utilization, memory usage, network bandwidth utilization, etc.) can be understood in real time. Based on the initial state space parameters, the target traffic information of the server in future time periods can be predicted to determine the processing volume of the traffic data to be processed in future time periods (e.g., traffic load). Thus, based on the predicted target traffic information and the initial state space parameters, the target state space parameters are obtained. Through the target state space parameters, the data collection frequency in future time periods is determined. This process is dynamic and can intelligently adjust the data collection frequency according to the traffic prediction results to adjust the real-time demand for resources in the server, thereby solving the technical problem of not being able to effectively balance resource consumption and achieving the technical effect of effectively balancing resource consumption.
[0149] Those skilled in the art will understand that Figure 5The structure shown is for illustrative purposes only. Electronic devices can also be smartphones (such as Android phones, iOS phones, etc.), tablets, PDAs, and mobile internet devices (MIDs) and other terminal devices. Figure 5 This does not limit the structure of the aforementioned electronic device. For example, electronic device 60 may also include components that are more... Figure 5 The more or fewer components shown (e.g., network interface, display device, etc.), or having the same Figure 5 The different configurations shown.
[0150] This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the data transmission method described in any embodiment of this application.
[0151] Optionally, in this embodiment, the storage medium may be configured to store a computer program for performing the following steps:
[0152] Step S1: Obtain the initial state space parameters of the server in the current time period, wherein the initial state space parameters are used to characterize the resource usage status of the server in the current time period;
[0153] Step S2: Based on the initial state space parameters, predict the target traffic information of the server in the future time period, wherein the target traffic information is used to characterize the amount of traffic data to be processed by the server in the future time period.
[0154] Step S3: Based on the target traffic information and the initial state space parameters, the target state space parameters are obtained, wherein the target state space parameters are used to characterize the resource usage status of the server in the future time period.
[0155] Step S4: Based on the target state space parameters, determine the data acquisition frequency of the server in the future time period;
[0156] Step S5: According to the data collection frequency, transmit the data to be processed from the vehicle to the server.
[0157] The electronic device provided in this application achieves the following technical effects: By acquiring the initial state space parameters of the server in the current time period, the usage status of server resources (e.g., CPU utilization, memory usage, network bandwidth utilization, etc.) can be understood in real time. Based on the initial state space parameters, the target traffic information of the server in future time periods can be predicted to determine the processing volume of the traffic data to be processed in future time periods (e.g., traffic load). Thus, based on the predicted target traffic information and the initial state space parameters, the target state space parameters are obtained. Through the target state space parameters, the data collection frequency in future time periods is determined. This process is dynamic and can intelligently adjust the data collection frequency according to the traffic prediction results to adjust the real-time demand for resources in the server, thereby solving the technical problem of not being able to effectively balance resource consumption and achieving the technical effect of effectively balancing resource consumption.
[0158] Optionally, in this embodiment, the storage medium may include, but is not limited to, various media capable of storing computer programs, such as USB flash drives, read-only memory (ROM), random access memory (RAM), portable hard drives, magnetic disks, or optical disks.
[0159] The electronic device provided in this application achieves the following technical effects: By acquiring the initial state space parameters of the server in the current time period, the usage status of server resources (e.g., CPU utilization, memory usage, network bandwidth utilization, etc.) can be understood in real time. Based on the initial state space parameters, the target traffic information of the server in future time periods can be predicted to determine the processing volume of the traffic data to be processed in future time periods (e.g., traffic load). Thus, based on the predicted target traffic information and the initial state space parameters, the target state space parameters are obtained. Through the target state space parameters, the data collection frequency in future time periods is determined. This process is dynamic and can intelligently adjust the data collection frequency according to the traffic prediction results to adjust the real-time demand for resources in the server, thereby solving the technical problem of not being able to effectively balance resource consumption and achieving the technical effect of effectively balancing resource consumption.
[0160] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, user behavior data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation portals are provided for users to choose to authorize or refuse.
[0161] In this application, "multiple" refers to two or more.
[0162] In this application, unless otherwise expressly defined, the terms "installation," "connection," and "linking" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection between two components. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances.
[0163] The terms “first,” “second,” “third,” “fourth,” etc., in this application (if present) are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.
[0164] In this application, the term "and / or" is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent three cases: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, in this application, the character " / " generally indicates that the preceding and following related objects have an "or" relationship.
[0165] Unless otherwise specified, all steps in this application may be performed sequentially or randomly. For example, if the method includes steps A and B, it means that the method may include steps A and B performed sequentially, or it may include steps B and A performed sequentially. For example, if the method may also include step C, it means that step C may be added to the method in any order. For example, the method may include steps A, B, and C, or it may include steps A, C, and B, or it may include steps C, A, and B, etc.
[0166] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A method of collecting data, characterized by, The method comprises the following steps: obtaining initial state space parameters of a server in a current period, wherein the initial state space parameters are used to represent the usage state of resources in the server in the current period; based on the initial state space parameters, predicting target traffic information of the server in a future period, wherein the target traffic information is used to represent the processing amount of traffic data to be processed by the server in the future period; based on the target traffic information and the initial state space parameters, obtaining target state space parameters, wherein the target state space parameters are used to represent the usage state of resources in the server in the future period; based on the target state space parameters, determining the data acquisition frequency of the server in the future period; transmitting the to-be-processed data of the vehicle terminal to the server according to the data acquisition frequency.
2. The method of claim 1, wherein, The method comprises the following steps: obtaining historical traffic information of the server in a historical period, wherein the historical traffic information is used to represent the historical processing amount of traffic data of the server in the historical period, and the historical period is the previous period of the current period; based on the initial state space parameters and the historical traffic information, predicting the target traffic information of the server in the future period.
3. The method of claim 2, wherein, The method comprises the following steps: using a feature extraction network to extract features from the initial state space parameters to obtain first feature data; using a prediction model to predict the first feature data and the historical traffic information to obtain the target traffic information.
4. The method of claim 3, wherein, The method comprises the following steps: using the feature extraction network to extract features from the target state space parameters to obtain second feature data; using a state space feature extraction model to process the second feature data to obtain the data acquisition frequency, wherein the feature extraction network, the prediction model and the state space feature extraction model are jointly trained based on historical state space parameters and corresponding historical data acquisition frequencies.
5. The method of claim 4, wherein, The feature extraction network, the prediction model and the state space feature extraction model are trained by the following method: using an initial feature extraction network to extract features from the historical state space parameters to obtain first historical feature data; using an initial prediction model to predict the first historical feature data to obtain a predicted traffic sequence; using a predicted traffic sequence sample to convert the historical state space parameters to obtain converted state space parameters; using an initial state space feature extraction model to extract features from the converted state space parameters to obtain second historical feature data; using the initial state space feature extraction model to process the second historical feature data to obtain a target data acquisition frequency; construct a reward function based on the target data collection frequency and the historical data collection frequency, wherein the reward function comprises a resource penalty term, an accuracy reward term and a cost penalty term, the resource penalty term is used to adjust the use of resources in the server, the accuracy reward term is used to adjust the resource failure rate of the server, and the cost penalty term is used to adjust the amount of sampled data of the server; update the model parameters of the initial feature extraction network, the initial prediction model and the initial state space feature extraction model using the reward function to obtain the trained feature extraction network, prediction model and state space feature extraction model.
6. A data acquisition system, characterized by Comprise: The vehicle end is used for transmitting the to-be-processed data to the server; The server is used for obtaining initial state space parameters in a current period, wherein the initial state space parameters are used to represent the use state of resources in the server in the current period; based on the initial state space parameters, target traffic information in a future period is predicted, wherein the target traffic information is used to represent the processing amount of traffic data to be processed by the server in the future period; based on the target traffic information and the initial state space parameters, target state space parameters are obtained, wherein the target state space parameters are used to represent the use state of resources in the server in the future period; based on the target state space parameters, the data collection frequency of the server in the future period is determined; and the to-be-processed data is collected from the vehicle end according to the data collection frequency.
7. An apparatus for collecting data, characterized by Comprise: An acquisition unit is configured to acquire initial state space parameters of a server in a current period, wherein the initial state space parameters are used to represent the use state of resources in the server in the current period; A prediction unit is configured to predict target traffic information of the server in a future period based on the initial state space parameters, wherein the target traffic information is used to represent the processing amount of traffic data to be processed by the server in the future period; A processing unit is configured to obtain target state space parameters based on the target traffic information and the initial state space parameters, wherein the target state space parameters are used to represent the use state of resources in the server in the future period; A determination unit is configured to determine the data collection frequency of the server in the future period based on the target state space parameters; A transmission unit is configured to transmit to-be-processed data of a vehicle end to the server according to the data collection frequency.
8. An electronic device, comprising: Comprise a processor and a memory, wherein The memory is used to store a computer program; The processor is used to execute the program stored on the memory to realize the method of any one of claims 1 to 5.
9. A computer-readable storage medium, characterized in that, The computer program is stored in the computer readable storage medium, and the computer program is executed by the processor to realize the method of any one of claims 1 to 5. The computer program is stored in the computer readable storage medium, and the computer program is executed by the processor to realize the method of any one of claims 1 to 5.
10. A vehicle comprising an on-board processor and an on-board memory, the on-board memory for storing a computer program; the on-board processor for executing the computer program stored on the on-board memory, the computer program, when executed by the processor, implementing the method of any one of claims 1 to 5.