WO2017181808A1 - Network element data playback method and apparatus - Google Patents

Network element data playback method and apparatus Download PDF

Info

Publication number
WO2017181808A1
WO2017181808A1 PCT/CN2017/077838 CN2017077838W WO2017181808A1 WO 2017181808 A1 WO2017181808 A1 WO 2017181808A1 CN 2017077838 W CN2017077838 W CN 2017077838W WO 2017181808 A1 WO2017181808 A1 WO 2017181808A1
Authority
WO
WIPO (PCT)
Prior art keywords
message
cdr
network element
timestamp
messages
Prior art date
Application number
PCT/CN2017/077838
Other languages
French (fr)
Chinese (zh)
Inventor
熊广
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2017181808A1 publication Critical patent/WO2017181808A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/10Active monitoring, e.g. heartbeat, ping or trace-route
    • H04L43/106Active monitoring, e.g. heartbeat, ping or trace-route using time related information in packets, e.g. by adding timestamps
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0806Configuration setting for initial configuration or provisioning, e.g. plug-and-play
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/08Configuration management of networks or network elements
    • H04L41/0803Configuration setting
    • H04L41/0823Configuration setting characterised by the purposes of a change of settings, e.g. optimising configuration for enhancing reliability
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0876Network utilisation, e.g. volume of load or congestion level
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/08Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
    • H04L43/0876Network utilisation, e.g. volume of load or congestion level
    • H04L43/0894Packet rate

