A responsive back pressure regulation method, apparatus, device and medium
Patent Information
- Application Number
- CN202610806387.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-04
- Publication Date
- 2026-10-20
AI Technical Summary
[0005]本发明提供一种响应式背压调节方法、装置、计算机设备及介质,以解决如何自适应地实现对生产者与消费者间数据下发过程的动态调控,以提高生产者与消费者间的业务稳定性的问题
[0011]其中,通过实时监测生产者向消费者进行数据下发时的网络状态,来感知当前链路的拥塞程度与传输能力,基于不同的网络状态动态匹配对应的背压调控策略,实现了调控策略与网络状态的动态适配,根据对应的背压调控策略,确定需要下发调控的数据类型、目标数据及初始调控策略,实现了对不同类型数据的差异化调控,使得不同类型的数据能够获得与其业务价值相匹配的调控力度,并结合历史接收信息对初始调控策略进行自适应修正,使得调控策略能够贴合消费者的真实处理能力与接收偏好,避免了调控策略与消费者实际承载能力的脱节,从而自适应地实现了对生产者与消费者间的数据下发过程的实时动态调控,提高了生产者与消费者间业务的稳定性。
Smart Images

Figure FT_1 
Figure FT_2 
Figure FT_3
Abstract
Description
Technical Field
[0001] This invention relates to the fields of responsive programming, financial technology and healthcare, and in particular to a responsive back pressure regulation method, apparatus, device and medium. Background Technology
[0002] Responsive programming is a programming paradigm oriented towards data streams and the propagation of changes. This means that static or dynamic data streams can be easily expressed in programming languages, and the relevant computational model automatically propagates the changed values through the data stream. A stream is a sequence of elements produced by producers and consumed by one or more consumers. For example, in fintech scenarios, stock exchanges act as producers, continuously generating real-time stock market data streams, while downstream quantitative trading terminals or risk control engines act as consumers, subscribing to and consuming this data stream. When the price of a stock fluctuates, the changed price value is automatically propagated along the data stream to all subscribed consumers. In healthcare scenarios, various vital sign sensors in hospital wards act as producers, continuously outputting physiological parameter streams such as patients' heart rate, blood oxygen, and blood pressure, while central monitoring systems or intelligent early warning modules act as consumers, subscribing to and consuming this physiological parameter stream in real time. Once an indicator shows an abnormal change, the change value is immediately propagated along the data stream to the early warning module, triggering an alarm.
[0003] Currently, when handling large language models and multimodal streaming data push, mainstream industry solutions typically include blocking synchronous communication, basic streaming push, and unbounded queue asynchronous processing. Specifically, blocking synchronous communication requires the consumer to wait for the producer to complete all data generation before returning all data at once; basic streaming push is based on a communication protocol, where the producer directly writes the generated data into the sending buffer for indiscriminate pushing; unbounded queue asynchronous processing connects the producer and network sending thread through an unbounded in-memory queue to achieve asynchronous decoupling. However, these technologies still have problems such as data backlog, memory overflow, and even link congestion and crashes when the producer's data generation speed is faster than the consumer's processing capacity, which further affects the continuity and stability of business between the producer and consumer.
[0004] Therefore, how to adaptively and dynamically regulate the data distribution process between producers and consumers in order to improve the business stability between them has become an urgent problem to be solved. Summary of the Invention
[0005] This invention provides a responsive back pressure regulation method, device, computer equipment, and medium to solve the problem of how to adaptively achieve dynamic control of the data distribution process between producers and consumers, so as to improve the business stability between producers and consumers.
[0006] Firstly, a responsive backpressure regulation method is provided. This method is applied to the server side of a responsive backpressure regulation system, which further includes producers and consumers. The server side is located between the producer and the consumer in the data transmission path, and includes: The network status is monitored in real time when the producer sends data to the consumer. Based on the network status, a corresponding back pressure control strategy is matched. Based on the back pressure control strategy, the data type of the data to be controlled, the target data of the data type sent by the producer to the consumer, and the initial control strategy for controlling the sending of the target data are determined. The data types include a first data type that would affect business continuity if data loss occurred, a second data type that allows for partial data loss without affecting business continuity, and / or a third data type that allows for data loss but only affects the business experience; Based on the data type and the initial control strategy, historical reception information is obtained from a preset database, wherein the historical reception information is information representing the degree of reception of the historical data by the consumer when the historical data of the data type is distributed and controlled according to the initial control strategy. Based on the historical reception information, the degree to which the consumer receives the historical data is evaluated to obtain an evaluation result. If the evaluation result meets the preset conditions, the initial control strategy is determined to be the target control strategy. According to the target control strategy, the process of sending the target data to the consumer is controlled, and the process returns to the step of real-time monitoring of the network status when the producer sends data to the consumer, until the producer completes sending data to the consumer.
[0007] Secondly, a responsive backpressure regulation device is provided. This responsive backpressure regulation device is applied to the server side of a responsive backpressure regulation system. The responsive backpressure regulation system also includes a producer and a consumer. The server side is located between the producer and the consumer in the data transmission path, and includes: The first monitoring module is used to monitor the network status in real time when the producer sends data to the consumer, match the corresponding back pressure control strategy according to the network status, and determine the data type of the data to be controlled, the target data of the data type sent by the producer to the consumer, and the initial control strategy for controlling the sending of the target data according to the back pressure control strategy. The data types include a first data type that would affect business continuity if data loss occurred, a second data type that allows for partial data loss without affecting business continuity, and / or a third data type that allows for data loss but only affects the business experience; The query module is used to retrieve historical reception information from a preset database based on the data type and the initial control strategy. The historical reception information is information that characterizes the degree of reception of the historical data by the consumer when the historical data of the data type is distributed and controlled according to the initial control strategy. An evaluation module is used to evaluate the degree of reception of the historical data by the consumer based on the historical reception information, and obtain an evaluation result. If the evaluation result meets a preset condition, the initial control strategy is determined to be the target control strategy. The control module is used to control the process of sending the target data to the consumer according to the target control strategy, and return to the step of real-time monitoring of the network status when the producer sends data to the consumer, until the producer completes the data sending to the consumer.
[0008] Thirdly, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the above-described responsive backpressure regulation method.
[0009] Fourthly, a computer-readable storage medium is provided, which stores a computer program that, when executed by a processor, implements the steps of the above-described responsive backpressure regulation method.
[0010] In the aforementioned responsive backpressure regulation method, apparatus, computer equipment, and storage medium, the responsive backpressure regulation method is applied to the server side of the responsive backpressure regulation system. The responsive backpressure regulation system also includes producers and consumers. The server is located along the data transmission path from the producer to the consumer. By real-time monitoring of the network status during data transmission from the producer to the consumer, a corresponding backpressure regulation strategy is matched based on the network status. Based on the backpressure regulation strategy, the data type of the data requiring regulation, the target data belonging to the data type in the data transmitted from the producer to the consumer, and the initial regulation strategy for regulating the target data are determined. The data type includes data loss events. The system includes a first data type that may affect business continuity, a second data type that allows for partial data loss without affecting business continuity, and / or a third data type that allows for data loss but only affects the business experience. Based on the data type and the initial control strategy, historical reception information is obtained from a preset database. Based on the historical reception information, the degree of reception of historical data by the consumer is evaluated to obtain an evaluation result. If the evaluation result meets preset conditions, the initial control strategy is determined as the target control strategy. Based on the target control strategy, the process of sending target data to consumers is controlled. The system then returns to the step of real-time monitoring of the network status when the producer sends data to the consumer until the producer completes the data sending to the consumer.
[0011] Specifically, by monitoring the network status in real time when producers send data to consumers, the congestion level and transmission capacity of the current link are perceived. Based on different network states, corresponding backpressure control strategies are dynamically matched, realizing dynamic adaptation between control strategies and network states. According to the corresponding backpressure control strategy, the data type, target data, and initial control strategy to be sent for control are determined, realizing differentiated control for different types of data. This allows different types of data to receive control intensity commensurate with their business value. Furthermore, the initial control strategy is adaptively corrected by combining historical reception information, ensuring that the control strategy matches the actual processing capacity and reception preferences of consumers. This avoids the disconnect between the control strategy and the actual carrying capacity of consumers, thereby adaptively realizing real-time dynamic control of the data transmission process between producers and consumers, and improving the stability of business between producers and consumers. Attached Figure Description
[0012] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0013] Figure 1This is a schematic diagram of an application environment for a responsive back pressure regulation method provided in Embodiment 1 of the present invention; Figure 2 This is a schematic flowchart of a responsive back pressure regulation method provided in Embodiment 2 of the present invention; Figure 3 This is a schematic flowchart of a responsive back pressure regulation method provided in Embodiment 3 of the present invention; Figure 4 This is a schematic flowchart of a responsive back pressure regulation method provided in Embodiment 4 of the present invention; Figure 5 This is a schematic diagram of the architecture of a responsive back pressure regulation system provided in Embodiment 4 of the present invention; Figure 6 This is a schematic diagram of a responsive back pressure regulating device provided in Embodiment 5 of the present invention; Figure 7 This is a schematic diagram of the structure of a computer device provided in Embodiment Six of the present invention. Detailed Implementation
[0014] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0015] The artificial intelligence-based responsive backpressure regulation method provided in Embodiment 1 of this invention can be applied to, for example... Figure 1 The application environment of this invention is a responsive backpressure control system, which also includes producers and consumers. The server is located in the path where the producer sends data to the consumer. Clients can be, but are not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices. The server can be implemented using a standalone server or a server cluster consisting of multiple servers. The invention will be described in detail below through specific embodiments.
[0016] For example, this responsive back pressure control method can be applied to the server side of a remote intelligent monitoring system, which also includes a medical data acquisition terminal (producer) and a hospital central monitoring platform (consumer), with the server deployed on the data transmission link between the two. The server monitors the network status in real time when the data acquisition terminal uploads vital sign data to the monitoring platform. When the network is normal, a buffering strategy is used to regulate data that might be lost and affect business continuity (such as patient ECG alarm events and ventricular fibrillation test results). During mild congestion, the system switches to a combined buffering strategy and a sliding window sampling strategy. The buffering strategy regulates data that might be lost and affect business continuity, while the sliding window strategy regulates data that can be partially lost and does not affect business continuity (such as temperature and blood pressure trend data collected every five minutes). During severe congestion, the system switches to a fully collaborative buffering strategy, a sliding window sampling strategy, and a smart discarding strategy. The buffering strategy regulates data that might be lost and affect business continuity, the sliding window strategy regulates data that can be partially lost and does not affect business continuity, and the smart discarding strategy regulates data that can be lost and only affects the user experience (such as high-resolution waveforms and historical playback data). This achieves an adaptation of the regulation intensity to the degree of network congestion and the value of data services, ensuring that critical alarms are not lost, ordinary data is not blocked, and user experience data is elastically sacrificed, thereby improving the continuity and stability of remote monitoring services.
[0017] Please see Figure 2 As shown, Figure 2 This is a flowchart illustrating a responsive backpressure regulation method according to Embodiment 2 of the present invention. The responsive backpressure regulation method is applied to the server side of a responsive backpressure regulation system. The responsive backpressure regulation system also includes producers and consumers. The server side is located between the producer and the consumer in the data transmission path, and includes the following steps: S21: Monitor the network status in real time when producers send data to consumers, match the corresponding back pressure control strategy according to the network status, and determine the data type of the data to be controlled, the target data of the data type sent by the producer to the consumer, and the initial control strategy for controlling the target data.
[0018] In this embodiment, the responsive backpressure control system can refer to a closed-loop data stream processing system jointly composed of producers, servers, and consumers. The server dynamically adjusts the data delivery rhythm based on the real-time network status to avoid consumer overload and ensure business continuity. The network status can refer to a set of indicators reflecting the current link transmission capacity monitored in real time during the process of producers delivering data to consumers, such as the Transmission Control Protocol (TCP) congestion window status and link backlog. The backpressure control strategy can refer to a data delivery control strategy determined based on the degree of network congestion. The target data can refer to the data that needs to be delivered and controlled in the data stream delivered by the producer, selected according to the data type determined by the backpressure control strategy. The initial control strategy can refer to the execution plan for delivering and controlling the target data based on the backpressure control strategy.
[0019] Data types may include a first data type where data loss would affect business continuity, a second data type that allows for partial data loss without affecting business continuity, and / or a third data type that allows for data loss but only affects the business experience.
[0020] For example, the data of this first type can be judged based on business consistency level, business failure risk, data uniqueness, and strong business dependency. The judgment rules can be as follows: 1. It belongs to strongly consistent business data, such as text tokens, key instructions, transaction messages, and key business signaling; 2. The data has uniqueness and order, and the loss of a single piece will directly lead to business interruption, incorrect results, and logical failure; 3. Downstream must receive it completely in order, and it cannot be recovered by interpolation, aggregation, or completion. It has the highest business priority. The data of this second type can be judged based on business data characteristics, data business priority, business tolerance threshold, business impact level, etc. The judgment rules can be as follows: 1. Frequency judgment standard: the data reporting frequency per unit time is ≥ the preset threshold (e.g., ≥ 5 times per second), including high-frequency collected data such as business operation waveforms, real-time progress, equipment status fluctuations, and traffic waveforms; 2. Fault tolerance judgment standard: the data has the characteristics of being partially lost, aggregateable, and interpolated and recoverable. The loss of a single or small amount of data will not disrupt business continuity or cause business failures. Downstream does not need to receive the data frame by frame; 3. Business attribute judgment: it belongs to non-strongly consistent business data. Downstream only needs to obtain the latest status to complete the business logic. It does not require the full historical sequence, such as progress percentage, waveform sampling data, and real-time status snapshot data. The data of this third type can be judged based on factors such as the scope of business impact, data redundancy, and substitutability. The judgment rules are as follows: 1. The data has the lowest business priority and belongs to process and auxiliary data, such as redundant video frame segments, non-critical process logs, and secondary state process data; 2. The data does not affect the core business process. Discarding a small amount or part of the data will only reduce the business experience and will not cause business crashes or logical errors; 3. Downstream does not need to receive the data frame by frame. It can be compensated by subsequent data and state snapshots to establish a proactive defense mechanism.
[0021] Specifically, the server monitors the current network status in real time, such as the TCP congestion window state and link backlog, when the producer sends data to the consumer. Based on the current network status and the preset mapping relationship between the network status and the back pressure control strategy, the server determines the back pressure control strategy corresponding to the current network status. From the back pressure control strategy, the server determines the data type of the data that needs to be controlled. From the data stream sent by the producer to the consumer, the server determines the target data belonging to the corresponding data type and determines the initial control strategy for controlling the target data.
[0022] S22: Based on the data type and initial control strategy, retrieve historical received information from the preset database.
[0023] S23: Based on historical reception information, assess the degree to which consumers receive historical data and obtain the assessment result. If the assessment result meets the preset conditions, determine the initial control strategy as the target control strategy.
[0024] In this embodiment, the preset database is used to store the consumer's historical reception information. The historical reception information is information that characterizes the consumer's reception level of historical data when the data type is distributed and controlled according to the initial control strategy. The evaluation result can refer to the result obtained by evaluating the degree of historical data actually received and confirmed by the consumer in the past period based on the consumer's historical reception information. The preset condition can refer to the threshold or logical rule set in advance to determine whether the consumer's ability to receive historical data of the data type can bear or adapt to the initial control strategy. The target control strategy can refer to the initial control strategy that meets the conditions of the evaluation result.
[0025] Specifically, information representing the consumer's acceptance of historical data is obtained from a preset database when the data type is distributed and regulated according to the initial regulation strategy. Based on the historical acceptance information, the consumer's acceptance of historical data is evaluated. The evaluation can be an assessment of the consumer's ability to receive and bear historical data when regulation is carried out based on the initial regulation strategy. If the evaluation result meets the preset conditions, such as the consumer's ability to receive and bear historical data being within the consumer's normal receiving and bearing capacity range, then the preset conditions are determined to be met, and the initial regulation strategy is set as the target regulation strategy.
[0026] Optionally, when the initial control strategy is the third control strategy, if the evaluation result of the third control strategy does not meet the preset conditions, and the consumer's ability to receive historical data controlled by the third control strategy is far from exceeding the normal carrying capacity (i.e., the consumer's processing capacity is relatively excessive), the initial control strategy can be changed to the second control strategy or the first control strategy to reduce the discarding of the third target data or excessive speed limiting.
[0027] If the evaluation results of the second control strategy do not meet the preset conditions when the initial control strategy is the second control strategy, and the consumer's ability to receive historical data controlled by the second control strategy is far from exceeding the normal carrying capacity, the initial control strategy can be changed to the first control strategy to reduce the sampling and discarding or rate limiting suppression of the second target data.
[0028] When the initial control strategy is the first control strategy, if the evaluation result of the first control strategy does not meet the preset conditions, and the consumer's ability to receive historical data controlled by the first control strategy is far from exceeding the normal carrying capacity, then the control strategy can be omitted to control the data distribution process, allowing the producer to directly distribute data to the consumer at the original rate, so as to make full use of the consumer's idle processing capacity.
[0029] S24: Based on the target control strategy, control the process of sending target data to consumers, return to the step of real-time monitoring of the network status when the producer sends data to the consumer, until the producer completes the data sending to the consumer.
[0030] Specifically, according to the control scheme of the target control strategy, the process of sending target data to consumers is controlled, and the execution step S21 is returned to the step of real-time monitoring of the network status when the producer sends data to the consumer, until the producer completes the data sending to the consumer.
[0031] In this embodiment, the network status during data transmission from the producer to the consumer is monitored in real time to perceive the current link congestion level and transmission capacity. Based on different network states, corresponding backpressure control strategies are dynamically matched, achieving dynamic adaptation between the control strategy and the network status. According to the corresponding backpressure control strategy, the data type, target data, and initial control strategy to be transmitted are determined, realizing differentiated control for different types of data. This allows different types of data to receive control intensity commensurate with their business value. Furthermore, the initial control strategy is adaptively corrected by combining historical reception information, ensuring that the control strategy matches the actual processing capacity and reception preferences of consumers. This avoids a disconnect between the control strategy and the actual carrying capacity of consumers, thereby adaptively realizing real-time dynamic control of the data transmission process between producers and consumers and improving the stability of services between producers and consumers.
[0032] like Figure 3 The diagram shown is a flowchart of a responsive backpressure regulation method provided in Embodiment 3 of the present invention. In step S21 above, a corresponding backpressure regulation strategy is matched according to the network state. Based on the backpressure regulation strategy, the data type of the data to be regulated, the target data belonging to the data type in the data sent by the producer to the consumer, and the initial regulation strategy for regulating the target data are determined. This may include the following steps: S31: If the network state is the first state, then the back pressure control strategy is determined to be the first back pressure control strategy.
[0033] S32: Based on the first back pressure control strategy, determine the data type of the data that needs to be controlled as the first data type.
[0034] S33: The data belonging to the first data type among the data distributed by the producer to the consumer shall be the first target data.
[0035] S34: Based on the first data type and in conjunction with the preset mapping table, determine the initial control strategy for distributing and controlling the first target data as the first control strategy.
[0036] In this embodiment, the first state can refer to the normal operating state that represents the current network transmission link being smooth and without congestion, the first back pressure control strategy can refer to the data transmission control strategy when the network state is normal, the preset mapping table is used to store the mapping relationship between data types and initial control strategies, and the first control strategy can refer to the initial control strategy corresponding to the data of the first data type.
[0037] That is, if the network state is the first state (sufficient resources), then based on the normal network state and combined with the preset mapping relationship between the network state and the back pressure control strategy, the back pressure control strategy corresponding to the normal network state is determined as the first back pressure control strategy. The data type that needs to be controlled in the first back pressure control strategy is the first data type. From the data stream sent from the producer to the consumer, the data belonging to the first data type is determined as the first target data. Based on the first data type and combined with the preset mapping table, the initial control strategy for controlling the first target data is determined as the first control strategy.
[0038] Optionally, based on the network status, a corresponding backpressure control strategy is matched. Based on the backpressure control strategy, the data type of the data to be controlled, the target data belonging to the data type among the data sent by the producer to the consumer, and the initial control strategy for controlling the target data are determined. This also includes: If the network state is the second state, then the back pressure control strategy is determined to be the second back pressure control strategy. Based on the second back pressure control strategy, the data types of the data that need to be controlled are determined to be the first data type and the second data type. Data belonging to the first data type among the data sent by producers to consumers is designated as the first target data, and data belonging to the second data type is designated as the second target data. Based on the first data type and in conjunction with the preset mapping table, the initial control strategy for distributing and controlling the first target data is determined as the first control strategy. Based on the second data type and in conjunction with the preset mapping table, the initial control strategy for distributing and controlling the second target data is determined as the second control strategy.
[0039] Here, the second state can refer to a state in which the current network transmission link is in a state of mild congestion, the second back pressure control strategy can refer to a data transmission control strategy when the network state is in the second state, and the second control strategy can refer to the initial control strategy corresponding to data of the second data type.
[0040] That is, if the network state is the second state (light resource occupation), then based on the light congestion network state and the preset mapping relationship between network state and backpressure control strategy, the backpressure control strategy corresponding to the light congestion network state is determined to be the second backpressure control strategy. The data types that need to be controlled in the second backpressure control strategy are the first data type and the second data type. From the data stream sent from the producer to the consumer, the data belonging to the first data type is determined to be the first target data, and the data belonging to the second data type is determined to be the second target data. Based on the first data type and the preset mapping table, the initial control strategy for controlling the first target data is determined to be the first control strategy. Based on the second data type and the preset mapping table, the initial control strategy for controlling the second target data is determined to be the second control strategy.
[0041] Optionally, based on the network status, a corresponding backpressure control strategy is matched. Based on the backpressure control strategy, the data type of the data to be controlled, the target data belonging to the data type among the data sent by the producer to the consumer, and the initial control strategy for controlling the target data are determined. This also includes: If the network state is the third state, then the back pressure control strategy is determined to be the third back pressure control strategy. Based on the third back pressure control strategy, the data types that need to be controlled are determined to be the first data type, the second data type, and the third data type; The data that belongs to the first data type among the data sent by the producer to the consumer is designated as the first target data, the data that belongs to the second data type is designated as the second target data, and the data that belongs to the third data type is designated as the third target data. Based on the first data type and in conjunction with the preset mapping table, the initial control strategy for distributing and controlling the first target data is determined as the first control strategy. Based on the second data type and in conjunction with the preset mapping table, the initial control strategy for distributing and controlling the second target data is determined as the second control strategy. Based on the third data type and in conjunction with the preset mapping table, the initial control strategy for distributing and controlling the third target data is determined as the third control strategy.
[0042] Among them, the third state can refer to the state in which the current network transmission link is in a state of severe congestion, the third back pressure control strategy can refer to the data transmission control strategy when the network state is in the third state, and the third control strategy can refer to the initial control strategy corresponding to the data of the third data type.
[0043] That is, if the network state is in the third state (severe resource overload), then based on the severe congestion network state and the preset mapping relationship between network states and backpressure control strategies, the backpressure control strategy corresponding to the severe congestion network state is determined to be the third backpressure control strategy. The data types that need to be controlled in the third backpressure control strategy are the first data type, the second data type, and the third data type. From the data stream sent from the producer to the consumer, the data belonging to the first data type is determined to be the first target data, the data belonging to the second data type is determined to be the second target data, and the data belonging to the third data type is determined to be the third target data. Based on the first data type and the preset mapping table, the initial control strategy for controlling the first target data is determined to be the first control strategy. Based on the second data type and the preset mapping table, the initial control strategy for controlling the second target data is determined to be the second control strategy. Based on the third data type and the preset mapping table, the initial control strategy for controlling the third target data is determined to be the third control strategy.
[0044] In this embodiment, by determining the data type, target data, and initial control strategy to be controlled based on the back pressure control strategy, differentiated control of different types of data is achieved. This enables different types of data to receive control intensity commensurate with their business value, ensuring that critical data is delivered reliably, secondary critical data is rate-limited as needed, and non-critical data is proactively dropped. This achieves refined control of data, thereby improving the continuity and stability of business between producers and consumers.
[0045] like Figure 4 The diagram shown is a flowchart of a responsive backpressure regulation method provided in Embodiment 4 of the present invention. Step S24 above, which regulates the distribution of target data to consumers according to a target regulation strategy, may include the following steps: S41: If the target control strategy is the first control strategy, then the consumer's data processing status is obtained in real time.
[0046] S42: If the data processing status does not meet the preset processing standard, the first target data is buffered according to the preset buffer until the data processing status meets the preset processing standard, and then the first target data is sent to the consumer.
[0047] In this embodiment, the data processing status can refer to the consumer's current data processing capability and load, such as indicators reflecting the consumer's real-time operating status, such as processing rate, queue backlog, and resource utilization. The preset processing standard can refer to the threshold conditions set in advance to determine whether the consumer's data processing status is within a healthy and acceptable range, such as the lower limit of processing rate and the upper limit of queue backlog. The preset buffer can refer to the storage area set in advance for temporarily storing the first target data.
[0048] Specifically, if the target control strategy is the first control strategy, the consumer's data processing status is acquired in real time. If the data processing status does not meet the preset processing standard, such as when downstream data processing is restricted, the consumer's processing rate is lower than the data arrival rate, or the queue backlog exceeds the upper limit threshold, the first target data is temporarily stored in the preset buffer until the data processing status meets the preset processing standard. If downstream data processing recovers, the consumer's processing rate returns to normal, and the queue backlog falls back to within the safe threshold, the temporarily stored first target data is sent to the consumer.
[0049] Optionally, according to the target control strategy, controlling the process of distributing target data to the consumer further includes: If the target control strategy is the second control strategy, then the second target data will be input into the preset sliding time window; Real-time monitoring of the data volume and reception rate of the second target data within a preset sliding time window; When the amount of data exceeds a preset first threshold and / or the received rate exceeds a preset second threshold, the second target data within a preset sliding time window is sampled to obtain the sampled second target data, and the sampled second target data is sent to the consumer.
[0050] The preset sliding time window can refer to a fixed-length time interval that is pre-set and moves forward dynamically over time.
[0051] That is, if the target control strategy is the second control strategy, then according to the preset sliding time window duration and sliding step size, the real-time second target data stream is continuously covered, and the second target data continuously enters within the preset sliding time window. The data volume and data reception rate of the second target data within the preset sliding time window are monitored in real time. When the data volume within the window exceeds the preset first threshold and / or the data reception rate exceeds the preset second threshold, it is determined to be a traffic overload. The second target data within the preset sliding time window is sampled. The sampling can be to extract the latest one or more pieces of second target data within the current sliding window, discard historical redundant data within the window, and send the sampled second target data to the consumer.
[0052] Optionally, according to the target control strategy, controlling the process of distributing target data to consumers also includes: If the target control strategy is the third control strategy, then obtain the data priority for each third target data; Third-target data with a priority lower than the preset priority is discarded, while third-target data with a priority higher than the preset priority is sent to the consumer.
[0053] Among them, data priority can refer to a pre-set relative level that represents the data in terms of business continuity and importance, used to determine the order of data retention or discarding when resources are limited. Preset priority can refer to a pre-set critical priority threshold used to distinguish between data retention or discarding.
[0054] That is, if the target control strategy is the third control strategy, then the third target data with a data priority lower than the preset priority will be discarded, and the third target data with a data priority higher than the preset priority will be sent to the consumer.
[0055] For example, such as Figure 5 The diagram shown is an architecture diagram of a responsive backpressure control system provided in Embodiment 4 of the present invention.
[0056] The responsive backpressure control system is based on a push-pull combined model to achieve closed-loop negative feedback intelligent adjustment of responsive backpressure. The system includes a fast producer, a slow consumer, and an adaptive flow control system (located on the server). Data sent from the producer to the consumer is regulated by the adaptive flow control system (server) before being sent back to the consumer. Based on this responsive backpressure control system, the overall steps of the responsive backpressure control method can be as follows: The adaptive flow control system monitors the network status in real time when producers send data to consumers. The data modality classifier and parser parse the data type of the sent data. The dynamic strategy adaptive switching engine determines the corresponding back pressure control strategy based on the network status and matches the corresponding initial control strategy for the target data.
[0057] In normal network conditions, only the adaptive buffering strategy (first control strategy) is enabled to perform a circular buffering of the text token (first target data) of the Large Language Model (LLM), which is the core data that cannot be lost, to ensure that strongly consistent data is distributed in an orderly manner. The sliding window sampling strategy (second control strategy) and the intelligent discarding strategy (third control strategy) are put into hibernation, and the full amount is transmitted normally.
[0058] During periods of minor network congestion, the system switches to a collaborative mode of buffering strategy (first control strategy) + sliding window sampling strategy (second control strategy). Core data LLM text tokens (first target data) that cannot be lost are continuously buffered in a circular manner and distributed in an orderly manner after downstream consumers alleviate the congestion. High-frequency fault-tolerant status data (second target data) uses a sliding time window sampling strategy to extract the latest second target data for distribution, reducing the frequency of network transmission. The intelligent discard strategy (third control strategy) is put into hibernation to prioritize the stability of core and high-frequency services.
[0059] During severe congestion, the system switches to a fully collaborative mode of buffering strategy (first control strategy), sliding window sampling strategy (second control strategy), and intelligent discarding strategy (third control strategy). The core data LLM text token (first target data) that cannot be lost is continuously buffered in a circular manner and distributed in an orderly manner after the downstream consumers have relieved the congestion. The high-frequency fault-tolerant status data (second target data) uses the sliding time window sampling strategy to extract the latest second target data for distribution. The non-critical process data (third target data) is processed by the intelligent discarding strategy to actively discard low-priority data and release system resources. All three are executed synchronously to prioritize the availability of core business resources and achieve intelligent traffic shaving.
[0060] The downstream back pressure signal is transmitted back in real time based on the back pressure monitor and feedback loop. When the congestion is relieved and the resource usage drops, the dynamic strategy adaptive switching engine automatically degrades the strategy, sequentially shutting down the discarding and sampling, returning to the buffer mode, and completing the adaptive closed-loop control of the flow.
[0061] In this embodiment, by employing a buffering strategy when the network is smooth, switching to a buffering strategy + sliding window sampling strategy collaborative mode when there is slight congestion, and switching to a buffering strategy + sliding window sampling strategy + intelligent discarding strategy fully collaborative mode when there is severe congestion, the control intensity is adapted to the degree of network congestion, avoiding excessive reliance on a single strategy, thereby improving the stability of business between producers and consumers.
[0062] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0063] like Figure 6 As shown, this is a responsive backpressure regulation device provided in Embodiment 5. The responsive backpressure regulation device is applied to the server side of a responsive backpressure regulation system. The responsive backpressure regulation system also includes producers and consumers. The server side is located in the path where producers send data to consumers. This responsive backpressure regulation device corresponds one-to-one with the responsive backpressure regulation methods in the above embodiments. The responsive backpressure regulation device includes a first monitoring module 61, a query module 62, an evaluation module 63, and a regulation module 64. Detailed descriptions of each functional module are as follows: The first monitoring module 61 is used to monitor the network status when the producer sends data to the consumer in real time, match the corresponding back pressure control strategy according to the network status, and determine the data type of the data to be controlled, the target data of the data type sent by the producer to the consumer, and the initial control strategy for controlling the sending of the target data according to the back pressure control strategy. The data types include a first data type that would affect business continuity if data loss occurred, a second data type that allows for partial data loss without affecting business continuity, and / or a third data type that allows for data loss but only affects the business experience; The query module 62 is used to obtain historical reception information from a preset database according to the data type and the initial control strategy, wherein the historical reception information is information representing the degree of reception of the historical data by the consumer when the historical data of the data type is distributed and controlled according to the initial control strategy; The evaluation module 63 is used to evaluate the degree of reception of the historical data by the consumer based on the historical reception information, and obtain an evaluation result. If the evaluation result meets the preset conditions, the initial control strategy is determined to be the target control strategy. The control module 64 is used to control the process of sending the target data to the consumer according to the target control strategy, and return to the step of real-time monitoring of the network status when the producer sends data to the consumer, until the producer completes the data sending to the consumer.
[0064] Optionally, the first monitoring module 61 mentioned above includes: The first back pressure determination unit is used to determine the back pressure control strategy as the first back pressure control strategy if the network state is the first state. The first type determination unit is used to determine the data type of the data to be distributed for control as the first data type according to the first back pressure control strategy. The first data determination unit is used to identify data belonging to the first data type from the data sent by the producer to the consumer as the first target data. The first strategy determination unit is used to determine, based on the first data type and in conjunction with a preset mapping table, an initial control strategy for distributing and controlling the first target data as a first control strategy, wherein the preset mapping table is used to store the mapping relationship between the data type and the initial control strategy.
[0065] Optionally, the first monitoring module 61 mentioned above further includes: The second back pressure determination unit is used to determine the back pressure control strategy as the second back pressure control strategy if the network state is the second state. The second type determination unit is used to determine, according to the second back pressure control strategy, the data type of the data to be controlled is the first data type and the second data type; The second data determination unit is used to identify data belonging to the first data type from the data sent by the producer to the consumer as first target data, and data belonging to the second data type as second target data. The second strategy determination unit is used to determine, based on the first data type and in conjunction with the preset mapping table, the initial control strategy for distributing and controlling the first target data as the first control strategy, and based on the second data type and in conjunction with the preset mapping table, the initial control strategy for distributing and controlling the second target data as the second control strategy.
[0066] Optionally, the first monitoring module 61 mentioned above further includes: The third back pressure determination unit is used to determine the back pressure control strategy as the third back pressure control strategy if the network state is the third state. The third type determination unit is used to determine, according to the third back pressure control strategy, the data type of the data to be controlled is the first data type, the second data type and the third data type; The third data determination unit is used to identify data belonging to the first data type as first target data, data belonging to the second data type as second target data, and data belonging to the third data type as third target data from the data sent by the producer to the consumer. The third strategy determination unit is used to determine, based on the first data type and in conjunction with the preset mapping table, an initial control strategy for distributing and controlling the first target data as a first control strategy; based on the second data type and in conjunction with the preset mapping table, an initial control strategy for distributing and controlling the second target data as a second control strategy; and based on the third data type and in conjunction with the preset mapping table, an initial control strategy for distributing and controlling the third target data as a third control strategy.
[0067] Optionally, the aforementioned control module 64 includes: The first acquisition unit is used to acquire the consumer's data processing status in real time if the target control strategy is the first control strategy. A buffer unit is used to buffer the first target data according to a preset buffer if the data processing state does not meet the preset processing standard, until the data processing state meets the preset processing standard, and then send the first target data to the consumer.
[0068] Optionally, the aforementioned control module 64 further includes: A window input unit is used to input the second target data into a preset sliding time window if the target control strategy is the second control strategy. The second monitoring unit is used to monitor the amount of data and the receiving rate of the second target data within the preset sliding time window in real time. A window sampling unit is used to sample the second target data within the preset sliding time window when the amount of data exceeds a preset first threshold and / or the received rate exceeds a preset second threshold, to obtain the sampled second target data, and to send the sampled second target data to the consumer.
[0069] Optionally, the aforementioned control module 64 further includes: The second acquisition unit is used to acquire the data priority of each third target data if the target control strategy is the third control strategy. The discarding unit is used to discard third target data whose data priority is lower than the preset priority, and to send third target data whose data priority is higher than the preset priority to the consumer.
[0070] Specific limitations regarding the responsive backpressure regulation device can be found in the limitations of the intelligent question-answering method described above, and will not be repeated here. Each module in the aforementioned responsive backpressure regulation device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independently of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the operations corresponding to each module.
[0071] Embodiment 5 of the present invention provides a computer device, which may be a server, and its internal structure diagram may be as follows: Figure 7 As shown, the computer device includes a processor, memory, network interface, and database connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and database. The internal memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage media. The database stores network status and backpressure control strategies when producers distribute data to consumers. The network interface communicates with external terminals via a network connection. When the computer program is executed by the processor, it implements a responsive backpressure control method.
[0072] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the responsive backpressure regulation method described in the above embodiments, for example... Figure 2 As shown in S21-S24, or Figures 3 to 5As shown, to avoid repetition, it will not be described again here. Alternatively, when the processor executes a computer program, it implements the functions of each module / unit in this embodiment of the data management device, for example, Figure 6 The functions of the first monitoring module 61, query module 62, evaluation module 63, and control module 64 shown are not described again here to avoid repetition.
[0073] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When executed by a processor, the computer program implements the responsive backpressure regulation method described in the above embodiment, for example... Figure 2 As shown in S21-S24, or Figures 3 to 5 As shown, to avoid repetition, it will not be described again here. Alternatively, when the processor executes a computer program, it implements the functions of each module / unit in this embodiment of the data management device, for example, Figure 6 The functions of the first monitoring module 61, query module 62, evaluation module 63, and control module 64 shown are not described again here to avoid repetition.
[0074] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0075] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is used as an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0076] If any software tools or components not belonging to this company appear in the embodiments of this invention, they are merely illustrative examples and do not represent actual use. All user personal information involved in the embodiments of this invention is authorized (with knowledge and consent) by the relevant parties or fully authorized by all parties, and the executing entity may obtain it through various legal and compliant means. The collection, storage, use, processing, transmission, provision, and disclosure of the information, data, and signals involved all comply with the relevant laws and regulations of the relevant countries and regions, and do not violate public order and good morals.
[0077] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included within the protection scope of the present invention.
Claims
1. A responsive back pressure regulation method, characterized in that, The responsive backpressure control method is applied to the server side of a responsive backpressure control system. The responsive backpressure control system also includes producers and consumers. The server side is located between the producer and the consumer in the data transmission path, and includes: The network status is monitored in real time when the producer sends data to the consumer. Based on the network status, a corresponding back pressure control strategy is matched. Based on the back pressure control strategy, the data type of the data to be controlled, the target data of the data type sent by the producer to the consumer, and the initial control strategy for controlling the sending of the target data are determined. The data types include a first data type that would affect business continuity if data loss occurred, a second data type that allows for partial data loss without affecting business continuity, and / or a third data type that allows for data loss but only affects the business experience; Based on the data type and the initial control strategy, historical reception information is obtained from a preset database, wherein the historical reception information is information representing the degree of reception of the historical data by the consumer when the historical data of the data type is distributed and controlled according to the initial control strategy. Based on the historical reception information, the degree to which the consumer receives the historical data is evaluated to obtain an evaluation result. If the evaluation result meets the preset conditions, the initial control strategy is determined to be the target control strategy. According to the target control strategy, the process of sending the target data to the consumer is controlled, and the process returns to the step of real-time monitoring of the network status when the producer sends data to the consumer, until the producer completes sending data to the consumer.
2. The responsive back pressure regulation method as described in claim 1, characterized in that, The step of matching a corresponding backpressure control strategy based on the network state, and determining the data type of the data requiring control based on the backpressure control strategy, the target data belonging to the data type in the data sent by the producer to the consumer, and the initial control strategy for controlling the target data, includes: If the network state is the first state, then the back pressure control strategy is determined to be the first back pressure control strategy. Based on the first back pressure control strategy, the data type of the data that needs to be controlled is determined to be the first data type; The data belonging to the first data type among the data sent by the producer to the consumer is designated as the first target data. Based on the first data type and in conjunction with a preset mapping table, an initial control strategy for distributing and controlling the first target data is determined as the first control strategy. The preset mapping table is used to store the mapping relationship between the data type and the initial control strategy.
3. The responsive back pressure regulation method as described in claim 1, characterized in that, The step of matching a corresponding backpressure control strategy based on the network state, and determining the data type of the data to be controlled, the target data belonging to the data type in the data sent by the producer to the consumer, and the initial control strategy for controlling the target data, based on the backpressure control strategy, further includes: If the network state is the second state, then the back pressure control strategy is determined to be the second back pressure control strategy; According to the second back pressure control strategy, the data types of the data that need to be controlled are determined to be the first data type and the second data type; The data belonging to the first data type among the data sent by the producer to the consumer is designated as the first target data, and the data belonging to the second data type is designated as the second target data. Based on the first data type and the preset mapping table, the initial control strategy for distributing and controlling the first target data is determined as the first control strategy. Based on the second data type and the preset mapping table, the initial control strategy for distributing and controlling the second target data is determined as the second control strategy.
4. The responsive back pressure regulation method as described in claim 1, characterized in that, The step of matching a corresponding backpressure control strategy based on the network state, and determining the data type of the data to be controlled, the target data belonging to the data type in the data sent by the producer to the consumer, and the initial control strategy for controlling the target data, based on the backpressure control strategy, further includes: If the network state is the third state, then the back pressure control strategy is determined to be the third back pressure control strategy. According to the third back pressure control strategy, the data types of the data that need to be controlled are determined to be the first data type, the second data type, and the third data type; The data belonging to the first data type in the data sent by the producer to the consumer is designated as the first target data, the data belonging to the second data type is designated as the second target data, and the data belonging to the third data type is designated as the third target data. Based on the first data type and the preset mapping table, the initial control strategy for distributing and controlling the first target data is determined as the first control strategy. Based on the second data type and the preset mapping table, the initial control strategy for distributing and controlling the second target data is determined as the second control strategy. Based on the third data type and the preset mapping table, the initial control strategy for distributing and controlling the third target data is determined as the third control strategy.
5. The responsive back pressure regulation method according to any one of claims 2 to 4, characterized in that, The step of regulating the process of sending the target data to the consumer according to the target regulation strategy includes: If the target control strategy is the first control strategy, then the data processing status of the consumer is acquired in real time; If the data processing status does not meet the preset processing standard, the first target data is buffered according to the preset buffer until the data processing status meets the preset processing standard, and then the first target data is sent to the consumer.
6. The responsive back pressure regulation method according to any one of claims 3 to 4, characterized in that, The step of regulating the process of sending the target data to the consumer according to the target regulation strategy further includes: If the target control strategy is the second control strategy, then the second target data is input into the preset sliding time window; Real-time monitoring of the data volume and receiving rate of the second target data within the preset sliding time window; When the amount of data exceeds a preset first threshold and / or the received rate exceeds a preset second threshold, the second target data within the preset sliding time window is sampled to obtain the sampled second target data, and the sampled second target data is sent to the consumer.
7. The responsive back pressure regulation method as described in claim 4, characterized in that, The step of regulating the process of sending the target data to the consumer according to the target regulation strategy further includes: If the target control strategy is the third control strategy, then obtain the data priority of each third target data; Third target data with a priority lower than the preset priority is discarded, and third target data with a priority higher than the preset priority is sent to the consumer.
8. A responsive back pressure regulating device, characterized in that, The responsive backpressure control device is applied to the server side of the responsive backpressure control system, which also includes producers and consumers. The server side is located between the producer and the consumer in the data transmission path, and includes: The first monitoring module is used to monitor the network status in real time when the producer sends data to the consumer, match the corresponding back pressure control strategy according to the network status, and determine the data type of the data to be controlled, the target data of the data type sent by the producer to the consumer, and the initial control strategy for controlling the sending of the target data according to the back pressure control strategy. The data types include a first data type that would affect business continuity if data loss occurred, a second data type that allows for partial data loss without affecting business continuity, and / or a third data type that allows for data loss but only affects the business experience; The query module is used to retrieve historical reception information from a preset database based on the data type and the initial control strategy. The historical reception information is information that characterizes the degree of reception of the historical data by the consumer when the historical data of the data type is distributed and controlled according to the initial control strategy. An evaluation module is used to evaluate the degree of reception of the historical data by the consumer based on the historical reception information, and obtain an evaluation result. If the evaluation result meets a preset condition, the initial control strategy is determined to be the target control strategy. The control module is used to control the process of sending the target data to the consumer according to the target control strategy, and return to the step of real-time monitoring of the network status when the producer sends data to the consumer, until the producer completes the data sending to the consumer.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the responsive back pressure regulation method as described in any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the responsive back pressure regulation method as described in any one of claims 1 to 7.