CN114816778A - Time delay control method, system and related equipment - Google Patents

Time delay control method, system and related equipment Download PDF

Info

Publication number
CN114816778A
CN114816778A CN202110080836.7A CN202110080836A CN114816778A CN 114816778 A CN114816778 A CN 114816778A CN 202110080836 A CN202110080836 A CN 202110080836A CN 114816778 A CN114816778 A CN 114816778A
Authority
CN
China
Prior art keywords
message
time
file group
generation time
message generation
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110080836.7A
Other languages
Chinese (zh)
Inventor
王日新
杨文杰
舒茂松
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN202110080836.7A priority Critical patent/CN114816778A/en
Publication of CN114816778A publication Critical patent/CN114816778A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/16Handling requests for interconnection or transfer for access to memory bus
    • G06F13/1668Details of memory controller
    • G06F13/1684Details of memory controller using multiple buses
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/544Buffers; Shared memory; Pipes

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application provides a time delay control method, a time delay control system and related equipment. Wherein, the method comprises the following steps: a time delay control system receives a message sent by a producer, determines the time period to which the message generating time belongs according to the generating time of the message, thereby determining a writable file group and writing the message into the file group; obtaining a fluctuation index according to the message generation time, the message arrival time and the identifier of the message source, wherein the fluctuation index is used for describing the time delay fluctuation amplitude of the message source; and updating the state of the file group according to the fluctuation index, and outputting the file group in a consumable state to a consumer. The method can avoid the process of caching the message in the processing process of the consumer, reduce the occupancy rate of the memory and the CPU computing resource and improve the response speed at the same time.

Description