Definitions

  • the present disclosure relates to the field of communication technologies, for example, to a method and apparatus for network element data playback.
  • the playback of network element data plays an important role.
  • the data playback of the communication network element may be that the collected network element data is not modified to be sent to the designated server at a fixed rate to implement playback of the network element data.
  • This will result in unrealistic data after playback, which imposes great limitations on flexibility, cannot guarantee the true sequence and delay of signaling, and cannot reflect the real business processes and usage habits of users within a certain period of time.
  • the present disclosure provides a method and apparatus for playing back network data, which can implement accurate playback of network element data.
  • the embodiment provides a method for playing back network data.
  • the method may include: acquiring network element data to be played back, where the network element data may include multiple message messages. Decoding the network element data, and obtaining a historical timestamp and a network element number of each CDR message. Pre-processing each of the CDR messages, the pre-processing may include replacing a historical timestamp of each CDR message with a current timestamp, and replacing the network element number of each CDR message The target network element number. Each pre-processed message is encoded. Determining an actual rate of the network element data according to the historical timestamp or the current timestamp of each of the CDR messages. The encoded plurality of CDR messages are sent according to the determined actual rate.
  • the embodiment further provides an apparatus for playing back network data
  • the apparatus may include: acquiring a module a block, configured to acquire network element data to be played back, the network element data includes a plurality of CDR messages, and a codec module configured to decode the network element data, obtain a historical timestamp and a network element of each CDR message a pre-processing module, configured to pre-process each of the CDR messages, the pre-processing may include replacing a historical timestamp of each of the CDR messages with a current timestamp, and The network element number of the CDR message is replaced with the target network element number; the codec module may be further configured to encode the pre-processed CDR message; and the rate control module is set to be based on the historical time of each CDR message.
  • the stamp or the current timestamp determines an actual rate of the network element data; and the sending module is configured to send the encoded bill message according to the determined actual rate.
  • the embodiment further provides a computer readable storage medium storing computer executable instructions for performing the above method for playing back network data.
  • the embodiment also provides a server including one or more processors, a memory, and one or more programs, the one or more programs being stored in the memory, when executed by one or more processors, The method for performing the above-mentioned network element data playback.
  • the embodiment further provides a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions, when the program instructions are executed by a computer a method of causing the computer to perform the above-described network element data playback.
  • the method and the device for playing back the network element data can solve the problem that the authenticity of the playback network element data is not high by replacing the historical time stamp of each CDR message in the decoded network element data with the current time stamp.
  • By replacing the network element number of each CDR message with the target network element number you can configure a suitable NE number for each CDR message according to different test environments.
  • the actual rate of the network element data is determined according to the historical timestamp or the current timestamp of each CDR message, and the encoded CDR message is sent according to the determined actual rate, thereby realizing the real-time real-time message throughput in the live network environment.
  • the process of playing back the network element data may not be restricted by the complex network element hardware and software equipment, so that the problem that the playback data is not authentic and does not match the real data characteristics of the existing network can be solved.
  • FIG. 1 is a flow chart of a method for playing back network data in an embodiment.
  • FIG. 2 is a flow chart of a method for pre-processing each CDR message in one embodiment.
  • FIG. 3 is a flow chart of a method for decoding network element data in an embodiment.
  • FIG. 4 is a structural block diagram of an apparatus for playing back network data in an embodiment.
  • Figure 5 is a block diagram showing the structure of a preprocessing module in one embodiment.
  • FIG. 6 is a structural block diagram of an apparatus for playing back network data in another embodiment.
  • FIG. 7 is a schematic diagram of a general hardware structure of a server according to an embodiment.
  • a method for playing back network data is proposed, and the method may include the following steps.
  • step 102 the network element data to be played back is obtained, and the network element data may include multiple CDR messages.
  • the network element data refers to data transmitted between network elements, and may include control plane data (signaling data), and may also include media plane user data.
  • Network element data is often massive, and the storage form is a text file.
  • the network element data can be saved in the form of a single bill, so the obtained network element data can include multiple bill messages.
  • the content of the network element data may be hexadecimal.
  • receiving the request for playing back the network element data searching the path parameter corresponding to the network element data in the configuration file, and acquiring the network element data to be played back according to the path parameter.
  • the network element data can be pre-stored in the database.
  • step 104 the network element data is decoded, and the historical timestamp and the network element number of each CDR message are obtained.
  • the network element data may be saved in the form of a single CDR, and decoding the obtained network element data is to decode each CDR message, and parse out the service time of each CDR message.
  • Information such as the historical timestamp, NE type, and NE number of the service.
  • the network element number may be an identity (ID) of the network element.
  • the decoding rule follows the 3rd Generation Partnership Project (3GPP) standard protocol
  • the decoded object may be each CDR message, and each CDR message may be composed of two parts: a message header and a message body.
  • the decoded content corresponds to two blocks: decoding of the message header and decoding of the message body.
  • the network element number and the network element type can be decoded from the message header, and all the information is decoded from the message body.
  • a field related to the time when the service occurs, the time field may include: a report time field, a start time field, and an end time field.
  • a time field can be arbitrarily selected as the above historical time stamp.
  • the historical timestamp of the CDR message may be a reporting time field.
  • step 106 the pre-processing of each CDR message is performed.
  • the pre-processing may include replacing the historical timestamp of each CDR message with the current timestamp, and replacing the network element number of each CDR message with the target network element. number.
  • the historical timestamp of each CDR message is replaced with the current timestamp, and the network of each CDR message is used in order to adapt the network element number in the test environment. Replace the element number with the target NE number in the test environment.
  • replacing the historical timestamp of each CDR message with the current timestamp may include: determining a time interval between a historical timestamp of the first CDR message and a current time, and adding a historical timestamp of each CDR message. This time interval is made such that the historical timestamp becomes the current timestamp.
  • replacing the network element number of each CDR message with the target network element number in the test environment may include: finding a location of the network element number in the CDR message, and then according to the network element type of each CDR message The network element number is uniquely matched to the target network element number in the test environment, and the network element number is replaced by the target network element number.
  • step 108 the pre-processed CDR message is encoded.
  • the processed CDR information needs to be re-encoded, and the coding rule can follow the 3GPP standard protocol, and adopts a common Type-Length-Value (TLV)
  • TLV Type-Length-Value
  • the encoding format is encoded.
  • the length of the encoded data is variable, and the data length and value can be determined by type.
  • the coding adopts the original coding mode of the CDR message, that is, the coding mode before decoding.
  • the encoding may include a message header encoding the CDR message, a message body, and a packet of the message header and the message body.
  • the decoded message is loaded into the sending queue for subsequent transmission.
  • step 110 the actual rate of the network element data is determined according to the historical timestamp or current timestamp of each CDR message.
  • each CDR message can have two timestamps: a historical timestamp and a current timestamp.
  • Count The actual time rate can be selected as the historical timestamp or the current timestamp. It should be noted that the timestamps must be consistent, that is, all the CDR messages are selected with historical timestamps, or all CDR messages are selected with the current timestamp.
  • determining the actual rate of the network element data may include: retrieving the preset time based on the historical timestamp or the current timestamp of the first bill message, and then calculating the number of the bill message in the preset time, The calculated CDR message value is used as the actual rate in the preset time.
  • the timer is started, and the preset time is set to 1 second.
  • the CDR message in the sending queue is scanned every second, and the historical timestamp or the current timestamp of the first CDR message in the sending queue is used as a reference, and the recursion is 1 second.
  • the number of the CDRs in the sending queue is determined within one second, and the number of CDR messages per second is obtained in real time, and the actual rate of the network data is obtained as the number of CDRs per second.
  • the network element data includes multiple CDR messages.
  • the multiple CDR messages in the sending queue are divided into multiple intervals according to a preset time, and each interval may include different numbers.
  • the actual rate of the corresponding network element data of each interval is successively recursively calculated. For example, in the first interval, calculating the number of the CDR message in the preset time, and determining that the actual rate of sending the network element data in the first interval is equal to the number of CDR messages divided by the preset time; similarly, determining the second interval
  • the actual rate of sending network element data in all intervals is calculated by recursing in turn.
  • step 112 the encoded plurality of CDR messages are transmitted according to the determined actual rate.
  • the encoded multiple CDR messages are sent to the designated server in an original manner according to the actual rate calculated in real time.
  • the original mode here may refer to the original transmission protocol of the network element data, that is, the transmission protocol of the network element data in the current network, such as the Transmission Control Protocol (TCP) and the User Datagram Protocol (UDP).
  • TCP Transmission Control Protocol
  • UDP User Datagram Protocol
  • the encoded multiple CDR messages are loaded into the sending queue, and then multiple CDR messages in the sending queue are sent according to the actual rate determined in real time, and the sent CDR message is moved out of the sending queue.
  • it is detected in real time whether the sending queue is empty. When it is detected that the sending queue is not empty, then Continue to send until all the CDR messages have been sent. When it is detected that the sending queue is empty, it indicates that all the CDR messages in the sending queue have been sent, and then the sending is stopped.
  • the problem that the playback network element data is not authentic is solved by replacing the historical timestamp of each CDR message in the decoded network element data with the current timestamp.
  • the actual rate of the network element data is determined according to the historical timestamp or the current timestamp of each CDR message, and the encoded CDR message is sent according to the determined actual rate, thereby realizing the real-time real-time message throughput in the live network environment.
  • the process of playing back the network element data may be free from the limitation of the hardware and software devices of the complex network element, and may solve the problem that the playback data is not authentic and does not match the real data characteristics of the existing network.
  • the pre-processing of each CDR message is performed by replacing the historical timestamp of each CDR message with the current timestamp, and replacing the network element number of each CDR message with the target network element.
  • the steps of the number may include steps 106a-106b.
  • step 106a the time interval between the historical timestamp of the first bill message and the current time is calculated, and the historical time stamp of each bill message plus the time interval is converted into the current time stamp.
  • each CDR message may have a historical timestamp
  • the historical timestamp may refer to the original time when the CDR message service occurs.
  • the original historical time is required.
  • Replace the stamp with the current timestamp may include: finding a historical timestamp of the first CDR message, calculating a historical timestamp of the first CDR message and a current time interval, and adding a historical timestamp of all the CDR messages.
  • the time interval that is, the original historical time stamp can be converted to the current time stamp.
  • step 106b the network element type of each CDR message is obtained, and the network element number of each CDR message is replaced with the target network element number according to the network element type.
  • each CDR message is decoded, and the network element type of the CDR message is parsed from the header portion of each CDR message, and each message is obtained according to the obtained network element type and the network element number.
  • the network element type of the CDR message is parsed from the header portion of each CDR message, and each message is obtained according to the obtained network element type and the network element number.
  • the step of calculating the actual rate of the network element data according to the historical timestamp or the current timestamp of each CDR may include: recursing the preset based on the historical timestamp or the current timestamp of the first CDR message. Time, calculate the number of CDR messages in the preset time, so that the actual rate of the network element data is equal to the number of CDR messages divided by the preset time.
  • the CDR message needs to be sent to the target server according to the actual rate of the network element data.
  • the actual rate is calculated by recursing the preset time (for example, 1 second) based on the historical timestamp or the current timestamp of the first CDR, provided that the delay and order of the existing CDR messages are consistent. Then, the number of the CDRs in the preset time is calculated, and the actual rate of the network data in the preset time is calculated to be equal to the number of CDRs divided by the preset time.
  • the number of CDR messages in the preset time may be sent to the corresponding target server in batches (one time).
  • the step of decoding the network element data and obtaining the historical timestamp and the network element number of each CDR message may include: decoding each obtained CDR message, where the CDR message may include a message header and a message body. .
  • the network element number of the CDR message can be parsed from the message header; the historical timestamp of the CDR message can be parsed from the message body.
  • the CDR message may include a message header and a message body.
  • the decoding network element data may be a message header and a message body of each CDR message, and the network element number of the CDR message is parsed from the message header.
  • the historical timestamp of the CDR message is parsed from the message body.
  • the network element type of the CDR message may also be parsed from the message header.
  • the network element data playback method of the embodiment may further include: adding the encoded multiple CDR messages to the sending queue.
  • the method may further include: moving the sent CDR message out of the sending queue.
  • the encoded multiple CDR messages are loaded into the sending queue, and then the CDR message in the sending queue is scanned, and the first CDR is used.
  • the historical timestamp or current timestamp of the message is used as a reference, and the preset time (for example, 1 second) is recursed, and the number of all the CDRs in the preset time is obtained according to the timestamp of the CDR message, and the message is sent in the queue.
  • Preset All the CDRs in the time are sent in batches.
  • the sent CDRs are sent out of the sending queue to detect whether the sending queue is empty. When it is detected that the sending queue is not empty, the CDR message continues to be sent. Until all the CDR messages are sent, when it is detected that the send queue is empty, the CDR message is stopped.
  • the flow of the method for playing back the network element data may include steps 301-308.
  • step 301 the network element data to be played back is obtained, and the network element data may include multiple message messages.
  • step 302 the network element data is decoded, and the historical timestamp and the network element number of each CDR message are obtained.
  • step 303 the pre-processing of each CDR message is performed.
  • the pre-processing may include replacing the historical timestamp of each CDR message with the current timestamp, and replacing the network element number of each CDR message with the target network element. number.
  • step 304 the pre-processed CDR message is encoded, and the encoded CDR message is added to the sending queue.
  • step 305 the actual rate of the network element data is determined according to the historical timestamp or current timestamp of each CDR message.
  • step 306 the encoded CDR message is transmitted according to the determined actual rate.
  • step 307 the sent bill message is moved out of the send queue.
  • step 308 it is determined whether the sending queue is empty. When it is determined that the sending queue is empty, the sending of the bill message is ended. When it is determined that the sending queue is not empty, then steps 306-308 are continued.
  • the embodiment further provides an apparatus for playing back network data.
  • the apparatus may include an obtaining module 402, a codec module 404, a preprocessing module 406, a rate control module 408, and a sending module 410.
  • the obtaining module 402 is configured to obtain network element data to be played back, and the network element data includes multiple bill messages.
  • the codec module 404 is configured to decode the network element data, and obtain a historical timestamp and a network element number of each CDR message.
  • the pre-processing module 406 is configured to pre-process each CDR message, and the pre-processing includes replacing the historical timestamp of each CDR message with the current timestamp, and replacing the network element number of each CDR message with the target. Network element number.
  • the codec module 404 can also be configured to encode each pre-processed message.
  • the rate control module 408 is configured to determine an actual rate of the network element data according to a historical timestamp or a current timestamp of each CDR message;
  • the sending module 410 is configured to send the encoded multiple CDR messages according to the determined actual rate.
  • the pre-processing module 406 may include: a timestamp conversion sub-module 406a, configured to calculate a time interval between a historical timestamp of the first bill message and a current time, and each message of the bill is The historical timestamp plus the time interval is converted to the current timestamp of each CDR message.
  • a timestamp conversion sub-module 406a configured to calculate a time interval between a historical timestamp of the first bill message and a current time, and each message of the bill is The historical timestamp plus the time interval is converted to the current timestamp of each CDR message.
  • the network element replacement sub-module 406b is configured to obtain the network element type of each CDR message, and replace the network element number of each CDR message with the target network element number according to the network element type.
  • the rate control module 408 may be configured to recurs the preset time based on the historical timestamp or the current timestamp of the first CDR message, and calculate the number of CDRs in the preset time to obtain the preset time.
  • the actual rate of network element data is equal to the number of CDR messages divided by the preset time.
  • the codec module is further configured to: decode each CDR message in the obtained network element data, where the CDR message may include a message header and a message body; and the network that parses the CDR message from the message header. The meta number; the historical timestamp of the CDR message parsed from the message body.
  • the apparatus for playing back the network element data may further include: an adding module 412, configured to add the encoded multiple CDR messages to the sending queue.
  • the moveout module 414 is configured to move the sent CDR message out of the send queue.
  • the storage medium may be a non-transitory storage medium, including a magnetic disk, an optical disk, a read-only memory (ROM), or a random A memory (Random Access Memory, RAM) or the like may also be a transient storage medium.
  • the embodiment further provides a computer readable storage medium storing computer executable instructions for performing the method for playing back any of the above network element data.
  • FIG. 7 it is a schematic diagram of a hardware structure of a server provided in this embodiment.
  • the server includes:
  • a processor 510 and a memory 520 may further include a communication interface 530 and a bus 540.
  • the processor 510, the memory 520, and the communication interface 530 can complete communication with each other through the bus 540.
  • Communication interface 530 can be used for information transfer.
  • the processor 510 can call the logic instructions in the memory 820 to perform the method of any of the network element data playback in the above embodiments.
  • the logic instructions in the memory 520 described above may be implemented in the form of a software functional unit and sold or used as a stand-alone product, and may be stored in a computer readable storage medium.
  • the technical solution of the present disclosure may be embodied in the form of a software product stored in a storage medium, including a plurality of instructions for causing a computer device (which may be a personal computer, a server, or a network) The device or the like) performs all or part of the steps of the method described in this embodiment.
  • the foregoing storage medium may be a non-transitory storage medium or a transitory storage medium.
  • the present disclosure provides a method and apparatus for playing back network data, which can limit the process of playing back network data by hardware and software devices of complex network elements, and can solve the problem that the playback data is not authentic and does not match the real data characteristics of the live network. problem.

