CN117472723A - Playback verification method and device for data stream link - Google Patents

Playback verification method and device for data stream link Download PDF

Info

Publication number
CN117472723A
CN117472723A CN202210856651.5A CN202210856651A CN117472723A CN 117472723 A CN117472723 A CN 117472723A CN 202210856651 A CN202210856651 A CN 202210856651A CN 117472723 A CN117472723 A CN 117472723A
Authority
CN
China
Prior art keywords
data
test
flow direction
direction link
micro services
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
CN202210856651.5A
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.)
Douyin Vision Co Ltd
Original Assignee
Douyin Vision 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 Douyin Vision Co Ltd filed Critical Douyin Vision Co Ltd
Priority to CN202210856651.5A priority Critical patent/CN117472723A/en
Publication of CN117472723A publication Critical patent/CN117472723A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3692Test management for test results analysis
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Software Systems (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The embodiment of the disclosure provides a playback verification method and device for a data stream link, wherein the method comprises the following steps: the method comprises the steps of obtaining transmission data between micro services of on-line traffic and a transmission flow direction link of the transmission data between the micro services of the on-line traffic, and generating a test flow direction link of the transmission data between the micro services of the test traffic, wherein the micro services of the test traffic are identical to those of the micro services of the on-line traffic, the test traffic is obtained by simulating the on-line traffic, and a verification result is determined according to the transmission flow direction link and the test flow direction link, wherein the verification result is used for representing whether the transmission flow direction link between the micro services of the test traffic is normal or not.

Description

Playback verification method and device for data stream link
Technical Field
The embodiment of the disclosure relates to the technical field of computer and network communication, in particular to a playback verification method and device for a data stream link.
Background
Microservices are a style of software architecture that combines complex large applications in a modular fashion based on small functional blocks (Small Building Blocks) that focus on single responsibilities and functions. In the combined application program, each micro-service runs in an independent process so as to realize the function of the application program based on mutual coordination and cooperation among the micro-services.
With the rise of micro service architecture, the number of services in the system is increasing, and for data-intensive services, the micro services can communicate with each other through a communication mechanism (message queue or remote procedure call) so as to realize high-throughput data transmission and sharing.
However, how to perform playback verification on a data traffic link obtained through a communication mechanism between micro services is a problem to be solved.
Disclosure of Invention
The embodiment of the disclosure provides a playback verification method and device for a data stream link, so as to improve the effectiveness and reliability of playback verification.
In a first aspect, an embodiment of the present disclosure provides a playback verification method for a data stream link, including:
acquiring transfer data between micro services of online traffic and a transfer flow direction link of the transfer data between the micro services of the online traffic;
Generating a test flow direction link of the transfer data between micro services of test flow, wherein the micro services of the test flow are the same as those of the on-line flow, and the test flow is obtained by simulating the on-line flow;
and determining a verification result according to the transfer flow direction link and the test flow direction link, wherein the verification result is used for representing whether the transfer flow direction link between the micro services of the test flow is normal or not.
In a second aspect, an embodiment of the present disclosure provides a playback verification apparatus for a data stream link, including:
the acquisition unit is used for acquiring transmission data between the micro services of the online traffic and a transmission flow direction link of the transmission data between the micro services of the online traffic;
the generation unit is used for generating a test flow direction link of the transfer data between micro services of the test flow, wherein the micro services of the test flow are identical to the micro services of the online flow, and the test flow is obtained by simulating the online flow;
and the determining unit is used for determining a verification result according to the transfer flow direction link and the test flow direction link, wherein the verification result is used for representing whether the transfer flow direction link between the micro services of the test flow is normal or not.
In a third aspect, an embodiment of the present disclosure provides an electronic device, including: at least one processor and memory;
the memory stores computer-executable instructions;
the at least one processor executes the computer-executable instructions stored by the memory to cause the at least one processor to perform the playback verification method of the data stream link as described above in the first aspect and the various possible designs of the first aspect.
In a fourth aspect, embodiments of the present disclosure provide a computer readable storage medium having stored therein computer executable instructions that when executed by a processor implement a playback verification method for a data stream link as described in the first aspect and the various possible designs of the first aspect.
According to a fifth aspect of the present disclosure, there is provided a computer program product comprising: a computer program stored in a readable storage medium, from which it can be read by at least one processor of an electronic device, the at least one processor executing the computer program causing the electronic device to perform the method of the first aspect.
According to the playback verification method and device for the data flow link, the data flow links corresponding to the online flow and the test flow are respectively determined, so that the technical characteristics of verification results are determined based on the data flow links corresponding to the online flow and the test flow, and the technical effects of reliability and effectiveness of playback verification for the data flow links are achieved.
Drawings
In order to more clearly illustrate the embodiments of the present disclosure or the solutions in the prior art, a brief description will be given below of the drawings that are needed in the embodiments or the description of the prior art, it being obvious that the drawings in the following description are some embodiments of the present disclosure, and that other drawings may be obtained from these drawings without inventive effort to a person of ordinary skill in the art.
FIG. 1 is a schematic diagram of a playback verification method of a data stream link according to one embodiment of the present disclosure;
FIG. 2 is a schematic diagram of a playback verification method of a data stream link according to another embodiment of the present disclosure;
fig. 3 is a schematic diagram of a playback verification method of a data stream link according to another embodiment of the present disclosure;
FIG. 4 is a schematic diagram of a transfer flow direction link according to the present disclosure;
FIG. 5 is a schematic diagram of a test flow direction link according to the present disclosure;
FIG. 6 is a schematic diagram of a playback verification device of a data stream link according to one embodiment of the present disclosure;
FIG. 7 is a schematic diagram of a playback verification device of a data stream link according to another embodiment of the present disclosure;
fig. 8 is a schematic hardware structure of an electronic device according to an embodiment of the disclosure.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present disclosure more apparent, the technical solutions of the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present disclosure, and it is apparent that the described embodiments are some embodiments of the present disclosure, but not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without inventive effort, based on the embodiments in this disclosure are intended to be within the scope of this disclosure.
With the rise of micro service frameworks, the number of services in a system is increased, for data-intensive services, high-throughput data transmission and sharing are realized among the micro services through message queues, and even in a scene with low aging requirements, the communication can be performed by replacing remote procedure calls (Remote Procedure Cal, RPC) through the message queues. A message queue is understood to mean a communication mode between processes or between different threads of the same process.
However, how to verify the data flow to the link is a urgent problem to be solved.
The inventors of the present disclosure have creatively worked to obtain the inventive concept of the present disclosure: and determining a transfer flow direction link of transfer data between the micro services in the on-line traffic, and determining a test flow direction link of the transfer data between the micro services in the test traffic, so as to determine a verification result based on the transfer flow direction link and the test flow direction link.
The following describes the technical solutions of the present disclosure and how the technical solutions of the present disclosure solve the above technical problems in detail with specific embodiments. The following embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. Embodiments of the present disclosure will be described below with reference to the accompanying drawings.
Referring to fig. 1, fig. 1 is a schematic diagram of a playback verification method of a data stream link according to an embodiment of the present disclosure.
As shown in fig. 1, the method includes:
s101: and acquiring transfer data between the micro services of the online traffic and a transfer flow direction link of the transfer data between the micro services of the online traffic.
For example, the execution body of the embodiment may be a playback verification device (hereinafter simply referred to as a playback verification device) of a data stream link, and the playback verification device may be a server (such as a cloud server, a local server, or a server cluster, or the like), or may be a computer, or may be a terminal device, or may be a processor, or may be a chip, or the like.
The transfer data refers to data transmitted between micro services, for example, the micro service a transmits the data to the micro service B, the data transmitted by the micro service a may be referred to as transfer data, and the micro service a is a party transmitting the data and may be referred to as a data producer or simply as a producer. Accordingly, the micro service B is a party receiving data, and may be referred to as a data receiving party or a consumer, and the consumer reading data may be referred to as consuming data, that is, a process of the micro service B reading data sent by the micro service a (that is, a process of reading transfer data), and may be referred to as consuming data.
The on-line traffic and the test traffic are relative concepts, and the on-line traffic can be understood as an environment for forming a transmission flow direction link, that is, can be understood as an environment for transmitting data between micro services to form a flow direction link in an actual scene.
S102: a test flow direction link is generated that conveys data between micro services of the test traffic.
The micro-service of the test flow is the same as the micro-service of the online flow, and the test flow is obtained by simulating the online flow.
In connection with the above analysis, the test traffic is a relative concept to the on-line traffic, and the test traffic can be understood as an environment for testing the flow direction link of the data transmission in the on-line traffic. The micro-services in the test traffic are generated by simulating the micro-services of the on-line traffic.
For example, if the online traffic includes the micro service a and the micro service B, in the test traffic, the simulated micro service a obtains the simulated micro service a 'and the simulated micro service B obtains the micro service B'. The micro service a and the micro service a' are the same micro service, but the environments are different, one is online traffic (i.e., a scenario of actual application), and the other is test traffic (i.e., a test scenario for testing the scenario of actual application). Similarly, the micro service B and the micro service B' are the same micro service, but the environments are different, one is online traffic (i.e. the actual application scene) and the other is test traffic (i.e. the test scene for testing the actual application scene)
Accordingly, a traffic flow link may be understood as a data flow link for transferring data from micro service A to micro service B, and a test flow link may be understood as a data flow link for transferring data from micro service A 'to micro service B'.
S103: and determining a verification result according to the transfer flow direction link and the test flow direction link.
The verification result is used for representing whether the transmission flow direction link between the micro services of the test flow is normal or not.
For example, the transfer flow direction link may be compared with the test flow direction link to obtain a verification result, where the verification result may indicate that the transfer flow direction link between the micro services of the test traffic is normal, and may also indicate that the transfer flow direction link between the micro services of the test traffic is abnormal.
Based on the above analysis, the embodiment of the disclosure provides a playback verification method for a data stream link, including: the method comprises the steps of obtaining transmission data between micro services of on-line traffic and a transmission flow direction link of the transmission data between the micro services of the on-line traffic, and generating a test flow direction link of the transmission data between the micro services of the test traffic, wherein the micro services of the test traffic are identical to those of the micro services of the on-line traffic, the test traffic is obtained by simulating the on-line traffic, and a verification result is determined according to the transmission flow direction link and the test flow direction link, wherein the verification result is used for representing whether the transmission flow direction link between the micro services of the test traffic is normal or not.
Referring to fig. 2, fig. 2 is a schematic diagram of a playback verification method of a data stream link according to another embodiment of the present disclosure.
As shown in fig. 2, the method includes:
s201: and acquiring a message queue among the micro services of the online traffic, and reading data from the message queue of the online traffic to obtain transfer data.
It should be understood that, in order to avoid the complicated description, the technical features of the present embodiment that are the same as those of the foregoing embodiment are not described in detail.
Illustratively, as shown in fig. 3, the micro services of the online traffic include a micro service a and a micro service B, the micro service a is a producer micro service, the micro service B is a receiver micro service, and a message queue between the micro service a and the micro service B is a message queue a-B.
The playback verification may include two phases, one is a message recording phase, the other is a message playback phase, the message recording phase may be understood as a message data phase, that is, a phase of acquiring transfer data, and the message playback phase may be understood as a phase of performing playback testing based on the transfer data.
Correspondingly, the playback verification device may include a message recording device and a message playback device, where the message recording device and the message playback device may be integrated into a single device, or may be two independent devices, and the embodiment is not limited.
If the message recording device and the message playback device are two separate devices, the message recording device can be understood as a device for consuming data, i.e. a device for acquiring the transfer data. The message playback means may be means for performing a playback test based on the delivery data.
As shown in fig. 3, the message recording phase may include data collection (i.e., consumption data), such as collecting delivery data from message queues a-B.
S202: transfer data from the online traffic agent to the test traffic.
Illustratively, as shown in FIG. 3, the delivery data may be proxied from online traffic to test traffic by way of a proxy service.
S203: and preprocessing the transmission data in the test flow to obtain test data, and generating a test flow direction link according to the test data.
Wherein the micro-services of the test traffic are the same as those of the on-line traffic.
In combination with the analysis, the message recording stage may include the process of data acquisition, and may further include a process of proxy of the acquired transfer data to the test traffic, and preprocessing the transfer data in the test traffic to obtain the test data, and the message playback stage may include a process of generating a test flow link according to the test data.
In this embodiment, the data transmission agent is used to transmit the data to the test flow, so as to preprocess the transmitted data in the test flow, and generate a test flow direction link based on the test data obtained by the preprocessing, so as to realize playback verification, and the test flow is highly attached to the online flow, so that the difference between the online flow and the test flow is reduced, so that the playback verification has a high reliable verification basis, and the playback verification has a technical effect of higher accuracy and reliability.
In some embodiments, preprocessing the transmission data to obtain test data may include the following steps:
a first step of: and performing reverse-serialization analysis on the transmitted data to obtain reverse-serialization analysis data.
The reverse-serialization analysis refers to a process of recovering the transferred data in the format of the byte sequence into an object, so that the object corresponding to the transferred data can be stored and reconstructed by reverse-serialization reconstruction according to the object state and the description information stored in the byte stream of the transferred data, that is, by performing the reverse-serialization analysis on the transferred data.
And a second step of: and (5) desensitizing the inverse sequence analysis data to obtain desensitized data.
In some embodiments, the desensitization field may be preconfigured to desensitize the inverse sequence analysis data by the desensitization field to obtain desensitized data. For example, the information such as telephone numbers in the reverse-sequence analysis data may be subjected to desensitization processing to obtain desensitized data.
And a third step of: and carrying out serialization processing on the desensitized data to obtain test data.
Accordingly, serialization processing may be understood as a process of converting an object into a byte sequence, and by serialization processing of desensitized data, the integrity and transitability of the object may be ensured when the object is transferred and stored, i.e., the object corresponding to the desensitized data is converted into an ordered byte stream for transmission over a network or stored in a local file.
It should be noted that, in this embodiment, by combining the inverse serialization parsing, the desensitization processing, and the serialization processing, the test data is obtained, so that information leakage in the inverse serialization parsing data can be avoided, and the technical effect of playback verification security is improved.
In some embodiments, after the desensitization data is obtained, data for representing the user characteristics can be obtained from the desensitization data, the data for representing the user characteristics is replaced by preset test characteristic data, and a test flow direction link is generated according to the test characteristic data.
The data used for representing the user characteristics can be data such as an account number of the user, and correspondingly, the account number of the user can be replaced by a preset test account number so as to generate a test flow link.
Similarly, in this embodiment, the user account is replaced by the preset test account to generate the test flow link, so that leakage of user information can be avoided, and the technical effect of playback verification safety is improved.
If the desensitization data is processed in a serialization way after the desensitization data, the deserialization processing is needed on the basis, the data after the deserialization processing is obtained, and the data used for representing the user characteristics is obtained from the data after the deserialization processing.
In combination with the above analysis, the playback verification may include two phases, one is a message recording phase and the other is a message playback phase, and the message recording phase may include the process of collecting and transmitting data to the agent to test the traffic in the above embodiment.
And as shown in fig. 3, the message recording stage may further include preprocessing as described in the foregoing embodiment, where the preprocessing may specifically include desensitizing (i.e., desensitizing the inverse sequence analysis data to obtain desensitized data) and replacing (i.e., obtaining data characterizing the user characteristics from the desensitized data, replacing the data characterizing the user characteristics with preset test feature data), and storing the preprocessed data in a database, where the data may be a relational database management system (such as MySQL shown in fig. 3) or a database stored for distributed files (such as MongoDB shown in fig. 3).
Accordingly, as shown in fig. 3, the message playback phase may read test data from the database through the data reading service to generate a test stream link based on the test data.
In some embodiments, the test data in the database is serialized data, so that during the message playback phase, the serialized data may be read from the database by the data reading service, and the serialized data is deserialized to obtain deserialized data, and a test flow link is generated based on the deserialized data.
In some embodiments, after the data after the deserialization is obtained, the data structure of the data after the deserialization may be further adjusted so that the data structure of the data after the deserialization is the same as the data structure of the transfer data, and a message queue in which the transfer data is transmitted between micro services of the test traffic is obtained, so that the transfer data of the preset data structure is sent to the message queue of the test traffic.
Since the micro services in the test traffic are the same as those in the online traffic, the message queues of the test traffic can be understood as message queues between the micro services obtained by simulating the online traffic, i.e. the message queues in the test traffic are highly similar to those in the online traffic, so that the test flow direction link is highly simulated and reproduced for the transmission flow direction link, thereby improving the effectiveness and reliability of playback verification.
And the data structure for generating the data of the test flow direction link is the same as the data structure for generating the data of the transfer flow direction link, so that the data of the test flow direction link and the data of the transfer flow direction link have stronger consistency in the data structure, thereby reducing errors of playback verification and improving the effectiveness and reliability of the playback verification.
Illustratively, as shown in FIG. 3, test data may be scheduled to a message link of a test scenario by a task scheduling service, generating a test flow direction link.
S204: and determining a verification result according to the transfer flow direction link and the test flow direction link.
The verification result is used for representing whether the transmission flow direction link between the micro services of the test flow is normal or not.
For example, as shown in fig. 3, the verification service may compare the transmission flow direction data with the test flow direction data, so as to verify whether the transmission flow direction link between the micro services of the test flow is normal, and obtain a verification result.
In some embodiments, if the delivery flow direction link is the same as the test flow direction link, the verification result characterizes that the delivery flow direction link between micro services of the test traffic is normal. If the transfer flow direction link is different from the test flow direction link, the verification result represents that the transfer flow direction link between the micro services of the test flow is abnormal.
Exemplary verification results will now be described with reference to fig. 4 and 5. Wherein, fig. 4 is a transfer flow direction link, and fig. 5 is a test flow direction link.
As shown in fig. 4, the transfer flow direction link is: message queue of online traffic- & gt micro-service 1-1 and micro-service 1-2, micro-service 1- & gt micro-service 2-1 and micro-service 2-2, micro-service 2- & gt database b table.
As shown in fig. 5, the transfer flow direction link is: message queue for testing traffic- & gt micro-service 1-1 and micro-service 1-2, micro-service 1- & gt micro-service 2-1 and micro-service 2-2, micro-service 2- & gt database c table.
Because the table A database b and the table A database c are different tables in the database A, the transmission flow direction link is different from the test flow direction link, and the verification result represents that the transmission flow direction link between the micro services of the test flow is normal.
Referring to fig. 6, fig. 6 is a schematic diagram of a playback verification device for a data stream link according to one embodiment of the present disclosure.
As shown in fig. 6, the apparatus 600 includes:
the acquiring unit 601 is configured to acquire transfer data between microservices of online traffic and a transfer flow direction link between microservices of the online traffic of the transfer data.
The generating unit 602 is configured to generate a test flow direction link of the transfer data between micro services of a test flow, where the micro services of the test flow are the same as the micro services of the online flow, and the test flow is obtained by simulating the online flow.
And the determining unit 603 is configured to determine a verification result according to the delivery flow direction link and the test flow direction link, where the verification result is used to characterize whether the delivery flow direction link between the micro services of the test flow is normal.
Referring to fig. 7, fig. 7 is a schematic diagram of a playback verification apparatus for a data stream link according to another embodiment of the present disclosure.
As shown in fig. 7, the apparatus 700 includes:
an obtaining unit 701, configured to obtain transfer data between microservices of online traffic and a transfer flow direction link between microservices of the online traffic of the transfer data.
As can be seen in conjunction with fig. 7, in some embodiments, the acquiring unit 701 includes:
a second obtaining subunit 7011 is configured to obtain a message queue between the microservices of the online traffic.
A reading subunit 7012, configured to read data from the message queue of the online traffic, and obtain the delivery data.
And the generating unit 702 is configured to generate a test flow direction link between micro services of the test flow, where the micro services of the test flow are the same as the micro services of the online flow, and the test flow is obtained by simulating the online flow.
As can be seen in conjunction with fig. 7, in some embodiments, the generating unit 702 includes:
a first obtaining subunit 7021 is configured to obtain a message queue for transmitting the delivery data between the microservices of the test traffic.
The processing subunit 7022 is configured to perform deserialization processing on the serialized data, to obtain deserialized data.
The second generating subunit 7023 is configured to generate, according to the data after the deserialization processing, transfer data of a preset data structure, where the preset data structure is the same as a data structure of the transfer data generated by the on-line traffic.
A sending subunit 7024, configured to send the transfer data of the preset data structure to the message queue of the test flow.
A first generating subunit 7025, configured to generate the test flow direction link according to the transmission flow direction of the transfer data in the message queue of the test flow.
As can be seen in conjunction with fig. 7, in some embodiments, the generating unit 702 includes:
proxy subunit 7026 is configured to proxy the delivery data from the online traffic to the test traffic.
A preprocessing subunit 7027, configured to preprocess the transmission data in the test traffic to obtain test data.
In some embodiments, the preprocessing subunit 7027 includes:
the analysis module is used for carrying out reverse-sequence analysis on the transfer data to obtain reverse-sequence analysis data;
the desensitization module is used for carrying out desensitization treatment on the inverse sequence analysis data to obtain desensitized data;
and the first processing module is used for carrying out serialization processing on the desensitization data to obtain the test data.
Third generation subunit 7028 is configured to generate the test flow direction link according to the test data.
In some embodiments, third generation subunit 7028 comprises:
the second processing module is used for performing deserialization processing on the test data to obtain deserialized data;
the acquisition module is used for acquiring data used for representing the user characteristics from the data subjected to the inverse serialization processing;
the replacing module is used for replacing the data used for representing the user characteristics with preset test characteristic data;
and the generating module is used for generating the test flow direction link according to the test characteristic data.
And the determining unit 703 is configured to determine a verification result according to the delivery flow direction link and the test flow direction link, where the verification result is used to characterize whether the delivery flow direction link between the micro services of the test flow is normal.
In some embodiments, if the delivery flow direction link is the same as the test flow direction link, the verification result indicates that the delivery flow direction link between the micro services of the test flow is normal; and if the transfer flow direction link is different from the test flow direction link, the verification result represents that the transfer flow direction link between the micro services of the test flow is abnormal.
According to embodiments of the present application, an electronic device and a readable storage medium are also provided.
According to an embodiment of the present application, there is also provided a computer program product comprising: a computer program stored in a readable storage medium, from which at least one processor of an electronic device can read, the at least one processor executing the computer program causing the electronic device to perform the solution provided by any one of the embodiments described above.
Referring to fig. 8, there is shown a schematic structural diagram of an electronic device 800 suitable for use in implementing embodiments of the present disclosure, which electronic device 800 may be a terminal device or a server. The terminal device may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a personal digital assistant (Personal Digital Assistant, PDA for short), a tablet (Portable Android Device, PAD for short), a portable multimedia player (Portable Media Player, PMP for short), an in-vehicle terminal (e.g., an in-vehicle navigation terminal), and the like, and a fixed terminal such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 8 is merely an example and should not be construed to limit the functionality and scope of use of the disclosed embodiments.
As shown in fig. 8, the electronic device 800 may include a processing means (e.g., a central processor, a graphics processor, etc.) 801 that may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 802 or a program loaded from a storage 808 into a random access Memory (Random Access Memory, RAM) 803. In the RAM803, various programs and data required for the operation of the electronic device 800 are also stored. The processing device 801, the ROM 802, and the RAM803 are connected to each other by a bus 804. An input/output (I/O) interface 805 is also connected to the bus 804.
In general, the following devices may be connected to the I/O interface 805: input devices 806 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, and the like; an output device 807 including, for example, a liquid crystal display (Liquid Crystal Display, LCD for short), a speaker, a vibrator, and the like; storage 808 including, for example, magnetic tape, hard disk, etc.; communication means 809. The communication means 809 may allow the electronic device 800 to communicate wirelessly or by wire with other devices to exchange data. While fig. 8 shows an electronic device 800 having various means, it is to be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via communication device 809, or installed from storage device 808, or installed from ROM 802. The above-described functions defined in the methods of the embodiments of the present disclosure are performed when the computer program is executed by the processing device 801.
It should be noted that the computer readable medium described in the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
The computer readable medium may be contained in the electronic device; or may exist alone without being incorporated into the electronic device.
The computer-readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to perform the methods shown in the above-described embodiments.
Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a local area network (Local Area Network, LAN for short) or a wide area network (Wide Area Network, WAN for short), or it may be connected to an external computer (e.g., connected via the internet using an internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments of the present disclosure may be implemented by means of software, or may be implemented by means of hardware. The name of the unit does not in any way constitute a limitation of the unit itself, for example the first acquisition unit may also be described as "unit acquiring at least two internet protocol addresses".
The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a system on a chip (SOC), a Complex Programmable Logic Device (CPLD), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
In a first aspect, according to one or more embodiments of the present disclosure, there is provided a playback verification method of a data stream link, including:
acquiring transfer data between micro services of online traffic and a transfer flow direction link of the transfer data between the micro services of the online traffic;
generating a test flow direction link of the transfer data between micro services of test flow, wherein the micro services of the test flow are the same as those of the on-line flow, and the test flow is obtained by simulating the on-line flow;
and determining a verification result according to the transfer flow direction link and the test flow direction link, wherein the verification result is used for representing whether the transfer flow direction link between the micro services of the test flow is normal or not.
According to one or more embodiments of the present disclosure, the generating a test flow direction link of the transfer data between micro services of a test flow includes:
acquiring a message queue of the transfer data transmitted between the micro services of the test flow;
and generating the test flow direction link according to the transmission flow direction of the transfer data in the message queue of the test flow.
According to one or more embodiments of the present disclosure, the transfer data is serialized data; before the generating the test flow direction link according to the message queue of the test flow, the method further comprises:
Performing deserialization processing on the serialized data to obtain deserialized data, and generating transmission data of a preset data structure according to the deserialized data, wherein the preset data structure is the same as the data structure of the transmission data generated by the on-line traffic;
and sending the transmission data of the preset data structure to the message queue of the test flow.
According to one or more embodiments of the present disclosure, if the transfer flow direction link is the same as the test flow direction link, the verification result characterizes the test flow as normal test flow; and if the transfer flow direction link is different from the test flow direction link, the verification result represents that the test flow is abnormal.
According to one or more embodiments of the present disclosure, the acquiring transfer data between micro services of an online traffic includes:
and acquiring a message queue among the micro services of the online traffic, and reading data from the message queue of the online traffic to obtain the transfer data.
According to one or more embodiments of the present disclosure, the generating a test flow direction link of the transfer data between micro services of a test flow includes:
Proxy the transfer data from the online traffic to the test traffic;
and preprocessing the transfer data in the test flow to obtain test data, and generating the test flow direction link according to the test data.
According to one or more embodiments of the present disclosure, the preprocessing the transfer data to obtain test data includes:
performing reverse-serialization analysis on the transfer data to obtain reverse-serialization analysis data;
desensitizing the inverse sequence analysis data to obtain desensitized data;
and carrying out serialization processing on the desensitization data to obtain the test data.
According to one or more embodiments of the present disclosure, the generating the test flow direction link according to the test data includes:
performing deserialization processing on the test data to obtain deserialized data;
acquiring data for representing user characteristics from the data subjected to the inverse serialization processing;
and replacing the data used for representing the user characteristics with preset test characteristic data, and generating the test flow direction link according to the test characteristic data.
In a second aspect, according to one or more embodiments of the present disclosure, there is provided a playback verification apparatus of a data stream link, including:
The acquisition unit is used for acquiring transmission data between the micro services of the online traffic and a transmission flow direction link of the transmission data between the micro services of the online traffic;
the generation unit is used for generating a test flow direction link of the transfer data between micro services of the test flow, wherein the micro services of the test flow are identical to the micro services of the online flow, and the test flow is obtained by simulating the online flow;
and the determining unit is used for determining a verification result according to the transfer flow direction link and the test flow direction link, wherein the verification result is used for representing whether the transfer flow direction link between the micro services of the test flow is normal or not.
According to one or more embodiments of the present disclosure, the generating unit includes:
a first obtaining subunit, configured to obtain a message queue that is transmitted by the transfer data between the micro services of the test flow;
and the first generation subunit is used for generating the test flow direction link according to the transmission flow direction of the transfer data in the message queue of the test flow.
According to one or more embodiments of the present disclosure, the generating unit further includes:
a processing subunit, configured to perform deserialization processing on the serialized data to obtain deserialized data;
The second generation subunit is used for generating transmission data of a preset data structure according to the data subjected to the deserialization processing, wherein the preset data structure is the same as the data structure of the transmission data generated by the on-line traffic;
and the sending subunit is used for sending the transmission data of the preset data structure to the message queue of the test flow.
According to one or more embodiments of the present disclosure, if the delivery flow direction link is the same as the test flow direction link, the verification result indicates that the delivery flow direction link between micro services of the test flow is normal; and if the transfer flow direction link is different from the test flow direction link, the verification result represents that the transfer flow direction link between the micro services of the test flow is abnormal.
According to one or more embodiments of the present disclosure, the acquisition unit includes:
the second acquisition subunit is used for acquiring the message queue between the micro services of the online traffic;
and the reading subunit is used for reading data from the message queue of the online traffic to obtain the transmission data.
According to one or more embodiments of the present disclosure, the generating unit includes:
a proxy subunit for proxy the transfer data from the online traffic to the test traffic;
The preprocessing subunit is used for preprocessing the transmission data in the test flow to obtain test data;
and the third generating unit is used for generating the test flow direction link according to the test data.
According to one or more embodiments of the present disclosure, the preprocessing subunit includes:
the analysis module is used for carrying out reverse-sequence analysis on the transfer data to obtain reverse-sequence analysis data;
the desensitization module is used for carrying out desensitization treatment on the inverse sequence analysis data to obtain desensitized data;
and the first processing module is used for carrying out serialization processing on the desensitization data to obtain the test data.
According to one or more embodiments of the present disclosure, the third generating subunit includes:
the second processing module is used for performing deserialization processing on the test data to obtain deserialized data;
the acquisition module is used for acquiring data used for representing the user characteristics from the data subjected to the inverse serialization processing;
the replacing module is used for replacing the data used for representing the user characteristics with preset test characteristic data;
and the generating module is used for generating the test flow direction link according to the test characteristic data.
In a third aspect, according to one or more embodiments of the present disclosure, there is provided an electronic device comprising: at least one processor and memory;
the memory stores computer-executable instructions;
the at least one processor executes the computer-executable instructions stored by the memory to cause the at least one processor to perform the playback verification method of the data stream link as described above in the first aspect and the various possible designs of the first aspect.
In a fourth aspect, according to one or more embodiments of the present disclosure, there is provided a computer-readable storage medium having stored therein computer-executable instructions which, when executed by a processor, implement a playback verification method for a data stream link as described above in the first aspect and in the various possible designs of the first aspect.
The foregoing description is only of the preferred embodiments of the present disclosure and description of the principles of the technology being employed. It will be appreciated by persons skilled in the art that the scope of the disclosure referred to in this disclosure is not limited to the specific combinations of features described above, but also covers other embodiments which may be formed by any combination of features described above or equivalents thereof without departing from the spirit of the disclosure. Such as those described above, are mutually substituted with the technical features having similar functions disclosed in the present disclosure (but not limited thereto).
Moreover, although operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. In certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the present disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are example forms of implementing the claims.

Claims (12)

1. A playback verification method for a data stream link, comprising:
acquiring transfer data between micro services of online traffic and a transfer flow direction link of the transfer data between the micro services of the online traffic;
Generating a test flow direction link of the transfer data between micro services of test flow, wherein the micro services of the test flow are the same as those of the on-line flow, and the test flow is obtained by simulating the on-line flow;
and determining a verification result according to the transfer flow direction link and the test flow direction link, wherein the verification result is used for representing whether the transfer flow direction link between the micro services of the test flow is normal or not.
2. The method of claim 1, wherein generating the test flow direction link of the delivery data between the micro services of the test traffic comprises:
acquiring a message queue of the transfer data transmitted between the micro services of the test flow;
and generating the test flow direction link according to the transmission flow direction of the transfer data in the message queue of the test flow.
3. The method of claim 2, wherein the delivery data is serialized data; before the generating the test flow direction link according to the message queue of the test flow, the method further comprises:
performing deserialization processing on the serialized data to obtain deserialized data, and generating transmission data of a preset data structure according to the deserialized data, wherein the preset data structure is the same as the data structure of the transmission data of the online traffic;
And sending the transmission data of the preset data structure to the message queue of the test flow.
4. A method according to any one of claims 1-3, wherein if the delivery flow direction link is the same as the test flow direction link, the verification result characterizes the delivery flow direction link between micro services of the test traffic as a normal delivery flow direction link; and if the transfer flow direction link is different from the test flow direction link, the verification result represents that the transfer flow direction link between the micro services of the flow is an abnormal transfer flow direction link.
5. The method according to any one of claims 1-4, wherein the acquiring the transfer data between the micro services of the on-line traffic comprises:
and acquiring a message queue among the micro services of the online traffic, and reading data from the message queue of the online traffic to obtain the transfer data.
6. The method of claim 5, wherein generating the test flow direction link of the delivery data between the micro services of the test traffic comprises:
proxy the transfer data from the online traffic to the test traffic;
and preprocessing the transfer data in the test flow to obtain test data, and generating the test flow direction link according to the test data.
7. The method of claim 6, wherein preprocessing the transfer data to obtain test data comprises:
performing reverse-serialization analysis on the transfer data to obtain reverse-serialization analysis data;
desensitizing the inverse sequence analysis data to obtain desensitized data;
and carrying out serialization processing on the desensitization data to obtain the test data.
8. The method of claim 7, wherein generating the test flow link from the test data comprises:
performing deserialization processing on the test data to obtain deserialized data;
acquiring data for representing user characteristics from the data subjected to the inverse serialization processing;
and replacing the data used for representing the user characteristics with preset test characteristic data, and generating the test flow direction link according to the test characteristic data.
9. A playback verification device for a data stream link, comprising:
the acquisition unit is used for acquiring transmission data between the micro services of the online traffic and a transmission flow direction link of the transmission data between the micro services of the online traffic;
The generation unit is used for generating a test flow direction link of the transfer data between micro services of the test flow, wherein the micro services of the test flow are identical to the micro services of the online flow, and the test flow is obtained by simulating the online flow;
and the determining unit is used for determining a verification result according to the transfer flow direction link and the test flow direction link, wherein the verification result is used for representing whether the transfer flow direction link between the micro services of the test flow is normal or not.
10. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-8.
11. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of any one of claims 1-8.
12. A computer program product comprising a computer program which, when executed by a processor, implements the steps of the method of any of claims 1-8.
CN202210856651.5A 2022-07-20 2022-07-20 Playback verification method and device for data stream link Pending CN117472723A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210856651.5A CN117472723A (en) 2022-07-20 2022-07-20 Playback verification method and device for data stream link

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210856651.5A CN117472723A (en) 2022-07-20 2022-07-20 Playback verification method and device for data stream link

Publications (1)

Publication Number Publication Date
CN117472723A true CN117472723A (en) 2024-01-30

Family

ID=89635217

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210856651.5A Pending CN117472723A (en) 2022-07-20 2022-07-20 Playback verification method and device for data stream link

Country Status (1)

Country Link
CN (1) CN117472723A (en)

Similar Documents

Publication Publication Date Title
CN111679990B (en) Test data generation method and device, readable medium and electronic equipment
US11711441B2 (en) Method and apparatus for publishing video synchronously, electronic device, and readable storage medium
CN111931962B (en) Information display method and device and electronic equipment
CN111309304B (en) Method, device, medium and electronic equipment for generating IDL file
CN110727566A (en) Method, device, medium and electronic equipment for acquiring process crash information
CN111324834B (en) Method, device, electronic equipment and computer readable medium for image-text mixed arrangement
CN111324376B (en) Function configuration method, device, electronic equipment and computer readable medium
CN110764983A (en) Test method, device, medium and electronic equipment
CN116700907B (en) Service call demand document storage method, device, electronic equipment and readable medium
CN111355784B (en) Method, device, medium and electronic equipment for processing request information
CN111752644A (en) Interface simulation method, device, equipment and storage medium
CN113391860A (en) Service request processing method and device, electronic equipment and computer storage medium
CN117472723A (en) Playback verification method and device for data stream link
CN116149977A (en) SDK test method and device, electronic equipment and storage medium
CN111538717B (en) Data processing method, device, electronic equipment and computer readable medium
CN111338822B (en) Message processing method and device
CN113704079A (en) Interface testing method and device based on Protobuf
CN115827415B (en) System process performance test method, device, equipment and computer medium
CN112346728B (en) Device adaptation method, apparatus, device and computer readable medium
CN116489116A (en) Message sending request processing method and device, electronic equipment and storage medium
CN115225916B (en) Video processing method, device and equipment
CN111461227B (en) Sample generation method, device, electronic equipment and computer readable medium
CN112270170B (en) Implicit expression statement analysis method and device, medium and electronic equipment
CN111831531B (en) Test method and device
CN111324512B (en) Method, apparatus, electronic device, and computer-readable medium for generating text

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