Time delay control method, system and related equipment
Technical Field
The present application relates to the field of message bus technologies, and in particular, to a method, a system, and a related device for controlling a time delay.
Background
With the commercial popularization of the fourth-generation and fifth-generation communication technologies, the network throughput rate is continuously increased, the network structure complexity is remarkably improved, the data volume is exponentially improved, communication operators have more and more applications on large-scale network planning optimization data analysis, and the network planning optimization faces a great challenge. For example, in a Non-dependent Networking (NSA) scenario of 5G, network optimization planning often requires that messages from different sources generated at the same time are put together for processing and analysis.
In order to meet the service scenario, a message system with high throughput and high reliability is needed. An existing message system Apache Kafka is a high-throughput distributed publish-subscribe message system, a producer provides messages to Kafka in sequence, a consumer takes out the messages in sequence and distributes the messages to corresponding task threads, and the messages in the task threads are processed at the same time, so that the task threads always need to cache a part of messages with low time delay and wait for the messages with high time delay, and therefore a large amount of Random Access Memory (RAM) resources (namely, a large amount of Memory resources) and Central Processing Unit (CPU) resources are continuously occupied, complexity of Processing logic is greatly improved, and message Processing efficiency is reduced.
Therefore, how to perform delay control in a message bus system is a problem to be solved urgently at present.
Disclosure of Invention
The application provides a time delay control method, a time delay control system and related equipment, which can enable consumers to directly obtain messages generated at the same time, avoid long-time waiting, greatly save RAM (random access memory) resources and CPU (central processing unit) computing resources and improve response speed.
In a first aspect, the present application provides a method for controlling a delay, where the method may include: receiving a message sent by a producer, wherein the producer is used for collecting data generated by a message source, and the message carries message generation time and an identifier of the message source; determining a time period to which the message generation time belongs according to the message generation time, wherein the time period and a file group have a one-to-one correspondence relationship, and the file group is used for storing messages generated in the time period; writing the message into a file group corresponding to a time period to which the message generation time belongs, and obtaining a fluctuation index according to the message generation time, the message arrival time and the identifier of the message source, wherein the message arrival time is the time for the producer to acquire the message, the fluctuation index is used for describing the fluctuation amplitude of the time delay of the message source, and the time delay comprises the difference value between the message arrival time and the message generation time; and updating the state of the file group according to the fluctuation index, and outputting the file group in a consumable state to a consumer.
According to the scheme provided by the application, the message is written into the corresponding file group for persistent storage, the state of the file group is updated according to the determined fluctuation index, the file group in the consumable state is transmitted to the consumer, in the process, messages from different message sources generated at the same time can be written into the same file group, and when the message is completely collected (the file group is determined to be in the consumable state), the file group is output to the consumer, so that the consumer is free from waiting for message caching, the occupancy rates of RAM resources and CPU computing resources are reduced, and the response speed is improved.
With reference to the first aspect, in a possible implementation manner of the first aspect, the obtaining a fluctuation index according to the message generation time, the message arrival time, and the identifier of the message source specifically includes: determining a fluctuation index observation value according to the message generation time and the message arrival time; the fluctuation index observation value is the original time delay fluctuation amplitude of the message source; determining a filter gain coefficient based on the fluctuation index observation; the filter gain factor is used to correct the ripple indicator observation; determining the fluctuation indicator based on the filter gain coefficient.
In the scheme provided by the application, determining the fluctuation index requires determining a fluctuation index observation value first, where the fluctuation index observation value can describe the time delay fluctuation range of the message source, but the time delay fluctuation range described by the fluctuation index observation value is the original time delay fluctuation range with low precision, so that the fluctuation index observation value needs to be corrected to obtain the fluctuation index which can describe the time delay fluctuation range of the message source more accurately, thereby improving the accuracy of subsequently updating the file group state, i.e. more accurately judging whether the file group is in a consumable state.
With reference to the first aspect, in a possible implementation manner of the first aspect, the updating the state of the file group according to the fluctuation indicator specifically includes: determining a global consumable timestamp according to a difference between the latest message generation time of the message source and the fluctuation index; when the end time of the time period to which the message generation time belongs is not greater than the global consumable timestamp, updating the state of the file group to a consumable state.
In the scheme provided by the application, the global consumable timestamp is determined according to the fluctuation index, so that the state of the file group is updated, and when the file group is in the consumable state, the file group can be output to a consumer, thereby avoiding the time for waiting for message caching, and saving memory resources and CPU computing resources.
With reference to the first aspect, in a possible implementation manner of the first aspect, the determining, according to the message generation time, a time period to which the message generation time belongs specifically includes: and if the time period of the message generation time does not exist, newly building a file group.
In the scheme provided by the application, if the message generation time does not belong to any current existing time period, a file group is newly created, and the time period corresponding to the newly created file group comprises the message generation time, so that the message can be ensured to be written into the unique file group corresponding to the message, and the subsequent corresponding processing on the file group is ensured.
In a second aspect, a latency control apparatus is provided, which may include: the system comprises a receiving unit, a sending unit and a receiving unit, wherein the receiving unit is used for receiving a message sent by a producer, the producer is used for collecting data generated by a message source, and the message carries message generation time and an identifier of the message source; the processing unit is used for determining a time period to which the message generation time belongs according to the message generation time, and the time period and a file group have a one-to-one correspondence relationship, wherein the file group is used for storing messages generated in the time period; writing the message into a file group corresponding to a time period to which the message generation time belongs, and obtaining a fluctuation index according to the message generation time, the message arrival time and the identifier of the message source, wherein the message arrival time is the time for the producer to acquire the message, the fluctuation index is used for describing the fluctuation amplitude of the time delay of the message source, and the time delay comprises the difference value between the message arrival time and the message generation time; updating the state of the file group according to the fluctuation index; and the sending unit is used for outputting the file group in the consumable state to the consumer.
With reference to the second aspect, in a possible implementation manner of the second aspect, when the processing unit is configured to obtain the fluctuation index according to the message generation time, the message arrival time, and the identifier of the message source, the processing unit is specifically configured to: determining a fluctuation index observation value according to the message generation time and the message arrival time; the fluctuation index observation value is the original time delay fluctuation amplitude of the message source; determining a filter gain coefficient based on the fluctuation index observation; the filter gain factor is used to correct the ripple indicator observation; determining the fluctuation indicator based on the filter gain coefficient.
With reference to the second aspect, in a possible implementation manner of the second aspect, the processing unit, when configured to update the state of the file group according to the fluctuation indicator, is specifically configured to: determining a global consumable timestamp according to a difference between the latest message generation time of the message source and the fluctuation index; when the end time of the time period to which the message generation time belongs is not greater than the global consumable timestamp, updating the state of the file group to a consumable state.
With reference to the second aspect, in a possible implementation manner of the second aspect, when the processing unit is configured to determine, according to the message generation time, a time period to which the message generation time belongs, specifically, the processing unit includes: and if the time period of the message generation time does not exist, newly building a file group.
A third aspect provides a computing device comprising a processor and a memory, the memory being configured to store program code, and the processor being configured to execute the program code in the memory according to the first aspect and the latency control method provided in connection with any one of the implementations of the first aspect.
In a fourth aspect, a computer-readable storage medium is provided, which stores a computer program, and when the computer program is executed by a processor, the processor executes the first aspect and the latency control method provided in connection with any one implementation manner of the first aspect.
In a fifth aspect, a computer program product is provided, which includes instructions that, when executed by a computer, enable the computer to execute the first aspect and the flow of the latency control method provided in connection with any one implementation manner of the first aspect.
In a sixth aspect, the present application provides a chip system, which includes a processor, configured to support a latency control apparatus to implement the functions recited in the first aspect. In one possible design, the system-on-chip further includes a memory for storing program instructions and data necessary for the data transmission device. The chip system may be constituted by a chip, or may include a chip and other discrete devices.
It is to be understood that the latency control apparatus provided by the second aspect, the computing apparatus provided by the third aspect, the computer-readable storage medium provided by the fourth aspect, the computer program product provided by the fifth aspect, and the system-on-chip provided by the sixth aspect are all configured to execute the latency control method provided by the first aspect. Therefore, the beneficial effects that can be achieved by the method can refer to the beneficial effects in the delay control method provided in the first aspect, and are not described herein again.
Drawings
Fig. 1 is a schematic message transmission diagram of a base layer network element device according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of a data processing center according to an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of a data processing center including Kafka according to an embodiment of the present application;
fig. 4 is a schematic diagram illustrating delay in consumption according to an embodiment of the present disclosure;
fig. 5 is a schematic diagram of a delay control system architecture according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a delay control system according to an embodiment of the present application;
fig. 7 is a schematic flowchart of a delay control method according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of a message according to an embodiment of the present application;
fig. 9 is a schematic flowchart of a message storage according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of a file group provided in an embodiment of the present application;
FIG. 11 is a schematic diagram of a process for determining a fluctuation indicator according to an embodiment of the present application;
FIG. 12 is a diagram illustrating a method for determining a consumption status of a file group according to an embodiment of the present application;
FIG. 13 is a flowchart illustrating a process of outputting a set of consumable documents according to an embodiment of the present application;
fig. 14 is a schematic diagram of a latency control apparatus according to an embodiment of the present application;
fig. 15 is a schematic structural diagram of a computing device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application are described below clearly and completely with reference to the accompanying drawings, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
First, a part of words and related technologies referred to in the present application are explained to facilitate understanding by those skilled in the art.
Non-independent Networking (NSA) refers to the deployment of 5G networks using existing 4G infrastructure. The 5G carrier based on the NSA architecture carries only user data, and its control signaling is still transmitted through the 4G network.
A message is a unit of data that is transferred between two computers. The message may be very simple, e.g. containing only text strings; or may be more complex, possibly containing embedded objects.
A Message Queue (MQ) is a container for storing messages during transmission of the messages, and is also called a Message system, and plays a role of relay during transmission of the messages. The main purpose of the message queue is to provide routing and to ensure delivery of the message, and when a message is sent, if the recipient shows that the message is unusable, the message queue will hold the message until it can be successfully delivered.
The messaging system may be comprised of one or more servers. A messaging system is responsible for passing data from one application to another, and an application needs to be concerned only with the data, not with how the data is passed between two or more applications. When messages are delivered asynchronously between a client application and a messaging system, there are two main modes of messaging: point-to-point delivery mode, publish-subscribe mode. Most messaging systems use a publish-subscribe model.
Apache Flink and Apache Storm are two distributed real-time computing frameworks that are currently in widespread use in the industry. The Apache Storm (hereinafter referred to as "Storm") is used in the mei-gang criticizing real-time computing service (the reliability guarantee test of Storm can be referred to), and the Apache Storm has a management platform, a common API and corresponding documents, and a large amount of real-time operation is constructed based on the Storm. Apache Flink (hereinafter referred to as "Flink") attracts attention recently, has the characteristics of high throughput, low delay, high reliability, accurate calculation and the like, has good support for an event window, and has certain application in the American group comment real-time calculation service at present.
Kafka is a distributed, partitioned, multi-copy, multi-subscriber message system, and can also be used as a distributed log system, and can be used for web/nginx logs, access logs, message services, and the like, and as can be understood, the main application scenarios are as follows: a log collection system and a messaging system. The main design goals of Kafka are: the message persistence capability is provided in a mode that the time complexity is O (1), and the access performance of constant time can be guaranteed even for data above TB level; the throughput rate is high, and the single machine can support the transmission of 100K messages per second even on a very cheap commercial machine; supporting message partitioning and distributed consumption among Kafka servers, and simultaneously ensuring the message sequence transmission in each partition; simultaneously, offline data processing and real-time data processing are supported; online horizontal extension is supported.
A cluster is a group of mutually independent computers interconnected by a high-speed network, which form a group and are managed in a single system mode. A client interacts with a cluster, which appears as a stand-alone server. Clustering is configured to improve availability and scalability.
The Data Gateway (DGW) is used to connect different communication systems to achieve Data intercommunication, so that different systems are physically connected, software connection is performed by using interfaces allowed by a protocol according to communication protocols of different systems on the basis of physical connection, and Data forwarding is achieved through the processes of Data receiving, extracting and sending.
The Transmission Control Protocol (TCP) is a connection-oriented, reliable, byte stream-based transport layer communication Protocol TCP that is intended to adapt to layered Protocol hierarchies that support multi-network applications. Reliable communication services are provided by means of TCP between pairs of processes in host computers connected to different but interconnected computer communication networks. TCP assumes that it can obtain simple, possibly unreliable, datagram service from lower level protocols. In principle, TCP should be able to operate over a variety of communication systems connected from hard wire to packet switched or circuit switched networks.
A Unified Service Node (USN) is a processing module in a core network, and can be applied to various scenarios such as mobility management and user management.
At present, when network planning optimization is performed, messages generated by different message sources need to be associated to perform unified processing sometimes, and it is understood that the messages may be different types of data. For example, when analyzing network quality in an NSA scenario, it is necessary to perform correlation processing on messages generated by different message sources, where the different message sources include but are not limited to a base layer network element device, that is, in the NSA scenario, it is necessary to perform correlation processing on messages from a 4G network element device, a 5G network element device, and a core network device, as shown in fig. 1, fig. 1 is a schematic diagram of message transmission of a base layer network element device provided in an embodiment of the present application, a message generated by a 4G network element device reaches a data processing center after passing through a file relay device, a three-party vendor server, and a DGW, a message generated by a 5G network element device reaches the data processing center through the file relay device, a message generated by the core network device passes through a TCP stream in the whole course and reaches the data processing center after passing through a USN stream access device, and it is understood that all messages generated by the 4G network element device, the 5G network element device, and the core network device at the same time reach the data processing center before performing analysis processing on the messages generated by the 4G network element device .
However, because the time difference between the arrival of the messages from different message sources at the same time is large, that is, the transmission delay difference between the messages from different message sources at the same time is large, the data processing center needs to wait for a long time to perform the analysis processing, and this process occupies a large amount of memory and CPU resources. It can be understood that the transmission delay is a difference between a message arrival time and a message generation time, where the message arrival time is a time when the message arrives at the data processing center, and the message generation time is a time when the network element device generates the message.
As shown in fig. 1, in an NSA scenario, no matter whether various network element devices report messages actively or collect messages passively, the time delay is unstable, a transmission delay of less than 5 minutes may occur in a message reported to a file transfer device by a 4G network element device, if the device is provided by a third party manufacturer, the third party manufacturer may collect a message in the file transfer device every 5 minutes, and together with its own data processing flow, a time delay of less than 15 minutes may be caused, and a DGW may collect a message at a frequency of once every 5 minutes and report the message to a data processing center. The message transmission of the whole 4G network element device may exceed half an hour from the global perspective, i.e. the transmission delay of the message generated by the 4G network element device may exceed half an hour. The 5G network element equipment reports the generated message to the file transfer equipment, the file transfer equipment generates a cache file at the frequency of once every 5 minutes, and the data processing center collects the message from the file transfer equipment at a similar frequency. Since there are few transit devices, from the global perspective, the message transmission of the whole 5G network element device may be controlled within 15 minutes, that is, the transmission delay of the message generated by the 5G network element device may be controlled within 15 minutes. The information generated by the core network equipment carrying the sensitive data can reach the data processing center only through the USN flow access equipment, and the data is received and transmitted through the TCP real-time flow in the whole process, so that the transmission delay of the information generated by the core network equipment is basically controlled within 5 minutes. In summary, in the NSA scenario, the transmission delays of messages generated by different message sources at the same time point are different greatly, and the data processing center needs to wait for data with high delay, which occupies a large amount of memory and CPU resources.
The service scenario provides a high requirement for the data processing center, and in order to meet the service scenario, a data processing center with characteristics of high throughput and high reliability is required, as shown in fig. 2, fig. 2 is a schematic structural diagram of the data processing center provided in the embodiment of the present application, the data processing center includes one or more producers, one or more consumers, and a message system, the message system can receive messages sent by multiple producers, and then provide the messages to a specified multiple consumers, and the consumers can process the messages after receiving the messages, and it is understood that other devices may further process the messages. As can be seen from the above, the performance of the messaging system is critical to the performance of the data processing center.
It will be appreciated that the producer will receive data from the source of the message, which in the embodiment of the application is a different representation of the same thing as the message.
The existing messaging system does not solve the problem of the transmission delay well, as shown in fig. 3, fig. 3 is a schematic diagram of a data processing center including Kafka according to an embodiment of the present application, where a Kafka cluster includes one or more servers (brokers), each message issued to the Kafka cluster has a category (topic), messages of different topics may be stored separately and stored on one or more brokers, in fig. 3, messages of topic1 are stored on brokers 1 and 2, multiple messages (msg1-msg100 …) are stored in a broker1, multiple messages (msg1-msg100 …) are also stored in a broker2, one or more producers may issue messages to the brokers, and a specified consumer or consumers may read messages to the brokers. The messages are collected by a producer and are issued to message systems such as Kafka according to a time sequence, a consumer can read the messages according to the sequence of entering the message systems and then analyze and process the messages, specifically, the consumer can distribute the messages of different message sources to different task threads according to timestamps, and process the messages after waiting for all the messages in the task threads to be cached, so that the fact that the messages in the same task thread are the messages generated by different message sources at the same time point can be understood, the transmission time delay difference of the messages generated by different message sources at the same time point is large, the task threads always need to cache a part of the messages with low transmission time delay, meanwhile, the messages with high transmission time delay are required to be cached, and the process can continuously occupy a large amount of memory and CPU computing resources, so that high storage and computing cost is caused.
It can be understood that the delay in transmission of messages generated at the same time point from different message sources is greatly different, which results in the delay in consumption of the messages, i.e. the difference between the time when the message is read by the consumer and the time when the message is generated, being greatly different, and thus a large amount of memory and CPU computing resources are continuously occupied.
Based on the above, the present application provides a delay control method, system and related device, which can store messages from different message sources at the same message generation time in advance, and after the messages from different message sources at the same message generation time are stored, transmit them to a specified consumer together, and delay consumption of messages from different message sources at the same message generation time, as shown in fig. 4, fig. 4 is a schematic diagram of delay consumption provided by an embodiment of the present application, the messages in fig. 4 are from a 4G message source, a 5G message source and a core network message source respectively, and the generation times of the messages are the same, but the transmission delay of the message from the 4G message source is 30 minutes, the transmission delay of the message from the 5G message source is 15 minutes, and the transmission delay of the message from the core network message source is 5 minutes, the transmission delays of the messages are different but they are consumed at the same time, so the consumption delays of the messages can be leveled. It can be understood that the consumption time of the message is delayed and aligned, so that the consumer can avoid waiting for the message cache with high transmission time delay, a large amount of memory and CPU resources are saved, and the data processing efficiency is improved.
For better understanding of the embodiments of the present application, a description will be first given of a delay control system architecture on which the embodiments of the present application are based. Referring to fig. 5, fig. 5 is a schematic diagram of a latency control system architecture according to an embodiment of the present application, and as shown in fig. 5, after a message source generates a message, a producer collects the message, and then the producer transmits the collected message from different message sources to the latency control system, and the message is stored by the latency control system, and then a designated consumer reads the message from the latency control system and performs subsequent processing.
It is noted that the producer includes, but is not limited to, a data acquisition layer, the consumer includes, but is not limited to, a stream processing module, in particular, the producer includes, but is not limited to, a data acquisition component and a three-party vendor component, and the consumer includes, but is not limited to, Apache Flink and Apache Storm.
It is understood that the delay control system may be deployed in the message system shown in fig. 2, or may be directly used as a message system with a delay control effect, which is not limited in this application.
Further, as shown in fig. 6, fig. 6 is a schematic structural diagram of a latency control system according to an embodiment of the present application, where the latency control system 600 includes a message input module 610, a persistent storage management module 620, a fluctuation index correction module 630, a correction information storage module 640, a file group consumption control module 650, and a message output module 660. It can be understood that the delay control system 600 can be applied to the delay control system architecture shown in fig. 5, the message input module 610 receives and analyzes the message sent by the producer, obtains the message generation time, the message source ID, and other information, and sends these information to the persistent storage management module 620 and the fluctuation index correction module 630, the persistent storage management module 620, after receiving the information, determines whether the message can be written into the file group for persistent storage, and the fluctuation index correction module 630, after receiving the information, groups the messages according to the message source ID, i.e. separates the messages from different message sources, and divides the messages from the same message source into one group, respectively calculates the fluctuation index value of each message source, then corrects the fluctuation observation value by the filtering technique to obtain the fluctuation index, and sends the message source ID and its corresponding fluctuation index to the correction information storage module 640, the file group consumption control module 650 calculates a global consumable time stamp according to the information stored in the correction information storage module 640, determines whether the file group can be consumed using the global consumable time stamp, and updates the state of the file group, and the message output module 660 scans the file group in the persistent storage management module 620, and transmits the file group in a consumable state to the consumer.
It is understood that the message source ID is an identification of a message source, and is used to distinguish different message sources. In addition, the units in the delay control system may have multiple dividing manners, and fig. 6 provides only one exemplary dividing manner for the embodiment of the present application, which is not limited in this application.
In order to align the consumption time delays of messages from different message sources generated at the same time point, save memory and CPU (central processing unit) computing resources and improve the data processing efficiency, the application provides a time delay control method. Referring to fig. 7, fig. 7 is a flowchart illustrating a delay control method according to an embodiment of the present application, where the method may be used in the delay control system architecture shown in fig. 5 or executed by the delay control system shown in fig. 6, and the method includes, but is not limited to, the following steps:
s710: and receiving the message sent by the producer.
Specifically, the message input module 610 receives and parses the message sent by the producer, obtains information such as message generation time and identifier of the message source, and sends the information to the persistent storage management module 620 and the fluctuation index correction module 630. It is understood that the producer is used to collect data generated by the message source, and in the embodiment of the present application, the data and the message are different expressions of the same thing; the message generation time is the time when the message source generates the message. Illustratively, the identification of the message source includes, but is not limited to, a message source ID.
First, a structure of a message is briefly introduced, fig. 8 is a schematic structural diagram of the message provided in the embodiment of the present application, and as shown in fig. 8, the message includes three fields, one field is a message source ID for representing a source of the message, it is understandable that, if the message is classified according to the source of the message, the message source ID may also represent a message type, and different message types correspond to a specific message source ID, for example, when the message source ID is 1, the message is from a 4G network element device; when the ID of the message source is 2, the message comes from 5G network element equipment; and when the message source ID is 3, the message comes from the core network equipment. The other two fields of the message respectively represent the message generation time and the message content, the message generation time is the time when the network element equipment generates the message, and the message content is the specific content of the message and can be different types of data.
It should be noted that after the message input module 610 receives the message sent by the producer, it needs to determine whether the message is valid. As shown in fig. 9Fig. 9 is a schematic flow chart of message storage according to an embodiment of the present application, where a persistent storage management module 620 receives a message sent by a message input module 610, and first determines whether the message is valid: if the message generation time (T) occur ) Greater than the current system time (T) now ) With a time threshold (T) future_limit ) Sum, i.e. T occur >T now +T future_limit If not, the message is valid data, and the next processing is carried out.
It can be understood that the time threshold (T) future_limit ) The value is a preconfigured empirical value, which can be set according to experimental data and actual requirements, and the application is not limited to this. In addition, according to the above content, the message generation time is the time when the network element device generates the message.
S720: and determining the time period to which the message generation time belongs according to the message generation time.
Specifically, the persistent storage management module 620 determines, according to the message generation time of the message, a time period to which the message generation time belongs, that is, determines a message generation time period, and if there is no message generation time period to which the message generation time belongs, creates a new file group, where the message generation time period corresponding to the new file group is the time period to which the message belongs.
It can be understood that there is a one-to-one correspondence relationship between the message generation time period and the file group for storing the messages generated within the message generation time period. As shown in fig. 10, fig. 10 is a schematic structural diagram of a file group provided in this embodiment of the present application, where each file group corresponds to a message generation time period, and a file group includes one or more files, and messages are stored in the files, where the messages stored in the files may come from different message sources, but the message generation times of all the messages stored in the file group are within the message generation time period corresponding to the file group.
As shown in fig. 9, in one embodiment of the present application, the message generation time period is determined by looking at a file group state table in the persistent storage management module 620 to determine whether there is a writable file group (a file group in which the message can be stored). Illustratively, the file group state table is shown in table 1:
TABLE 1
File group ID Message generation time period [ T ] start ,T end ) Current state
1 [2020/11/17 9:49,2020/11/17 9:50) 1
2 [2020/11/17 9:50,2020/11/17 9:51) 1
3 [2020/11/17 9:51,2020/11/17 9:52) 0
The file group status table contains information of each file group stored in the delay control system 600, and the number (file group ID), message generation time period, and the like of each file group can be acquired from the file group status table,Current state and other information, and the file group ID is used for distinguishing different file groups; the message generation period is used to indicate a period in which a generation time of a message stored in a file group is present, and illustratively, the message generation period includes a start time (T) start ) But not end time (T) end ) (ii) a The current state is used for indicating whether the file group can be consumed currently, and if the current state of the file group is 1, the file group is in a consumable state; and if the current state of the file group is 0, the file group is in a non-consumable state.
It can be understood that the start time (T) of the message generation period start ) And an end time (T) end ) The setting may be performed according to actual needs, which is not limited in this application, and in addition, the content shown in table 1 is only one case provided in the embodiment of the application, and there are other cases, which are not described herein again.
In particular, when the message of the message is generated at a time (T) occur ) And if the message is in the message generation time period of one file group, the writable file group exists, namely the file group corresponding to the message generation time period is the writable file group of the message, otherwise, the writable file group does not exist. In addition, if the time period to which the message generation time belongs does not exist, a file group is newly created, and the newly created file group is a file group in which the message can be written.
In one embodiment of the present application, the length of each message generation period may be set to T, i.e., T ═ T end -T start When there is no T of the message occur When the message generation time period belongs to, a new file group is created, and the message generation time period corresponding to the new file group is [ T ] start1 +T*N,T end1 + T N), where N is an integer, T start1 And T end1 Starting time and ending time of message generation time period corresponding to a certain file group respectively, namely T ═ T end1 -T start1 It is understood that T of the message occur Fall in [ T ] start1 +T*N,T end1 + T × N) interval.
Exemplary ofIf T of a message occur 2020/11/179: 49, viewing the file group status table (e.g., Table 1) can determine the message generation time period [ 2020/11/179: 49, 2020/11/179: 50 ] for this message T occur The time period to which the message belongs can be determined, and as shown in table 1, the file group ID corresponding to the message generation time period [ 2020/11/179: 49, 2020/11/179: 50) is 1, and therefore, the file group to which the message can be written is file group 1; if T of a message occur 2020/11/179: 51, viewing the file group status table (e.g., Table 1) can determine the message generation time period [ 2020/11/179: 51, 2020/11/179: 52) for this message T occur The time period to which the message belongs can be determined, and as shown in table 1, the file group ID corresponding to the message generation time period [ 2020/11/179: 51, 2020/11/179: 52) is 3, and therefore, the file group to which the message can be written is file group 3; if T of a message occur 2020/11/176: 30, and if the message generation time period of the message does not exist after checking the file group status table (see table 1), then a new file group is created, and the message generation time period of the new file group can be set to [ 2020/11/176: 30, 2020/11/176:31 ], and the message can be written into the new file group.
S730: and writing the message into a file group corresponding to the time period to which the message generation time belongs.
Specifically, after determining a time period (message generation time period) to which the message belongs, the message is written into a file group corresponding to the message generation time period.
As shown in fig. 9, after determining the time period (message generation time period) to which the message belongs, that is, there is a file group to which the message can be written, it is necessary to determine whether the message can be finally written into the file group. Specifically, the current state of the file group is checked, if the current state is 0, it indicates that the file group is in an unconsumed state, at this time, the message may be written into the file group, that is, the message may be stored in the file group, and a file group state table is updated; if the current state is 1, the file group is in a readable state, and at the moment, the messageCan not be stored in the file group, and the process is ended. When a file group corresponding to the message (having a mapping relation) does not exist, establishing a new file group, and storing the message into the newly-established file group, wherein the message generation time period of the newly-established file group comprises the T of the message occur
S740: and obtaining the fluctuation index according to the message generation time, the message arrival time and the identifier of the message source.
Specifically, the fluctuation index correction module 630 determines a fluctuation index observation value according to the message generation time and the message arrival time; the fluctuation index observation value is the original time delay fluctuation amplitude of the message source, and the original time delay fluctuation amplitude is not high in precision, so that correction is needed; determining a filter gain coefficient based on the fluctuation index observation; the filter gain factor is used to correct the ripple indicator observation; determining the fluctuation indicator based on the filter gain coefficient. It can be understood that the message arrival time is the time when the producer collects the message, the fluctuation index is used for describing the fluctuation amplitude of the time delay of the message source, and the time delay comprises the difference value between the message arrival time and the message generation time, that is, the time delay comprises the transmission time delay.
In an embodiment of the present application, as shown in fig. 11, fig. 11 is a schematic flowchart of a process for determining a fluctuation index according to an embodiment of the present application, where the fluctuation index correction module 630 obtains message generation times (T) corresponding to L messages from the message input module 610 occur ) And message arrival time (T) arrive ) Sampling the L messages, acquiring M (M is less than or equal to L) messages, and determining the transmission time delay of the M messages, namely { delay ≦ L } i },i∈[0,M-1]。
According to the above, the message arrival time is the time when the message arrives at the data processing center, and in one embodiment of the present application, the message arrival time is the time when the message is collected by the producer. In addition, the transmission delay is a message arrival time (T) arrive ) And message generation time (T) occur ) A difference of (i.e. delay ═T arrive -T occur
As shown in fig. 11, after the sampling by the fluctuation index correction module 630 is completed, it is necessary to determine whether there is a fluctuation index already stored, and determine a fluctuation index observation value. Specifically, when there is no saved fluctuation index in the fluctuation index correction module 630, { delay is determined i },i∈[0,M-1]Average of this set of data, and calculate { delay } i },i∈[0,M-1]Obtaining the difference value between the group of data and the average value to obtain the absolute value of the difference value, sorting the absolute value of the difference value from large to small, filtering the transmission time delay corresponding to the first 5% of the absolute value, namely removing the transmission time delay corresponding to the maximum 5% of the absolute value to obtain M 'transmission time delays, wherein the M' transmission time delays are the residual 95% of the transmission time delays after filtering, namely { delay i },i∈[0,M’-1](ii) a When there is a fluctuation index already saved in the fluctuation index correction module 630, { delay is determined i },i∈[0,M-1]Average of this set of data, and calculate { delay } i },i∈[0,M-1]The difference between the group of data and the average value is obtained to obtain the absolute value of the difference, and the value is not greater than
Figure BDA0002909077190000101
The absolute value of the delay time of the transmission,
Figure BDA0002909077190000102
filtering all satisfiabilities for said saved volatility indicator
Figure BDA0002909077190000111
Delay of i Thereby obtaining M 'transmission time delays, wherein the M' transmission time delays are reserved and not more than
Figure BDA0002909077190000112
The absolute value of (c) corresponds to the transmission delay, i.e. { delay i },i∈[0,M′-1]。
From the above, M' propagation delays are first obtained before determining the ripple indicator observation x. Can be transmitted according to the MObtaining a fluctuation index observed value x through time delay, specifically, determining the difference value of the maximum value and the minimum value in the M' transmission time delays, namely determining { delay i },i∈[0,M’-1]The difference between the maximum value and the minimum value in the group of data is a fluctuation index observed value, that is, the fluctuation index observed value x is the difference between the maximum value and the minimum value in the M' transmission delays, that is, x is max i∈[0,M′-1] delay i -min i∈[0,M′-1] delay i . After determining the fluctuation index observation x, will
It is updated to the fluctuation index correction module 630 and the correction information storage module 640 and the flow continues.
As shown in FIG. 11, after determining and storing the fluctuation index observation x, it is necessary to determine whether N fluctuation index observations exist in the fluctuation index correction module 630, i.e., { x } i },i∈[0,N-1]And if so, continuing the flow, otherwise, continuing to collect the fluctuation index observed value.
Further, as shown in fig. 11, if there are N fluctuation index observations in the fluctuation index correction module 630, it is necessary to determine the disturbance noise variance R and the filter gain coefficient. It is understood that the filter gain coefficients comprise kalman filter gain coefficients.
Specifically, the average of the latest N fluctuation index observations is determined
Figure BDA00029090771900001115
I.e., determine { x i },i∈[0,N-1]The average value of (a) is as follows:
Figure BDA0002909077190000113
and according to
Figure BDA0002909077190000114
Calculating the variance of disturbance noise:
Figure BDA0002909077190000115
determining a Kalman filter gain coefficient K:
Figure BDA0002909077190000116
p represents the variance of the fluctuation index, and if there is P in the fluctuation index correction block 630, the latest P is used; if there is no P in the fluctuation index calibration module 630, P in the above equation uses an initial value of 1.
Further, as shown in fig. 11, the fluctuation index is determined:
Figure BDA0002909077190000117
Figure BDA0002909077190000118
if the stored fluctuation index does not exist in the fluctuation index calibration module 630
Figure BDA0002909077190000119
Then use the fluctuation index observed value x as
Figure BDA00029090771900001110
Namely, it is
Figure BDA00029090771900001111
Will fluctuate index
Figure BDA00029090771900001112
Updating to the fluctuation index correction module 630 and the correction information storage module 640, and continuing the process. Understandably, the fluctuation index
Figure BDA00029090771900001113
Or it may be updated in the fluctuation index correction module 630, and then the correction information storage module 640 obtains the fluctuation index from the fluctuation index correction module 630
Figure BDA00029090771900001114
As shown in fig. 11, it is also necessary to determine the fluctuation index determined in the previous step
Figure BDA0002909077190000121
Variance of (a):
P=(I-K)P
the fluctuation index obtained by the calculation is used
Figure BDA0002909077190000122
The variance P of (a) is updated to the fluctuation index correction block 630 and the correction information storage block 640. It is understood that the variance is used to represent an uncertainty in a correction to the fluctuation index observation from which the fluctuation index is derived.
It should be noted that, the above-mentioned acquisition of the fluctuation index
Figure BDA0002909077190000123
The process of (1) separately processing the messages of each message source, namely firstly grouping the messages according to the ID of the message source and then determining the fluctuation index of each message source.
S750: and updating the state of the file group according to the fluctuation index.
Specifically, the file group consumption control module 650 calculates a global consumable time stamp from the information stored in the correction information storage module 640, determines whether the file group can be consumed using the global consumable time stamp, and updates the state of the file group.
In one embodiment of the present application, the correction information storage module 640 obtains the message source ID and the latest message generation time T of each message source from the fluctuation index correction module 630 new The stored results are updated, and are illustratively shown in table 2 below:
TABLE 2
Figure BDA0002909077190000124
It can be seen that the fluctuation index corresponding to the 4G network element device is 20 minutes, the fluctuation index corresponding to the 5G network element device is 15 minutes, and the fluctuation index corresponding to the core network device is 10 minutes, and it can be understood that the content shown in table 2 is only one case provided in the embodiment of the present application, and there are other cases, which are not described herein again.
Further, the file group consumption control module 650 determines a global consumable timestamp T according to the obtained fluctuation index and the latest message generation time c And updates the consumable file group information to the correction information storage module 640.
Specifically, the file group consumption control module 650 obtains the latest message generation time and fluctuation index from different message sources from the correction information storage module 640, calculates the difference value thereof, and obtains a difference value set, where the smallest difference value in the difference value set is the global consumable timestamp T c
Illustratively, in one embodiment of the present application, the message source includes a 4G network element device, a 5G network element device and a core network device, and the latest event generation time (T) is calculated new,4G ,T new,5G ,T new,CN ) And the fluctuation index
Figure BDA0002909077190000125
To obtain a difference set
Figure BDA0002909077190000126
The smallest difference in this set of differences is the global consumable timestamp T c I.e. by
Figure BDA0002909077190000127
In one embodiment of the present application, the message generation time period [ T ] for a file group may be derived from a file group status table (e.g., Table 1) start ,T end ) If the end point (end time) T of the message generation period end Not greater than a global consumable timestamp T c (T end ≤T c ) Then the message generation time period corresponds toThe file group can be consumed, i.e. all times contained in the message generation period of the file group are less than T c And when the file group is consumed, marking the file group, and updating the current state of the file group in the file group state table to be 1 to show that the file group is in a consumable state.
Illustratively, the global consumable timestamp T may be derived from Table 2 c 2020/11/179: 50, end point T of the message generation period for group 1 in Table 1 end Equal to global consumable timestamp T c So that the file group 1 satisfies T end ≤T c The current state of file group 1 is updated to a consumable state.
It is understood that the above-mentioned marking may be a way of attaching a label to the file group to indicate that the file group is consumable, and of course, other forms are possible, which is not limited in this application.
In another embodiment of the present application, whether one or more file groups are consumable or not may be determined by a global consumable timestamp, as shown in fig. 12, fig. 12 is a schematic diagram of determining the consumable condition of a file group provided in this embodiment of the present application, because the end point (end time) T of all message generation periods end Not greater than a global consumable timestamp T c The file groups of (9:03) are all consumable, the global consumable time stamp in fig. 12 is 9:03, and file group 1, file group 2, and file group 3 satisfy the above-described conditions, so these three file groups are consumable file groups, and file group 4 does not satisfy the above-described conditions, so file group 4 is a non-consumable file group.
S760: outputting the set of files in a consumable state to the consumer.
Specifically, as shown in fig. 13, fig. 13 is a schematic flowchart of a process for outputting a consumable file group according to an embodiment of the present application, where first, the message output module 660 scans a file group in the persistent storage management module 620, then determines whether the file group is consumable, and sends the file group in a consumable state to a consumer, that is, sends a file group in a current state of 1 in the file group state table to the consumer.
It is to be understood that the scanning may be set to be periodic scanning, or may be directly triggered to scan when needed, and at this time, the scanning may be performed without waiting for a preset scanning time, and of course, other scanning manners may also be available, which is not limited in this application.
The method of the embodiments of the present application is described above in detail, and in order to better implement the above-mentioned aspects of the embodiments of the present application, the following also provides related apparatuses for implementing the above-mentioned aspects.
As shown in fig. 14, fig. 14 is a schematic diagram of a latency control device provided in the present application, where the latency control device is configured to execute the latency control method described in fig. 7. The functional units of the delay control device are not limited by the present application, and each unit in the delay control device can be increased, decreased or combined as required. In addition, the operations and/or functions of the units in the delay control device are respectively for implementing the corresponding flows of the method described in fig. 7, and are not described herein again for brevity. FIG. 14 illustratively provides a division of functional units:
the latency control apparatus 1400 includes a receiving unit 1410, a processing unit 1420, and a transmitting unit 1430.
A receiving unit 1410, configured to receive a message sent by a producer, where the producer is configured to collect data generated by a message source, and the message carries a message generation time and an identifier of the message source.
A processing unit 1420, configured to determine, according to the message generation time, a time period to which the message generation time belongs, where the time period and a file group have a one-to-one correspondence relationship, where the file group is used to store messages generated in the time period; writing the message into a file group corresponding to a time period to which the message generation time belongs, and obtaining a fluctuation index according to the message generation time, the message arrival time and the identifier of the message source, wherein the message arrival time is the time for a producer to acquire the message, the fluctuation index is used for describing the fluctuation amplitude of the time delay of the message source, and the time delay comprises the difference value between the message arrival time and the message generation time; and updating the state of the file group according to the fluctuation index.
A transmitting unit 1430 for outputting the set of files in a consumable state to the consumer.
The two units may perform data transmission through a communication path, and it should be understood that each unit included in the delay control device 1400 may be a software unit, a hardware unit, or a part of the software unit and a part of the hardware unit.
It is to be understood that the network device shown in fig. 14 is only an exemplary implementation manner in the embodiment of the present application, and the latency control device applicable to the latency control method in the embodiment of the present application includes, but is not limited to, the above structure.
Referring to fig. 15, fig. 15 is a schematic structural diagram of a computing device according to an embodiment of the present application. As shown in fig. 15, the computing device 1500 includes: a processor 1510, a communication interface 1520, and a memory 1530, the processor 1510, the communication interface 1520, and the memory 1530 being interconnected via an internal bus 1540.
The computing device 1500 may be the latency control device 1400 of fig. 14, and the functions performed by the latency control device 1400 of fig. 14 are actually performed by the processor 1510 of the latency control device 1400.
The processor 1510 may be formed by one or more general processors, such as a Central Processing Unit (CPU), or a combination of a CPU and a hardware chip. The hardware chip may be an Application-Specific Integrated Circuit (ASIC), a Programmable Logic Device (PLD), or a combination thereof. The PLD may be a Complex Programmable Logic Device (CPLD), a Field-Programmable Gate Array (FPGA), General Array Logic (GAL), or any combination thereof.
Communication interface 1520 is used to communicate with other devices or communication Networks, such as Ethernet, Radio Access Network (RAN), core network, Wireless Local Area Networks (WLAN), etc.
Bus 1540 can be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The bus 1540 may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown in FIG. 15, but not only one bus or type of bus.
The Memory 1530 may include a Volatile Memory (Volatile Memory), such as a Random Access Memory (RAM); the Memory 1530 may also include a Non-Volatile Memory (Non-Volatile Memory), such as a Read-Only Memory (ROM), a Flash Memory (Flash Memory), a Hard Disk (Hard Disk Drive, HDD), or a Solid-State Drive (SSD); the memory 1530 may also include combinations of the above. The memory 1530 is configured to store program codes for executing the above-mentioned service-oriented interface resource checking method embodiment, in an implementation, the memory 1530 may further buffer other data and be controlled by the processor 1510 to execute the data, so as to implement the functional unit shown in the latency control apparatus 1400, or to implement the method steps in the method embodiment shown in fig. 7, in which the latency control apparatus 1400 is an execution subject. The method comprises the following specific steps:
processor 1510 controls communication interface 1520 to receive a message sent by a producer, wherein the producer is configured to collect data generated by a message source, and wherein the message carries a message generation time and an identifier of the message source;
the processor 1510 determines a time period to which the message generation time belongs according to the message generation time, where the time period and a file group have a one-to-one correspondence relationship, and the file group is used to store messages generated in the time period;
the processor 1510 writes the message into a file group corresponding to a time period to which the message generation time belongs, and obtains a fluctuation index according to the message generation time, the message arrival time, and an identifier of the message source, where the message arrival time is a time when the producer acquires the message, the fluctuation index is used to describe a fluctuation amplitude of a delay of the message source, and the delay includes a difference between the message arrival time and the message generation time;
the processor 1510 updates the state of the file group according to the fluctuation index and controls the communication interface 1520 to output the file group in a consumable state to the consumer.
In one implementation, the obtaining, by the processor 1510, a fluctuation indicator according to the message generation time, the message arrival time, and the identifier of the message source specifically includes: processor 1510 determines a fluctuation index observation based on the message generation time and the message arrival time; the fluctuation index observation value is the original time delay fluctuation amplitude of the message source; based on the fluctuation index observations, processor 1510 determines filter gain coefficients; the filter gain coefficient is used for correcting the fluctuation index observed value; based on the filter gain coefficients, the processor 1510 determines the fluctuation indicator.
In one implementation, the updating, by the processor 1510, the state of the file group according to the fluctuation indicator specifically includes: processor 1510 determines a global consumable timestamp based on a difference between the latest message generation time of the message source and the fluctuation indicator; when the end time of the period to which the message generation time belongs is not greater than the global consumable timestamp, the processor 1510 updates the state of the file group to a consumable state.
In one implementation, the determining, by the processor 1510 according to the message generation time, a time period to which the message generation time belongs specifically includes: if the time period of the message generation time does not exist, the processor 1510 creates a new file group.
Embodiments of the present application also provide a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, may implement part or all of the steps of any one of the method embodiments described above, and implement the functions of any one of the functional units described in fig. 14 above.
Embodiments of the present application also provide a computer program product, which when run on a computer or a processor, causes the computer or the processor to perform one or more steps of any of the methods described above. The respective constituent modules of the above-mentioned apparatuses may be stored in the computer-readable storage medium if they are implemented in the form of software functional units and sold or used as independent products.
The embodiment of the present application further provides a chip system, where the chip system includes a processor, and is configured to support the latency control device 1400 to implement one or more steps of the method steps that take the latency control device 1400 as an execution main body in any one of the above methods. In one possible design, the system-on-chip further includes a memory for storing program instructions and data necessary for the data transmission device. The chip system may be constituted by a chip, or may include a chip and other discrete devices.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to related descriptions of other embodiments.
It should be understood that the reference herein to first, second, third, fourth, and various numerical designations is merely a convenient division to describe and is not intended to limit the scope of the present application.
It should be understood that the term "and/or" herein is merely one type of association relationship that describes an associated object, meaning that three relationships may exist, e.g., a and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
It should also be understood that, in the various embodiments of the present application, the sequence numbers of the above-mentioned processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The steps in the method of the embodiment of the application can be sequentially adjusted, combined and deleted according to actual needs.
The modules in the device can be merged, divided and deleted according to actual needs.
The above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present application.