Abstract

A network element data playback method. The method comprises: obtaining network element data to be played back, the network element data comprising multiple call detail record messages; decoding the network element data to obtain a history timestamp and a network element number of each call detail record message; preprocessing each call detail record message, the preprocessing comprising replacing the history timestamp of each call detail record message by a current timestamp and replacing the network element number of each call detail record message by a target network element number; encoding each preprocessed call detail record message; determining an actual rate of the network element data according to the history timestamp or the current timestamp of each call detail record message; and sending the multiple encoded call detail record message according to the determined actual rate.

Description

网元数据回放的方法和装置Method and device for playing back network data 技术领域Technical field
本公开涉及通信技术领域,例如涉及一种网元数据回放的方法和装置。The present disclosure relates to the field of communication technologies, for example, to a method and apparatus for network element data playback.
背景技术Background technique
在通讯系统调试、测试过程中,网元数据的回放起着十分重要的作用。通讯网元的数据回放可以是将采集到的网元数据不做修改以固定速率发送到指定服务器以实现网元数据的回放。这样会导致回放后数据看起来不真实,给灵活性带来很大限制,无法保证信令的真实顺序和时延,也无法反映出用户在一定时间段内的真实业务流程和使用习惯。有方法提出针对少量的信令数据回放时,计算出每条消息之间的间隔,按间隔发送还原真实速率。这种方式针对小数据量的信令数据尚可控,在具有海量数据的情况下(每秒十几万消息量,要计算发送十几万次间隔)就力不从心,发送性能完全达不到要求。In the process of debugging and testing the communication system, the playback of network element data plays an important role. The data playback of the communication network element may be that the collected network element data is not modified to be sent to the designated server at a fixed rate to implement playback of the network element data. This will result in unrealistic data after playback, which imposes great limitations on flexibility, cannot guarantee the true sequence and delay of signaling, and cannot reflect the real business processes and usage habits of users within a certain period of time. There are methods to calculate the interval between each message when playing back a small amount of signaling data, and send the true rate at intervals. In this way, the signaling data for small data volume is still controllable. In the case of massive data (hundreds of thousands of messages per second, it is necessary to calculate the interval of sending hundreds of thousands of times), the transmission performance is completely unsatisfactory. .
发明内容Summary of the invention
本公开提供一种网元数据回放的方法和装置,可以实现对网元数据的精准回放。The present disclosure provides a method and apparatus for playing back network data, which can implement accurate playback of network element data.
本实施例提供了一种网元数据回放的方法,所述方法可以包括:获取待回放的网元数据,所述网元数据可以包括多条话单消息。解码所述网元数据,获取每条话单消息的历史时间戳和网元号。对所述每条话单消息进行预处理,所述预处理可以包括将所述每条话单消息的历史时间戳替换为当前时间戳,以及将所述每条话单消息的网元号替换为目标网元号。对预处理后的每条话单消息进行编码。根据所述每条话单消息的历史时间戳或当前时间戳,确定所述网元数据的实际速率。根据确定的所述实际速率将编码后的多条话单消息进行发送。The embodiment provides a method for playing back network data. The method may include: acquiring network element data to be played back, where the network element data may include multiple message messages. Decoding the network element data, and obtaining a historical timestamp and a network element number of each CDR message. Pre-processing each of the CDR messages, the pre-processing may include replacing a historical timestamp of each CDR message with a current timestamp, and replacing the network element number of each CDR message The target network element number. Each pre-processed message is encoded. Determining an actual rate of the network element data according to the historical timestamp or the current timestamp of each of the CDR messages. The encoded plurality of CDR messages are sent according to the determined actual rate.
本实施例还提供了一种网元数据回放的装置,所述装置可以包括:获取模 块,设置为获取待回放的网元数据,所述网元数据包括多条话单消息;编解码模块,设置为解码所述网元数据,获取每条话单消息的历史时间戳和网元号;预处理模块,设置为对所述每条话单消息进行预处理,所述预处理可以包括将所述每条话单消息的历史时间戳替换为当前时间戳,以及将所述每条话单消息的网元号替换为目标网元号;所述编解码模块还可以设置为对预处理后的话单消息进行编码;速率控制模块,设置为根据所述每条话单消息的历史时间戳或当前时间戳确定所述网元数据的实际速率;发送模块,设置为根据确定的所述实际速率将编码后的话单消息进行发送。The embodiment further provides an apparatus for playing back network data, and the apparatus may include: acquiring a module a block, configured to acquire network element data to be played back, the network element data includes a plurality of CDR messages, and a codec module configured to decode the network element data, obtain a historical timestamp and a network element of each CDR message a pre-processing module, configured to pre-process each of the CDR messages, the pre-processing may include replacing a historical timestamp of each of the CDR messages with a current timestamp, and The network element number of the CDR message is replaced with the target network element number; the codec module may be further configured to encode the pre-processed CDR message; and the rate control module is set to be based on the historical time of each CDR message. The stamp or the current timestamp determines an actual rate of the network element data; and the sending module is configured to send the encoded bill message according to the determined actual rate.
本实施例还提供一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令用于执行上述网元数据回放的方法。The embodiment further provides a computer readable storage medium storing computer executable instructions for performing the above method for playing back network data.
本实施例还提供一种服务器,该服务器包括一个或多个处理器、存储器以及一个或多个程序,所述一个或多个程序存储在存储器中,当被一个或多个处理器执行时,执行上述网元数据回放的方法。The embodiment also provides a server including one or more processors, a memory, and one or more programs, the one or more programs being stored in the memory, when executed by one or more processors, The method for performing the above-mentioned network element data playback.
本实施例还提供了一种计算机程序产品,所述计算机程序产品包括存储在非暂态计算机可读存储介质上的计算机程序,所述计算机程序包括程序指令,当所述程序指令被计算机执行时,使所述计算机执行上述网元数据回放的方法。The embodiment further provides a computer program product comprising a computer program stored on a non-transitory computer readable storage medium, the computer program comprising program instructions, when the program instructions are executed by a computer a method of causing the computer to perform the above-described network element data playback.
上述网元数据回放的方法和装置,通过将解码出的网元数据中的每条话单消息的历史时间戳替换为当前时间戳,可以解决回放网元数据真实性不高的问题。通过将每条话单消息的网元号替换为目标网元号,可以实现可以根据不同的测试环境灵活的为每条话单消息配置合适的网元号。通过根据每条话单消息的历史时间戳或当前时间戳确定网元数据的实际速率,根据确定的实际速率将编码后的话单消息进行发送,从而可以还原现网环境中真实的实时消息吞吐量,保证信令的真实顺序和时延。上述回放网元数据的过程可以不受复杂网元软硬件设备限制,从而可以解决回放数据真实性不高,与现网真实数据特征不匹配的问题。The method and the device for playing back the network element data can solve the problem that the authenticity of the playback network element data is not high by replacing the historical time stamp of each CDR message in the decoded network element data with the current time stamp. By replacing the network element number of each CDR message with the target network element number, you can configure a suitable NE number for each CDR message according to different test environments. The actual rate of the network element data is determined according to the historical timestamp or the current timestamp of each CDR message, and the encoded CDR message is sent according to the determined actual rate, thereby realizing the real-time real-time message throughput in the live network environment. To ensure the true sequence and delay of signaling. The process of playing back the network element data may not be restricted by the complex network element hardware and software equipment, so that the problem that the playback data is not authentic and does not match the real data characteristics of the existing network can be solved.
附图说明 DRAWINGS
图1为一个实施例中网元数据回放的方法流程图。FIG. 1 is a flow chart of a method for playing back network data in an embodiment.
图2为一个实施例中对每条话单消息进行预处理的方法流程图。2 is a flow chart of a method for pre-processing each CDR message in one embodiment.
图3为一个实施例中解码网元数据的方法流程图。3 is a flow chart of a method for decoding network element data in an embodiment.
图4为一个实施例中网元数据回放的装置结构框图。FIG. 4 is a structural block diagram of an apparatus for playing back network data in an embodiment.
图5为一个实施例中预处理模块的结构框图。Figure 5 is a block diagram showing the structure of a preprocessing module in one embodiment.
图6为另一个实施例中网元数据回放的装置结构框图。FIG. 6 is a structural block diagram of an apparatus for playing back network data in another embodiment.
图7为一个实施例提供的一种服务器的通用硬件结构示意图。FIG. 7 is a schematic diagram of a general hardware structure of a server according to an embodiment.
具体实施方式detailed description
如图1所示,在一个实施例中,提出了一种网元数据回放的方法,该方法可以包括以下步骤。As shown in FIG. 1, in one embodiment, a method for playing back network data is proposed, and the method may include the following steps.
在步骤102中,获取待回放的网元数据,网元数据可以包括多条话单消息。In step 102, the network element data to be played back is obtained, and the network element data may include multiple CDR messages.
可选地,网元数据是指网元之间传递的数据,既可以包括控制面数据(信令数据),也可以包括媒体面用户数据。网元数据往往是海量的,存储形式为文本文件。网元数据可以以一条条话单的形式进行保存的,所以获取的网元数据可以包括多条话单消息。可选地,网元数据的内容可以为十六进制。可选地,接收回放网元数据的请求,在配置文件中查找与该网元数据对应的路径参数,根据路径参数获取待回放的网元数据。网元数据可以预先存储在数据库中。Optionally, the network element data refers to data transmitted between network elements, and may include control plane data (signaling data), and may also include media plane user data. Network element data is often massive, and the storage form is a text file. The network element data can be saved in the form of a single bill, so the obtained network element data can include multiple bill messages. Optionally, the content of the network element data may be hexadecimal. Optionally, receiving the request for playing back the network element data, searching the path parameter corresponding to the network element data in the configuration file, and acquiring the network element data to be played back according to the path parameter. The network element data can be pre-stored in the database.
在步骤104中,解码网元数据,获取每条话单消息的历史时间戳和网元号。In step 104, the network element data is decoded, and the historical timestamp and the network element number of each CDR message are obtained.
可选地,网元数据可以以一条条话单的形式进行保存的,对获取到的网元数据进行解码即是对每条话单消息进行解码,解析出每条话单消息的业务时间即业务发生的历史时间戳、网元类型和网元号等信息。其中,网元号可以是网元的身份标识(Identification,ID)。Optionally, the network element data may be saved in the form of a single CDR, and decoding the obtained network element data is to decode each CDR message, and parse out the service time of each CDR message. Information such as the historical timestamp, NE type, and NE number of the service. The network element number may be an identity (ID) of the network element.
可选地,解码规则遵循(3rd Generation Partnership Project,3GPP)标准协议,解码的对象可以为每条话单消息,每条话单消息可以由两部分组成:消息头和消息体。那么解码的内容对应包括两块:消息头的解码和消息体的解码。其中,可以从消息头中解码出网元号和网元类型,从消息体中解码出所有 涉及到业务发生时间的字段,该时间字段可以包括:上报时间字段,开始时间字段和结束时间字段。可以任意选择一个时间字段作为上述的历史时间戳。可选地,话单消息的历史时间戳可以为上报时间字段。Optionally, the decoding rule follows the 3rd Generation Partnership Project (3GPP) standard protocol, and the decoded object may be each CDR message, and each CDR message may be composed of two parts: a message header and a message body. Then the decoded content corresponds to two blocks: decoding of the message header and decoding of the message body. The network element number and the network element type can be decoded from the message header, and all the information is decoded from the message body. A field related to the time when the service occurs, the time field may include: a report time field, a start time field, and an end time field. A time field can be arbitrarily selected as the above historical time stamp. Optionally, the historical timestamp of the CDR message may be a reporting time field.
在步骤106中,对每条话单消息进行预处理,预处理可以包括将每条话单消息的历史时间戳替换为当前时间戳,将每条话单消息的网元号替换为目标网元号。In step 106, the pre-processing of each CDR message is performed. The pre-processing may include replacing the historical timestamp of each CDR message with the current timestamp, and replacing the network element number of each CDR message with the target network element. number.
可选地,为了提高网元数据回放的真实性,将每条话单消息的历史时间戳替换为当前时间戳,同时为了适配测试环境中的网元号,将每条话单消息的网元号替换为测试环境中的目标网元号。Optionally, in order to improve the authenticity of the data playback of the network element, the historical timestamp of each CDR message is replaced with the current timestamp, and the network of each CDR message is used in order to adapt the network element number in the test environment. Replace the element number with the target NE number in the test environment.
可选地,将每条话单消息的历史时间戳替换为当前时间戳可以包括:确定首条话单消息的历史时间戳与当前时间的时间间隔,将每条话单消息的历史时间戳加上此时间间隔,使得历史时间戳变为了当前时间戳。Optionally, replacing the historical timestamp of each CDR message with the current timestamp may include: determining a time interval between a historical timestamp of the first CDR message and a current time, and adding a historical timestamp of each CDR message. This time interval is made such that the historical timestamp becomes the current timestamp.
可选地,将每条话单消息的网元号替换为测试环境中的目标网元号可以包括:找到话单消息中网元号的位置,然后根据每条话单消息的网元类型和网元号,在测试环境中为该网元号唯一匹配一个目标网元号,用该目标网元号替换网元号。Optionally, replacing the network element number of each CDR message with the target network element number in the test environment may include: finding a location of the network element number in the CDR message, and then according to the network element type of each CDR message The network element number is uniquely matched to the target network element number in the test environment, and the network element number is replaced by the target network element number.
在步骤108中,对预处理后的话单消息进行编码。In step 108, the pre-processed CDR message is encoded.
可选地,将话单消息进行预处理后,需要将处理后的话单信息重新进行编码,编码规则可以遵循3GPP标准协议,采用通用的类型-长度-内容(Type-Length-Value,TLV)的编码格式进行编码。编码的数据长度可变,数据长度及值可以通过类型进行确定。可选地,编码采用话单消息原始的编码方式即解码前的编码方式。编码可以包括编码话单消息的消息头、消息体,并且进行消息头和消息体的组包。可选地,对话单消息进行编码后,将解码后的话单消息加载进发送队列,以便后续进行发送。Optionally, after the CDR message is pre-processed, the processed CDR information needs to be re-encoded, and the coding rule can follow the 3GPP standard protocol, and adopts a common Type-Length-Value (TLV) The encoding format is encoded. The length of the encoded data is variable, and the data length and value can be determined by type. Optionally, the coding adopts the original coding mode of the CDR message, that is, the coding mode before decoding. The encoding may include a message header encoding the CDR message, a message body, and a packet of the message header and the message body. Optionally, after the dialog message is encoded, the decoded message is loaded into the sending queue for subsequent transmission.
在步骤110中,根据每条话单消息的历史时间戳或当前时间戳,确定网元数据的实际速率。In step 110, the actual rate of the network element data is determined according to the historical timestamp or current timestamp of each CDR message.
可选地,每条话单消息可以有两个时间戳:历史时间戳和当前时间戳。计 算实际速率可以选用历史时间戳,也可以选用当前时间戳。需要说明的是,时间戳的选用必须一致,即所有的话单消息都选用历史时间戳,或所有的话单消息都选用当前时间戳。Optionally, each CDR message can have two timestamps: a historical timestamp and a current timestamp. Count The actual time rate can be selected as the historical timestamp or the current timestamp. It should be noted that the timestamps must be consistent, that is, all the CDR messages are selected with historical timestamps, or all CDR messages are selected with the current timestamp.
可选地,确定网元数据的实际速率可以包括:以首条话单消息的历史时间戳或当前时间戳为基准,递推预设时间,然后计算该预设时间内的话单消息数,将计算得到的话单消息数值作为该预设时间内的实际速率。Optionally, determining the actual rate of the network element data may include: retrieving the preset time based on the historical timestamp or the current timestamp of the first bill message, and then calculating the number of the bill message in the preset time, The calculated CDR message value is used as the actual rate in the preset time.
可选地,启动定时器,预设时间设为1秒,每秒扫描发送队列中的话单消息,以发送队列中首条话单消息的历史时间戳或当前时间戳为基准,递推1秒,确定1秒时间内的发送队列中的话单消息数,由此实时得到每秒的话单消息数,得到网元数据的实际速率为话单消息数/每秒。Optionally, the timer is started, and the preset time is set to 1 second. The CDR message in the sending queue is scanned every second, and the historical timestamp or the current timestamp of the first CDR message in the sending queue is used as a reference, and the recursion is 1 second. The number of the CDRs in the sending queue is determined within one second, and the number of CDR messages per second is obtained in real time, and the actual rate of the network data is obtained as the number of CDRs per second.
可选地,网元数据包括多条话单消息,在网元数据回放过程中,按照预设时间将发送队列中的多条话单消息分为多个区间,每个区间中可能包括不同数量的话单消息。依次递推计算每个区间对应网元数据的实际速率。如在第一区间中,计算该预设时间内的话单消息数,并确定该第一区间发送网元数据的实际速率等于话单消息数除以预设时间;同理,确定第二区间内发送网元数据的实际速率。依次递推,计算所有区间内发送网元数据的实际速率。将该第一区间内的话单消息以该第一区间的实际速率批量发送至目标服务器;将第二区间内的话单消息以第二区间的发送网元数据的实际速率批量发送至目标服务器,直至所有区间内的所有话单消息均发送至目标服务器为止。Optionally, the network element data includes multiple CDR messages. During the playback of the network element data, the multiple CDR messages in the sending queue are divided into multiple intervals according to a preset time, and each interval may include different numbers. Order message. The actual rate of the corresponding network element data of each interval is successively recursively calculated. For example, in the first interval, calculating the number of the CDR message in the preset time, and determining that the actual rate of sending the network element data in the first interval is equal to the number of CDR messages divided by the preset time; similarly, determining the second interval The actual rate at which network element data is sent. The actual rate of sending network element data in all intervals is calculated by recursing in turn. And sending the CDR message in the first interval to the target server in batches at the actual rate of the first interval; and sending the CDR message in the second interval to the target server in batches at the actual rate of sending the network element data in the second interval, until All CDR messages in all intervals are sent to the target server.
在步骤112中,根据确定的实际速率将编码后的多条话单消息进行发送。In step 112, the encoded plurality of CDR messages are transmitted according to the determined actual rate.
可选地,根据实时计算得到的实际速率,将编码后的多条话单消息按照原始方式发送到指定的服务器。这里的原始方式可以是指网元数据的原始传输协议,即现网中网元数据的传输协议,比如传输控制协议(Transmission Control Protocol,TCP),用户数据报协议(User Datagram Protocol,UDP)。可选地,将编码后的多条话单消息加载进发送队列,然后将发送队列中的多条话单消息根据实时确定的实际速率进行发送,并将已发送的话单消息移出发送队列,在发送过程中,实时检测发送队列是否为空,当检测到发送队列不为空时,则继 续发送,直至所有的话单消息发送完毕。当检测到发送队列为空时,表明发送队列中所有的话单消息已经全部发送,则停止发送。Optionally, the encoded multiple CDR messages are sent to the designated server in an original manner according to the actual rate calculated in real time. The original mode here may refer to the original transmission protocol of the network element data, that is, the transmission protocol of the network element data in the current network, such as the Transmission Control Protocol (TCP) and the User Datagram Protocol (UDP). Optionally, the encoded multiple CDR messages are loaded into the sending queue, and then multiple CDR messages in the sending queue are sent according to the actual rate determined in real time, and the sent CDR message is moved out of the sending queue. During the sending process, it is detected in real time whether the sending queue is empty. When it is detected that the sending queue is not empty, then Continue to send until all the CDR messages have been sent. When it is detected that the sending queue is empty, it indicates that all the CDR messages in the sending queue have been sent, and then the sending is stopped.
可选地,通过将解码出的网元数据中的每条话单消息的历史时间戳替换为当前时间戳,可以解决回放网元数据真实性不高的问题。通过将每条话单消息的网元号替换为目标网元号,可以实现根据不同的测试环境,灵活地为每条话单消息配置合适的网元号。通过根据每条话单消息的历史时间戳或当前时间戳确定网元数据的实际速率,根据确定的实际速率将编码后的话单消息进行发送,从而可以还原现网环境中真实的实时消息吞吐量,保证信令的真实顺序和时延。上述回放网元数据的过程可以不受复杂网元软硬件设备限制,可以解决回放数据真实性不高,与现网真实数据特征不匹配的问题。Optionally, the problem that the playback network element data is not authentic is solved by replacing the historical timestamp of each CDR message in the decoded network element data with the current timestamp. By replacing the network element number of each CDR message with the target network element number, you can flexibly configure the appropriate NE number for each CDR message according to different test environments. The actual rate of the network element data is determined according to the historical timestamp or the current timestamp of each CDR message, and the encoded CDR message is sent according to the determined actual rate, thereby realizing the real-time real-time message throughput in the live network environment. To ensure the true sequence and delay of signaling. The process of playing back the network element data may be free from the limitation of the hardware and software devices of the complex network element, and may solve the problem that the playback data is not authentic and does not match the real data characteristics of the existing network.
如图2所示,对每条话单消息进行预处理,预处理包括将每条话单消息的历史时间戳替换为当前时间戳、将每条话单消息的网元号替换为目标网元号的步骤可以包括步骤106a-步骤106b。As shown in FIG. 2, the pre-processing of each CDR message is performed by replacing the historical timestamp of each CDR message with the current timestamp, and replacing the network element number of each CDR message with the target network element. The steps of the number may include steps 106a-106b.
在步骤106a中,计算首条话单消息的历史时间戳与当前时间的时间间隔,将每条话单消息的历史时间戳加上该时间间隔转换为当前时间戳。In step 106a, the time interval between the historical timestamp of the first bill message and the current time is calculated, and the historical time stamp of each bill message plus the time interval is converted into the current time stamp.
可选地,每条话单消息可以有一个历史时间戳,该历史时间戳可以是指该话单消息的业务发生的原始时间,为了提高网元数据回放的真实性,需要将原来的历史时间戳替换为当前的时间戳。可选地,替换过程可以包括:找出首条话单消息的历史时间戳,计算首条话单消息的历史时间戳与当前时间的时间间隔,将所有的话单消息的历史时间戳都加上该时间间隔,即可以将原来的历史时间戳转换为了当前时间戳。Optionally, each CDR message may have a historical timestamp, and the historical timestamp may refer to the original time when the CDR message service occurs. To improve the authenticity of the network element data playback, the original historical time is required. Replace the stamp with the current timestamp. Optionally, the replacing process may include: finding a historical timestamp of the first CDR message, calculating a historical timestamp of the first CDR message and a current time interval, and adding a historical timestamp of all the CDR messages. The time interval, that is, the original historical time stamp can be converted to the current time stamp.
在步骤106b中,获取每条话单消息的网元类型,根据网元类型将每条话单消息的网元号替换为目标网元号。In step 106b, the network element type of each CDR message is obtained, and the network element number of each CDR message is replaced with the target network element number according to the network element type.
可选地,对每条话单消息进行解码,可以从每条话单消息的消息头部分解析出该话单消息的网元类型,根据获取到的网元类型和网元号将每条话单消息的网元号替换为测试环境中的目标网元号。 Optionally, each CDR message is decoded, and the network element type of the CDR message is parsed from the header portion of each CDR message, and each message is obtained according to the obtained network element type and the network element number. Replace the NE number of the single message with the target NE number in the test environment.
可选地,根据每条话单的历史时间戳或当前时间戳计算网元数据的实际速率的步骤可以包括:以首条话单消息的历史时间戳或当前时间戳为基准,递推预设时间,计算预设时间内的话单消息数,从而可以得到网元数据的实际速率等于话单消息数除以预设时间。Optionally, the step of calculating the actual rate of the network element data according to the historical timestamp or the current timestamp of each CDR may include: recursing the preset based on the historical timestamp or the current timestamp of the first CDR message. Time, calculate the number of CDR messages in the preset time, so that the actual rate of the network element data is equal to the number of CDR messages divided by the preset time.
可选地,为了还原现网环境中真实的实时消息吞吐量保证信令的真实顺序和时延,需要根据网元数据实际速率将话单消息发送到目标服务器。实际速率的计算是在保证已有话单消息间时延及顺序一致的前提下,通过以首条话单的历史时间戳或当前时间戳为基准,递推预设时间(比如1秒),然后计算该预设时间内的话单消息数,计算得到该预设时间内的网元数据的实际速率等于话单消息数除以预设时间。可以将该预设时间内的话单消息数批量(一次性)地发送给对应的目标服务器。Optionally, in order to restore the real sequence and delay of the real-time message throughput guarantee signaling in the live network environment, the CDR message needs to be sent to the target server according to the actual rate of the network element data. The actual rate is calculated by recursing the preset time (for example, 1 second) based on the historical timestamp or the current timestamp of the first CDR, provided that the delay and order of the existing CDR messages are consistent. Then, the number of the CDRs in the preset time is calculated, and the actual rate of the network data in the preset time is calculated to be equal to the number of CDRs divided by the preset time. The number of CDR messages in the preset time may be sent to the corresponding target server in batches (one time).
可选地,解码网元数据,获取每条话单消息的历史时间戳和网元号的步骤可以包括:对获取到的每条话单消息进行解码,话单消息可以包括消息头和消息体。可以从消息头中解析出话单消息的网元号;可以从消息体中解析出话单消息的历史时间戳。Optionally, the step of decoding the network element data and obtaining the historical timestamp and the network element number of each CDR message may include: decoding each obtained CDR message, where the CDR message may include a message header and a message body. . The network element number of the CDR message can be parsed from the message header; the historical timestamp of the CDR message can be parsed from the message body.
可选地,话单消息可以包括消息头和消息体,解码网元数据可以是指对每条话单消息的消息头和消息体进行解码,从消息头中解析出话单消息的网元号,从消息体中解析出话单消息的历史时间戳。可选地,还可以从消息头中解析出话单消息的网元类型。Optionally, the CDR message may include a message header and a message body. The decoding network element data may be a message header and a message body of each CDR message, and the network element number of the CDR message is parsed from the message header. The historical timestamp of the CDR message is parsed from the message body. Optionally, the network element type of the CDR message may also be parsed from the message header.
可选地,在对预处理后的每条话单消息进行编码的步骤之后,该实施例的网元数据回放方法还可以包括:将编码后的多条话单消息加入发送队列。Optionally, after the step of encoding the pre-processed CDR message, the network element data playback method of the embodiment may further include: adding the encoded multiple CDR messages to the sending queue.
可选地,在根据确定的实际速率将编码后的多条话单消息进行发送的步骤之后,该方法还可以包括:将已发送的话单消息移出发送队列。Optionally, after the step of transmitting the encoded multiple CDR messages according to the determined actual rate, the method may further include: moving the sent CDR message out of the sending queue.
可选地,在对预处理后的每条话单消息进行编码后,将编码后的多条话单消息加载进发送队列,然后对发送队列中的话单消息进行扫描,并以首条话单消息的历史时间戳或当前时间戳为基准,递推预设时间(比如1秒),根据话单消息的时间戳获取在预设时间内的所有话单消息数,并将发送队列中的该预设 时间内的所有话单消息批量进行发送,发送完成后,将已发送的话单消息移出该发送队列,实时检测发送队列是否为空,当检测到发送队列不为空时,则继续发送话单消息,直至所有的话单消息发送完毕,当检测到发送队列为空时,则停止发送话单消息。Optionally, after the pre-processed CDR message is encoded, the encoded multiple CDR messages are loaded into the sending queue, and then the CDR message in the sending queue is scanned, and the first CDR is used. The historical timestamp or current timestamp of the message is used as a reference, and the preset time (for example, 1 second) is recursed, and the number of all the CDRs in the preset time is obtained according to the timestamp of the CDR message, and the message is sent in the queue. Preset All the CDRs in the time are sent in batches. After the transmission is complete, the sent CDRs are sent out of the sending queue to detect whether the sending queue is empty. When it is detected that the sending queue is not empty, the CDR message continues to be sent. Until all the CDR messages are sent, when it is detected that the send queue is empty, the CDR message is stopped.
如图3所示,网元数据回放的方法的流程可以包括步骤301-步骤308。As shown in FIG. 3, the flow of the method for playing back the network element data may include steps 301-308.
在步骤301中,获取待回放的网元数据,网元数据可以包括多条话单消息。In step 301, the network element data to be played back is obtained, and the network element data may include multiple message messages.
在步骤302中,解码网元数据,获取每条话单消息的历史时间戳和网元号。In step 302, the network element data is decoded, and the historical timestamp and the network element number of each CDR message are obtained.
在步骤303中,对每条话单消息进行预处理,预处理可以包括将每条话单消息的历史时间戳替换为当前时间戳、将每条话单消息的网元号替换为目标网元号。In step 303, the pre-processing of each CDR message is performed. The pre-processing may include replacing the historical timestamp of each CDR message with the current timestamp, and replacing the network element number of each CDR message with the target network element. number.
在步骤304中,对预处理后的话单消息进行编码,将编码后的话单消息加入发送队列。In step 304, the pre-processed CDR message is encoded, and the encoded CDR message is added to the sending queue.
在步骤305中,根据每条话单消息的历史时间戳或当前时间戳确定网元数据的实际速率。In step 305, the actual rate of the network element data is determined according to the historical timestamp or current timestamp of each CDR message.
在步骤306中,根据确定的实际速率将编码后的话单消息进行发送。In step 306, the encoded CDR message is transmitted according to the determined actual rate.
在步骤307中,将已发送的话单消息移出发送队列。In step 307, the sent bill message is moved out of the send queue.
在步骤308中,判断发送队列是否为空,当判定发送队列为空时,则结束发送话单消息,当判定发送队列不为空时,则继续执行步骤306-步骤308。In step 308, it is determined whether the sending queue is empty. When it is determined that the sending queue is empty, the sending of the bill message is ended. When it is determined that the sending queue is not empty, then steps 306-308 are continued.
如图4所示,本实施例还提出了一种网元数据回放的装置,该装置可以包括获取模块402,编解码模块404,预处理模块406,速率控制模块408和发送模块410。As shown in FIG. 4, the embodiment further provides an apparatus for playing back network data. The apparatus may include an obtaining module 402, a codec module 404, a preprocessing module 406, a rate control module 408, and a sending module 410.
获取模块402设置为获取待回放的网元数据,网元数据包括多条话单消息。The obtaining module 402 is configured to obtain network element data to be played back, and the network element data includes multiple bill messages.
编解码模块404设置为解码网元数据,获取每条话单消息的历史时间戳和网元号。The codec module 404 is configured to decode the network element data, and obtain a historical timestamp and a network element number of each CDR message.
预处理模块406设置为对每条话单消息进行预处理,预处理包括将每条话单消息的历史时间戳替换为当前时间戳、将每条话单消息的网元号替换为目标 网元号。The pre-processing module 406 is configured to pre-process each CDR message, and the pre-processing includes replacing the historical timestamp of each CDR message with the current timestamp, and replacing the network element number of each CDR message with the target. Network element number.
编解码模块404还可以设置为对预处理后的每条话单消息进行编码。The codec module 404 can also be configured to encode each pre-processed message.
速率控制模块408设置为根据每条话单消息的历史时间戳或当前时间戳确定网元数据的实际速率;The rate control module 408 is configured to determine an actual rate of the network element data according to a historical timestamp or a current timestamp of each CDR message;
发送模块410设置为根据确定的实际速率将编码后的多条话单消息进行发送。The sending module 410 is configured to send the encoded multiple CDR messages according to the determined actual rate.
如图5所示,可选地,预处理模块406可以包括:时间戳转换子模块406a,设置为计算首条话单消息的历史时间戳与当前时间的时间间隔,将每条话单消息的历史时间戳加上时间间隔转换为每条话单消息的当前时间戳。As shown in FIG. 5, optionally, the pre-processing module 406 may include: a timestamp conversion sub-module 406a, configured to calculate a time interval between a historical timestamp of the first bill message and a current time, and each message of the bill is The historical timestamp plus the time interval is converted to the current timestamp of each CDR message.
网元号替换子模块406b,设置为获取每条话单消息的网元类型,根据网元类型将每条话单消息的网元号替换为目标网元号。The network element replacement sub-module 406b is configured to obtain the network element type of each CDR message, and replace the network element number of each CDR message with the target network element number according to the network element type.
可选地,速率控制模块408还可以设置为以首条话单消息的历史时间戳或当前时间戳为基准,递推预设时间,计算预设时间内的话单消息数,得到预设时间内网元数据的实际速率等于话单消息数除以预设时间。Optionally, the rate control module 408 may be configured to recurs the preset time based on the historical timestamp or the current timestamp of the first CDR message, and calculate the number of CDRs in the preset time to obtain the preset time. The actual rate of network element data is equal to the number of CDR messages divided by the preset time.
可选地,编解码模块还可以设置为对获取到的网元数据中的每条话单消息进行解码,话单消息可以包括消息头和消息体;从消息头中解析出话单消息的网元号;从消息体中解析出话单消息的历史时间戳。Optionally, the codec module is further configured to: decode each CDR message in the obtained network element data, where the CDR message may include a message header and a message body; and the network that parses the CDR message from the message header. The meta number; the historical timestamp of the CDR message parsed from the message body.
如图6所示,可选地上述网元数据回放的装置还可以包括:加入模块412,设置为将编码后的多条话单消息加入发送队列。移出模块414,设置为将已发送的话单消息移出发送队列。As shown in FIG. 6, the apparatus for playing back the network element data may further include: an adding module 412, configured to add the encoded multiple CDR messages to the sending queue. The moveout module 414 is configured to move the sent CDR message out of the send queue.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述程序可存储于一计算机可读取存储介质中,如本发明实施例中,该程序可存储于计算机系统的存储介质中,并被该计算机系统中的至少一个处理器执行,以实现包括如上述任意一种网元数据回放的方法的实施例的流程。其中,所述存储介质可以为非暂态存储介质,包括磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)或随机 存储记忆体(Random Access Memory,RAM)等,也可以为暂态存储介质。A person skilled in the art can understand that all or part of the process of implementing the above embodiments can be completed by a computer program to instruct related hardware, and the program can be stored in a computer readable storage medium, such as the present invention. In an embodiment, the program can be stored in a storage medium of the computer system and executed by at least one processor in the computer system to implement a flow of an embodiment of a method including playback of any of the network element data as described above. The storage medium may be a non-transitory storage medium, including a magnetic disk, an optical disk, a read-only memory (ROM), or a random A memory (Random Access Memory, RAM) or the like may also be a transient storage medium.
以上所述实施例的多个技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的多个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。A plurality of technical features of the above-described embodiments may be combined in any combination. For the sake of brevity of description, all possible combinations of the plurality of technical features in the above embodiments are not described, however, as long as the combination of these technical features does not exist. Contradictions should be considered as the scope of this manual.
本实施例还提供一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令用于执行上述任意一种网元数据回放的方法。The embodiment further provides a computer readable storage medium storing computer executable instructions for performing the method for playing back any of the above network element data.
如图7所示,是本实施例提供的一种服务器的硬件结构示意图,如图7所示,该服务器包括:As shown in FIG. 7, it is a schematic diagram of a hardware structure of a server provided in this embodiment. As shown in FIG. 7, the server includes:
处理器(processor)510和存储器(memory)520;还可以包括通信接口(Communications Interface)530和总线540。A processor 510 and a memory 520; may further include a communication interface 530 and a bus 540.
其中,处理器510、存储器520和通信接口530可以通过总线540完成相互间的通信。通信接口530可以用于信息传输。处理器510可以调用存储器820中的逻辑指令,以执行上述实施例中任意一种网元数据回放的方法。The processor 510, the memory 520, and the communication interface 530 can complete communication with each other through the bus 540. Communication interface 530 can be used for information transfer. The processor 510 can call the logic instructions in the memory 820 to perform the method of any of the network element data playback in the above embodiments.
此外,上述的存储器520中的逻辑指令可以通过软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本公开的技术方案可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本实施例所述方法的全部或部分步骤。而前述的存储介质可以是非暂态存储介质,也可以是暂态存储介质。In addition, the logic instructions in the memory 520 described above may be implemented in the form of a software functional unit and sold or used as a stand-alone product, and may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present disclosure may be embodied in the form of a software product stored in a storage medium, including a plurality of instructions for causing a computer device (which may be a personal computer, a server, or a network) The device or the like) performs all or part of the steps of the method described in this embodiment. The foregoing storage medium may be a non-transitory storage medium or a transitory storage medium.
工业实用性Industrial applicability
本公开提供了一种网元数据回放的方法和装置,可以使得回放网元数据的过程受复杂网元软硬件设备限制,可以解决回放数据真实性不高,与现网真实数据特征不匹配的问题。 The present disclosure provides a method and apparatus for playing back network data, which can limit the process of playing back network data by hardware and software devices of complex network elements, and can solve the problem that the playback data is not authentic and does not match the real data characteristics of the live network. problem.

Claims (11)

  1. 一种网元数据回放的方法,应用于服务器中,包括:A method for playing back network data data, which is applied to a server, including:
    获取待回放的网元数据,所述网元数据包括多条话单消息;Obtaining network element data to be played back, where the network element data includes multiple bill messages;
    解码所述网元数据,获取每条话单消息的历史时间戳和网元号;Decoding the network element data, and obtaining a historical timestamp and a network element number of each CDR message;
    对所述每条话单消息进行预处理,所述预处理包括将所述每条话单消息的历史时间戳替换为当前时间戳,以及将所述每条话单消息的网元号替换为目标网元号;Pre-processing each of the CDR messages, the pre-processing includes replacing a historical timestamp of each CDR message with a current timestamp, and replacing the network element number of each CDR message with Target network element number;
    对预处理后的每条话单消息进行编码;Encoding each pre-processed message;
    根据所述每条话单消息的历史时间戳或当前时间戳确定所述网元数据的实际速率;以及Determining an actual rate of the network element data according to a historical timestamp or a current timestamp of each of the CDR messages;
    根据确定的所述实际速率将编码后的多条话单消息进行发送。The encoded plurality of CDR messages are sent according to the determined actual rate.
  2. 根据权利要求1所述的方法,其中,所述对所述每条话单消息进行预处理包括:The method of claim 1, wherein the pre-processing each of the bill messages comprises:
    计算首条话单消息的历史时间戳与当前时间的时间间隔,将所述每条话单消息的历史时间戳加上所述时间间隔,转换为每条话单消息的当前时间戳;Calculating a historical timestamp of the first CDR message and a current time interval, and converting the historical timestamp of each CDR message to the time interval to be converted into a current timestamp of each CDR message;
    获取每条话单消息的网元类型,根据所述网元类型将每条话单消息的网元号替换为目标网元号。The network element type of each CDR message is obtained, and the network element number of each CDR message is replaced with the target network element number according to the network element type.
  3. 根据权利要求1所述的方法,其中,所述根据所述每条话单消息的历史时间戳或当前时间戳计算网元数据的实际速率的步骤包括:The method according to claim 1, wherein the step of calculating the actual rate of the network element data according to the historical timestamp or the current timestamp of each of the CDR messages comprises:
    以首条话单消息的历史时间戳或当前时间戳为基准,递推预设时间,计算预设时间内的话单消息数,得到预设时间内的网元数据的实际速率等于话单消息数除以预设时间。Based on the historical timestamp or the current timestamp of the first CDR message, the preset time is recursed, and the number of CDRs in the preset time is calculated, and the actual rate of the network element data in the preset time is equal to the number of CDR messages. Divide by the preset time.
  4. 根据权利要求1所述的方法,其中,所述解码所述网元数据,获取每条话单消息的历史时间戳和网元号的步骤包括:The method of claim 1, wherein the step of decoding the network element data to obtain a historical timestamp and a network element number of each CDR message comprises:
    对获取到的每条话单消息进行解码,所述每条话单消息包括消息头和消息体;Decoding each obtained CDR message, where each CDR message includes a message header and a message body;
    从所述消息头中解析出每条话单消息的网元号;以及Parsing the network element number of each CDR message from the message header;
    从所述消息体中解析出每条话单消息的历史时间戳。 The historical timestamp of each CDR message is parsed from the message body.
  5. 根据权利要求1所述的方法,在所述对预处理后的每条话单消息进行编码的步骤之后还包括:The method of claim 1, after the step of encoding each pre-processed message, further comprising:
    将编码后的多条话单消息加入发送队列;Adding the encoded multiple CDR messages to the sending queue;
    在所述根据确定的所述实际速率将编码后的多条话单消息进行发送的步骤之后还包括:将已发送的话单消息移出所述发送队列。After the step of transmitting the encoded multiple CDR messages according to the determined actual rate, the method further includes: moving the sent CDR message out of the sending queue.
  6. 一种网元数据回放的装置,包括:A device for playing back network data, comprising:
    获取模块,设置为获取待回放的网元数据,所述网元数据包括多条话单消息;An acquiring module, configured to acquire network element data to be played back, where the network element data includes multiple bill messages;
    编解码模块,设置为解码所述网元数据,获取每条话单消息的历史时间戳和网元号;a codec module, configured to decode the network element data, and obtain a historical timestamp and a network element number of each CDR message;
    预处理模块,设置为对所述每条话单消息进行预处理,所述预处理包括将所述每条话单消息的历史时间戳替换为当前时间戳,以及将所述每条话单消息的网元号替换为目标网元号;a pre-processing module, configured to pre-process each of the CDR messages, the pre-processing includes replacing a historical timestamp of each CDR message with a current timestamp, and sending each CDR message Replace the NE number with the target NE number;
    所述编解码模块还设置为对预处理后的每条话单消息进行编码;The codec module is further configured to encode each pre-processed message;
    速率控制模块,设置为根据所述每条话单消息的历史时间戳或当前时间戳确定所述网元数据的实际速率;以及a rate control module, configured to determine an actual rate of the network element data according to a historical timestamp or a current timestamp of each of the CDR messages;
    发送模块,设置为根据确定的所述实际速率将编码后的多条话单消息进行发送。The sending module is configured to send the encoded multiple CDR messages according to the determined actual rate.
  7. 根据权利要求6所述的装置,其中,所述预处理模块包括:The apparatus of claim 6 wherein said pre-processing module comprises:
    时间戳转换子模块,设置为计算首条话单消息的历史时间戳与当前时间的时间间隔,将所述每条话单消息的历史时间戳加上所述时间间隔,转换为每条话单消息的当前时间戳;以及a timestamp conversion sub-module, configured to calculate a historical timestamp of the first CDR message and a current time interval, and convert the historical timestamp of each CDR message to the time interval to be converted into each CDR The current timestamp of the message;
    网元号替换子模块,设置为获取每条话单消息的网元类型,根据所述网元类型将每条话单消息的网元号替换为目标网元号。The network element replacement sub-module is configured to obtain the network element type of each CDR message, and replace the network element number of each CDR message with the target network element number according to the network element type.
  8. 根据权利要求6所述的装置,其中,所述速率控制模块还设置为以首条话单消息的历史时间戳或当前时间戳为基准,递推预设时间,计算预设时间内的话单消息数,得到预设时间内的网元数据的实际速率等于话单消息数除以预 设时间。The device according to claim 6, wherein the rate control module is further configured to recurs the preset time based on the historical timestamp or the current timestamp of the first bill message, and calculate the bill message in the preset time. Number, the actual rate of the network data obtained in the preset time is equal to the number of CDRs divided by the number Set the time.
  9. 根据权利要求6所述的装置,其中,所述编解码模块还设置为对获取到的每条话单消息进行解码,所述每条话单消息包括消息头和消息体;从所述消息头中解析出每条话单消息的网元号;从所述消息体中解析出每条话单消息的历史时间戳。The apparatus of claim 6, wherein the codec module is further configured to decode each of the acquired CDR messages, the CDR message including a message header and a message body; from the message header The network element number of each bill message is parsed; the historical time stamp of each bill message is parsed from the message body.
  10. 根据权利要求6所述的装置,还包括:The apparatus of claim 6 further comprising:
    加入模块,设置为在对预处理后的每条话单消息进行编码之后,将编码后的多条话单消息加入发送队列;以及Adding a module, and setting, after encoding each pre-processed CDR message, adding the encoded multiple CDR messages to the sending queue;
    移出模块,设置为在根据确定的实际速率将编码后的多条话单消息进行发送之后,将已发送的话单消息移出所述发送队列。And removing the module, configured to: after sending the encoded multiple CDR messages according to the determined actual rate, move the sent CDR message out of the sending queue.
  11. 一种计算机可读存储介质,存储有计算机可执行指令,所述计算机可执行指令用于执行权利要求1-5任一项所述的网元数据的回放方法。 A computer readable storage medium storing computer executable instructions for performing a playback method of the network element data according to any one of claims 1-5.