Claims (10)

1. A method for delay control, the method comprising:
receiving a message sent by a producer, wherein the producer is used for collecting data generated by a message source, and the message carries message generation time and an identifier of the message source;
determining a time period to which the message generation time belongs according to the message generation time, wherein the time period and a file group have a one-to-one correspondence relationship, and the file group is used for storing messages generated in the time period;
writing the message into a file group corresponding to a time period to which the message generation time belongs, and obtaining a fluctuation index according to the message generation time, the message arrival time and the identifier of the message source, wherein the message arrival time is the time for the producer to acquire the message, the fluctuation index is used for describing the fluctuation amplitude of the time delay of the message source, and the time delay comprises the difference between the message arrival time and the message generation time;
and updating the state of the file group according to the fluctuation index, and outputting the file group in a consumable state to a consumer.
2. The method of claim 1, wherein obtaining a fluctuation indicator according to the message generation time, the message arrival time, and the identifier of the message source comprises:
determining a fluctuation index observation value according to the message generation time and the message arrival time; the fluctuation index observation value is the original time delay fluctuation amplitude of the message source;
determining a filter gain coefficient based on the fluctuation index observation; the filter gain factor is used to correct the ripple indicator observation;
determining the fluctuation indicator based on the filter gain coefficient.
3. The method according to claim 1, wherein the updating the state of the file group according to the fluctuation index specifically comprises:
determining a global consumable timestamp according to a difference between the latest message generation time of the message source and the fluctuation index;
when the end time of the time period to which the message generation time belongs is not greater than the global consumable timestamp, updating the state of the file group to a consumable state.
4. The method according to claim 1, wherein the determining a time period to which the message generation time belongs according to the message generation time specifically comprises:
and if the time period of the message generation time does not exist, newly building a file group.
5. A delay control apparatus, characterized in that the apparatus comprises:
the system comprises a receiving unit, a sending unit and a receiving unit, wherein the receiving unit is used for receiving a message sent by a producer, the producer is used for collecting data generated by a message source, and the message carries message generation time and an identifier of the message source;
the processing unit is used for determining a time period to which the message generation time belongs according to the message generation time, and the time period and a file group have a one-to-one correspondence relationship, wherein the file group is used for storing messages generated in the time period; writing the message into a file group corresponding to a time period to which the message generation time belongs, and obtaining a fluctuation index according to the message generation time, the message arrival time and the identifier of the message source, wherein the message arrival time is the time for the producer to acquire the message, the fluctuation index is used for describing the fluctuation amplitude of the time delay of the message source, and the time delay comprises the difference value between the message arrival time and the message generation time; updating the state of the file group according to the fluctuation index;
and the sending unit is used for outputting the file group in the consumable state to the consumer.
6. The device according to claim 5, wherein the processing unit, when being configured to obtain the fluctuation indicator according to the message generation time, the message arrival time, and the identifier of the message source, is specifically configured to:
determining a fluctuation index observation value according to the message generation time and the message arrival time; the fluctuation index observation value is the original time delay fluctuation amplitude of the message source;
determining a filter gain coefficient based on the fluctuation index observation; the filter gain factor is used to correct the ripple indicator observation;
determining the fluctuation indicator based on the filter gain coefficient.
7. The device according to claim 5, wherein the processing unit, when being configured to update the state of the file group according to the fluctuation indicator, is specifically configured to:
determining a global consumable timestamp according to a difference between the latest message generation time of the message source and the fluctuation index;
when the end time of the time period to which the message generation time belongs is not greater than the global consumable timestamp, updating the state of the file group to a consumable state.
8. The apparatus according to claim 5, wherein the processing unit, when configured to determine the time period to which the message generation time belongs according to the message generation time, specifically includes:
and if the time period of the message generation time does not exist, newly building a file group.
9. A computing device, comprising a memory and a processor, wherein execution of computer instructions stored by the memory causes the computing device to perform the method of any of claims 1-4.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which, when executed by a processor, implements the method of any of the preceding claims 1-4.
CN202110080836.7A 2021-01-21 2021-01-21 Time delay control method, system and related equipment Pending CN114816778A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110080836.7A CN114816778A (en) 2021-01-21 2021-01-21 Time delay control method, system and related equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110080836.7A CN114816778A (en) 2021-01-21 2021-01-21 Time delay control method, system and related equipment