PCT/CN2017/077838 2016-04-20 2017-03-23 Network element data playback method and apparatus WO2017181808A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610251575.XA CN107306199B (en) 2016-04-20 2016-04-20 Network element data playback method and device
CN201610251575.X 2016-04-20

Publications (1)

Publication Number Publication Date
WO2017181808A1 true WO2017181808A1 (en) 2017-10-26

Family

ID=60115621

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/077838 WO2017181808A1 (en) 2016-04-20 2017-03-23 Network element data playback method and apparatus

Country Status (2)

Country Link
CN (1) CN107306199B (en)
WO (1) WO2017181808A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116684837A (en) * 2023-07-19 2023-09-01 贵阳朗玛通信科技有限公司 Billing preprocessing method and device for ticket

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114445184A (en) * 2022-01-27 2022-05-06 聚好看科技股份有限公司 Order flow playback method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102571687A (en) * 2010-12-10 2012-07-11 联芯科技有限公司 Method for building synchronous status information among real-time media streams, device adopting same and SCC AS
US20130179821A1 (en) * 2012-01-11 2013-07-11 Samuel M. Bauer High speed logging system
CN104410807A (en) * 2014-11-24 2015-03-11 深圳市华宝电子科技有限公司 Method and device for synchronously replaying multi-channel video

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102571687A (en) * 2010-12-10 2012-07-11 联芯科技有限公司 Method for building synchronous status information among real-time media streams, device adopting same and SCC AS
US20130179821A1 (en) * 2012-01-11 2013-07-11 Samuel M. Bauer High speed logging system
CN104410807A (en) * 2014-11-24 2015-03-11 深圳市华宝电子科技有限公司 Method and device for synchronously replaying multi-channel video

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116684837A (en) * 2023-07-19 2023-09-01 贵阳朗玛通信科技有限公司 Billing preprocessing method and device for ticket
CN116684837B (en) * 2023-07-19 2023-10-03 贵阳朗玛通信科技有限公司 Billing preprocessing method and device for ticket

Also Published As

Publication number Publication date
CN107306199A (en) 2017-10-31
CN107306199B (en) 2020-03-27

Similar Documents

Publication Publication Date Title
CN108712654B (en) Audio and video stream transcoding method and device
US9781474B2 (en) Content playback information estimation apparatus and method and program
US11748643B2 (en) System and method for machine learning based QoE prediction of voice/video services in wireless networks
US20130096904A1 (en) Quality of User Experience Testing for Video Transmissions
WO2020006912A1 (en) Method and device for analyzing network transmission quality, computer equipment and storage medium
CN110300003B (en) Data processing method and client
CN105553939A (en) Method and device for determining blockage of streaming media
US20100220628A1 (en) Method and apparatus for realizing a test
WO2022116811A1 (en) Method and device for predicting definition of video having encrypted traffic
WO2017181808A1 (en) Network element data playback method and apparatus
CN111164947A (en) Method and device for encoding audio and/or video data
JP4460506B2 (en) User experience quality estimation apparatus, method, and program
US8244900B2 (en) Measuring method, measuring apparatus and computer program
US10440087B2 (en) Estimation of losses in a video stream
CN111385163A (en) Flow analysis and detection method and device
CN113612516A (en) Compression test method, system and equipment for satellite communication data packet
CN113411218B (en) Method and device for evaluating instant messaging quality and electronic equipment
CN115243077A (en) Audio and video resource on-demand method and device, computer equipment and storage medium
CN106993308A (en) A kind of QoS of voice monitoring method, equipment and the system of VoLTE networks
CN116866214B (en) Regional network quality analysis system based on statistical session
CN112787876B (en) Performance evaluation method and device of session initiation protocol server
CN114258069B (en) Voice call quality evaluation method, device, computing equipment and storage medium
CN115883420A (en) Time delay statistical method and system in interactive system, storage medium and electronic equipment
CN115695463A (en) Cloud edge cooperative self-adaptive data transmission management method and system based on fence mechanism
CN116866214A (en) Regional network quality analysis system based on statistical session

Legal Events

Date Code Title Description
NENP Non-entry into the national phase

Ref country code: DE

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17785293

Country of ref document: EP

Kind code of ref document: A1

122 Ep: pct application non-entry in european phase

Ref document number: 17785293

Country of ref document: EP

Kind code of ref document: A1