Publications (1)

Publication Number Publication Date
CN114816778A true CN114816778A (en) 2022-07-29

Family

ID=82524752

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110080836.7A Pending CN114816778A (en) 2021-01-21 2021-01-21 Time delay control method, system and related equipment

Country Status (1)

Country Link
CN (1) CN114816778A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115168080A (en) * 2022-09-08 2022-10-11 深圳华锐分布式技术股份有限公司 Distributed system time delay measurement method, device, equipment and medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115168080A (en) * 2022-09-08 2022-10-11 深圳华锐分布式技术股份有限公司 Distributed system time delay measurement method, device, equipment and medium

Similar Documents

Publication Publication Date Title
CN108776934B (en) Distributed data calculation method and device, computer equipment and readable storage medium
CN110321387B (en) Data synchronization method, equipment and terminal equipment
US10135711B2 (en) Technologies for sideband performance tracing of network traffic
CN111966289B (en) Partition optimization method and system based on Kafka cluster
AU2014201784B2 (en) Server system for providing current data and past data to clients
CN109379305B (en) Data issuing method, device, server and storage medium
US11080115B2 (en) Sampling management of application programming interface (API) requests
WO2021244473A1 (en) Frequency control method and apparatus
US11570078B2 (en) Collecting route-based traffic metrics in a service-oriented system
CN116661705B (en) Data management method, system, electronic equipment and storage medium based on kafka
CN112527530B (en) Message processing method, device, apparatus, storage medium and computer program product
CN113391973A (en) Internet of things cloud container log collection method and device
CN112328688A (en) Data storage method and device, computer equipment and storage medium
CN113590437B (en) Alarm information processing method, device, equipment and medium
CN114816778A (en) Time delay control method, system and related equipment
CN112838980B (en) Message processing method, system, device, electronic equipment and storage medium
KR101663412B1 (en) Method for Defining Quality of Things based on DDS in Internet of Things
CN113590017A (en) Method, electronic device and computer program product for processing data
EP4280561A1 (en) Information flow identification method, network chip, and network device
US20160077945A1 (en) Storage system statistical data storage and analysis
US11489904B2 (en) Poor-QoE assessment method and related device
CN114428711A (en) Data detection method, device, equipment and storage medium
CN111294231B (en) Resource management method and system
CN113542406A (en) Asynchronous processing system of intersystem messages
CN110119364B (en) Method and system for input/output batch submission

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination