Network quality evaluation method, device and system

CN122933475APending Publication Date: 2026-10-16BEIJING XINTANG SICHUANG EDUCATIONAL TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611289683.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-24
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

[0005]本申请提供一种网络质量评估方法、网络质量评估装置及网络质量评估系统,以至少缓解现有网络质量评估过程中网络质量判断容易受到单端短时统计偏移影响,并且固定采集节奏难以兼顾网络变化感知与统计采集资源消耗的技术问题

Benefits of technology

[0011]本申请提供的技术方案的技术好处:

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122933475A_ABST
    Figure CN122933475A_ABST
Patent Text Reader

Abstract

The application provides a network quality evaluation method, device and system. WebRTC cycle statistical information of a client is acquired, corresponding server statistical information is acquired according to a synchronization source identifier, a statistical corresponding relationship between the client and the server is established, and a double-end cycle statistical mapping is generated. A double-end statistical deviation is verified, a correction statistical state is generated in combination with historical deviation information, a calibration cycle statistical snapshot is updated by generating the double-end cycle statistical mapping, media transmission quality indicators and network quality determination states are generated according to media transmission changes of adjacent collection cycles, a target collection interval of a next collection cycle is determined according to the network quality determination state, collection scheduling states are generated, and network quality evaluation results are obtained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of real-time audio and video communication and network status monitoring technology, and more specifically, to a network quality assessment method, a network quality assessment device, and a network quality assessment system. Background Technology

[0002] With the application of browser-based real-time communication technology in scenarios such as online classrooms, real-time interaction, and live audio and video streaming, the real-time audio and video communication process is constantly affected by changes in network transmission status. When network transmission status fluctuates, the sending, receiving, and buffering processes of media data will change accordingly. Therefore, it is necessary to continuously acquire network status information during the communication process and judge the current network quality of real-time audio and video communication to provide a basis for communication status display, anomaly alerts, and subsequent communication control.

[0003] One existing method for network quality assessment typically involves communication terminals independently acquiring local communication statistics at fixed time intervals. From the statistics obtained at each sampling point, several current communication parameters are selected, and the current network quality level is directly determined based on a pre-configured parameter range. Once the network quality level is determined, it is output as the current communication status. After completing the assessment for the current period, the next local communication statistics and network quality assessment is performed at the original fixed time intervals.

[0004] However, the communication statistics obtainable at the terminal are easily affected by the terminal's operating environment, differences in browser implementation, and instantaneous network fluctuations. The local statistical status obtained in a single collection cycle may not fully represent the actual network changes during continuous media transmission, making network quality assessment susceptible to short-term statistical offsets. Furthermore, when using a fixed collection rhythm, statistical information acquisition and processing overhead continues even when network status changes are minor, while significant changes may reduce the timeliness of change capture because the interval between adjacent collection points cannot be adjusted according to the current status. Therefore, existing processing methods face difficult-to-coordinate technical challenges in terms of the stability of network quality assessment, network change perception capability, and statistical collection resource consumption. Summary of the Invention

[0005] This application provides a network quality assessment method, a network quality assessment device, and a network quality assessment system to at least alleviate the technical problems in the existing network quality assessment process, which are easily affected by short-term statistical offsets at one end, and the fixed acquisition rhythm makes it difficult to take into account both network change perception and statistical acquisition resource consumption.

[0006] A network quality assessment method, comprising: Step S1: Obtain the WebRTC periodic statistics information of the client, obtain the corresponding server-side statistics information according to the synchronization source identifier in the WebRTC periodic statistics information, establish the statistical correspondence between the client and the server based on the synchronization source identifier, and generate a dual-end periodic statistics mapping. Step S2: Verify the two-end statistical deviation according to the two-end periodic statistical mapping, determine the abnormal statistical state, generate the correction statistical state according to the historical deviation information corresponding to the abnormal statistical state, update the two-end periodic statistical mapping according to the correction statistical state, and generate a calibration periodic statistical snapshot. Step S3: Determine the media transmission changes in adjacent acquisition cycles based on the calibration cycle statistical snapshot, generate a cycle change characterization, generate a media transmission quality index based on the cycle change characterization, and generate a network quality judgment status based on the media transmission quality index. Step S4: Determine the target acquisition interval for the next acquisition cycle based on the network quality judgment status, generate an acquisition scheduling status based on the target acquisition interval, associate the acquisition scheduling status with the network quality judgment status, and generate a network quality assessment result.

[0007] A network quality assessment device, comprising: The dual-end statistical mapping module is used to obtain the WebRTC periodic statistical information of the client, obtain the corresponding server-side statistical information according to the synchronization source identifier in the WebRTC periodic statistical information, establish the statistical correspondence between the client and the server based on the synchronization source identifier, and generate a dual-end periodic statistical mapping. The deviation calibration module is used to verify the two-end statistical deviation according to the two-end periodic statistical mapping, determine the abnormal statistical state, generate the correction statistical state according to the historical deviation information corresponding to the abnormal statistical state, update the two-end periodic statistical mapping according to the correction statistical state, and generate a calibration periodic statistical snapshot. The quality assessment module is used to determine the media transmission changes in adjacent acquisition cycles based on the calibration cycle statistical snapshot, generate a cycle change characterization, generate a media transmission quality index based on the cycle change characterization, and generate a network quality assessment status based on the media transmission quality index. The data acquisition and scheduling module is used to determine the target acquisition interval for the next acquisition cycle based on the network quality assessment status, generate an acquisition scheduling status based on the target acquisition interval, associate the acquisition scheduling status with the network quality assessment status, and generate a network quality assessment result.

[0008] An electronic device includes a memory and a processor, the memory storing a computer program, the processor executing the computer program to implement any of the above-described network quality assessment methods.

[0009] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the above-described network quality assessment methods.

[0010] A network quality assessment system includes a client device and a media server, wherein the client device is configured with WebRTCSDK and establishes a real-time audio and video communication connection with the media server; The media server is used to provide corresponding server-side statistical information according to the synchronization source identifier; The WebRTCSDK is used to periodically obtain WebRTC periodic statistics information of the client device, obtain server-side statistics information based on the synchronization source identifier in the WebRTC periodic statistics information, and establish a statistical correspondence between the client and the server based on the synchronization source identifier to generate a dual-end periodic statistics mapping. The WebRTCSDK is also used to verify the two-end statistical deviation according to the two-end periodic statistical mapping to determine the abnormal statistical state, generate the correction statistical state according to the historical deviation information corresponding to the abnormal statistical state, and update the two-end periodic statistical mapping according to the correction statistical state to generate a calibration periodic statistical snapshot. The WebRTCSDK is also used to determine the media transmission changes in adjacent acquisition cycles based on the calibration cycle statistical snapshot, to generate a cycle change characterization, to generate a media transmission quality index based on the cycle change characterization, to generate a network quality judgment status based on the media transmission quality index, to determine the target acquisition interval for the next acquisition cycle based on the network quality judgment status, to generate an acquisition scheduling status based on the target acquisition interval, and to associate the acquisition scheduling status with the network quality judgment status to generate a network quality evaluation result and output it to the application layer of the client device.

[0011] The technical advantages of the technical solution provided in this application are: This application first obtains the client's WebRTC periodic statistics, and then retrieves the corresponding server-side statistics based on the synchronization source identifier. Next, it establishes a statistical correspondence between the client and server based on the synchronization source identifier and generates a two-end periodic statistical mapping. Compared to the approach where the current network status is solely provided by the client, the synchronization source identifier allows for a clear correspondence between the client-side and server-side statistics, ensuring that network quality assessment no longer relies solely on client-side observations. Therefore, when the terminal's operating environment or the client's statistical status changes, the server-side statistics can be used in conjunction with the corresponding client-side statistics for subsequent deviation verification. This provides a data foundation for identifying statistical deviations between different observation points, mitigating the problem of insufficient network status representation caused by relying solely on single-end statistics from the data source perspective.

[0012] After forming the two-end periodic statistical mapping, this application does not directly base the final network quality judgment on the statistical state at a single moment. Instead, it first verifies the two-end statistical deviation to identify abnormal statistical states, then forms a corrected statistical state based on the historical deviation information corresponding to the abnormal statistical state, and uses the corrected statistical state to update the two-end periodic statistical mapping to obtain a calibration periodic statistical snapshot. Since abnormal statistical states only enter the correction process corresponding to historical deviation information after a deviation occurs in the two-end statistics, short-term unilateral statistical changes will not be directly transmitted to subsequent quality judgment processes without differentiation. Simultaneously, the corrected statistical state originates from the historical deviation information corresponding to the abnormal statistical state, enabling the current abnormal statistical state to be corrected in conjunction with its past deviation changes. Compared to directly using the current single statistical result for grade judgment, this processing chain helps reduce the interference of instantaneous statistical offsets on subsequent network quality judgments, ensuring better continuity and consistency of the data state entering the media transmission quality analysis stage.

[0013] Furthermore, this application determines the media transmission changes between adjacent acquisition periods based on statistical snapshots of the calibration period, first generating a periodic change characterization, and then forming media transmission quality indicators and network quality judgment status based on the periodic change characterization. Therefore, the network quality judgment is not based on static statistical values ​​at isolated acquisition points, but on the actual media transmission changes exhibited between adjacent acquisition periods after calibration. The changes between adjacent acquisition periods can directly reflect the changes in communication status over time, and the periodic change characterization further transmits this change to the media transmission quality indicators, enabling the network quality judgment status to establish a technical link with the status changes during continuous media transmission. Compared to the method of directly performing static classification on single sampling parameters, this technical chain is more conducive to characterizing the dynamic changes in network transmission status and alleviating the problem that quality judgment is easily affected by instantaneous fluctuations at a single sampling point, leading to inconsistencies between quality judgment and continuous communication status.

[0014] Finally, this application determines the target acquisition interval for the next acquisition cycle based on the network quality assessment status, generates an acquisition scheduling status based on the target acquisition interval, and associates the acquisition scheduling status with the network quality assessment status to form a network quality evaluation result. This process allows the network quality assessment status obtained in the current cycle to directly participate in the acquisition timing control of the next acquisition cycle, thus forming a continuous feedback relationship between network quality evaluation and subsequent statistical acquisition. Compared with the method of always using a fixed acquisition interval in each acquisition cycle, the acquisition rhythm of the next acquisition cycle can be adjusted according to the current network quality status. This means that when the network status changes slightly, it is not necessary to maintain the same statistical acquisition rhythm, and when the network quality status changes, the subsequent acquisition scheduling can be changed accordingly. Therefore, it helps to reduce the unnecessary processing overhead generated by fixed high-frequency statistics under certain network conditions, while improving the problem of insufficient response of fixed low-frequency statistics to changes in network status, and forming a more dynamic coordination relationship between network change perception capability and statistical acquisition resource consumption that is more adapted to the real-time audio and video communication status.

[0015] Through the above steps, the correspondence between client and server statistical information, the correction of statistical deviations between the two ends, the quality determination of media transmission changes in adjacent cycles, and the scheduling of the next acquisition cycle based on the network quality assessment status are sequentially linked, forming a continuous technical chain from statistical information acquisition to network quality assessment and then to the acquisition control of the next cycle. Each of the above processing stages addresses the technical problems of insufficient single-end statistical information, the impact of instantaneous statistical offsets on quality judgment, the difficulty of static sampling in reflecting continuous transmission changes, and the difficulty of balancing state awareness and resource consumption with a fixed acquisition rhythm. This ensures that the network quality assessment results can better reflect the network status during continuous real-time audio and video communication and provide a basis for acquisition scheduling adapted to the current network quality status for the next acquisition cycle. Attached Figure Description

[0016] Figure 1 This application provides a method for network quality assessment.

[0017] Figure 2 This application provides a network quality assessment device.

[0018] Figure 3 This is an electronic device according to an embodiment of the present application.

[0019] Figure 4 This application provides an embodiment of a computer-readable storage medium.

[0020] Figure 5 This application provides an embodiment of a network quality assessment system. Detailed Implementation

[0021] like Figure 1 The image shows a network quality assessment method according to an embodiment of this application, comprising: Step S1: Obtain the WebRTC periodic statistics information of the client, obtain the corresponding server-side statistics information according to the synchronization source identifier in the WebRTC periodic statistics information, establish the statistical correspondence between the client and the server based on the synchronization source identifier, and generate a dual-end periodic statistics mapping. Step S2: Verify the two-end statistical deviation according to the two-end periodic statistical mapping, determine the abnormal statistical state, generate the correction statistical state according to the historical deviation information corresponding to the abnormal statistical state, update the two-end periodic statistical mapping according to the correction statistical state, and generate a calibration periodic statistical snapshot. Step S3: Determine the media transmission changes in adjacent acquisition cycles based on the calibration cycle statistical snapshot, generate a cycle change characterization, generate a media transmission quality index based on the cycle change characterization, and generate a network quality judgment status based on the media transmission quality index. Step S4: Determine the target acquisition interval for the next acquisition cycle based on the network quality judgment status, generate an acquisition scheduling status based on the target acquisition interval, associate the acquisition scheduling status with the network quality judgment status, and generate a network quality assessment result.

[0022] Specifically, in this application, WebRTC periodic statistics are used to describe the client media transmission status obtained according to the acquisition period during the same real-time audio and video communication process. WebRTC stands for Web Real-Time Communication. After the client establishes real-time audio and video communication, it reads the client statistics for the current acquisition period through the WebRTC statistics interface and retains a snapshot of the client statistics from the previous acquisition period for correspondence with the current acquisition period. After establishing a periodic correspondence between the client statistics for the current acquisition period and the client statistical snapshot from the previous acquisition period according to the acquisition time sequence, WebRTC periodic statistics are generated. Thus, WebRTC periodic statistics are not isolated statistical states at a single acquisition point, but are formed by the client statistical snapshot from the previous acquisition period, the client statistics for the current acquisition period, and the periodic correspondence between the two, and serve as the periodic statistical basis for subsequently determining the changes in media transmission in adjacent acquisition periods.

[0023] The synchronization source identifier corresponds to RTP, or Real-time Transport Protocol, specifically the Synchronization Source. It identifies the source of the media stream from which a media transmission object originates. When multiple media transmission objects exist in the same real-time audio / video communication, each object has its own corresponding synchronization source identifier. Therefore, when client-side periodic statistical snapshots and server-side statistical information originate from different observation locations, using the synchronization source identifier as the matching criterion between them allows us to first determine the media transmission object described by the client-side periodic statistical snapshot, and then locate the statistical content with the same synchronization source identifier in the server-side statistical information, ensuring that the statistical states at the two observation locations correspond to the same media transmission object. The synchronization source identifier then continues to participate in establishing the statistical correspondence between the client and server, generating bilateral periodic statistical mappings, and verifying bilateral statistical discrepancies.

[0024] Server-side statistics are network transmission statistics generated by the media server during media transmission. These statistics can be indexed according to the synchronization source identifier. The `statsMapIndexedBySsrc` in this application represents this organization, meaning a server-side statistics mapping indexed according to the synchronization source identifier. In actual processing, the corresponding index position in the server-side statistics mapping is accessed based on the synchronization source identifier parsed from the WebRTC periodic statistics. Server-side statistics are then read from this index position, and a client-server statistical correspondence is established by linking the server-side statistics with client periodic statistical snapshots that share the same synchronization source identifier. After organizing multiple client-server statistical correspondences according to the synchronization source identifier, a dual-end periodic statistics mapping is generated. This dual-end periodic statistics mapping at least includes the association between the client statistical status and the server statistical status corresponding to the same synchronization source identifier, thus providing a processing object for step S2 to verify dual-end statistical discrepancies within the same media transmission object scope.

[0025] Specifically, in this application, step S2 does not directly use either the client statistical state or the server statistical state for subsequent network quality determination. Instead, it first uses a two-end periodic statistical mapping to verify the two-end statistical deviation between the client statistical state and the server statistical state corresponding to the same synchronization source identifier. The two-end statistical deviation is formed by the client statistical state and the server statistical state with the same synchronization source identifier; therefore, the two-end statistical deviation maintains a correspondence with the synchronization source identifier. A two-end deviation state is formed based on the two-end statistical deviation, and then the two-end deviation state is verified according to a preset deviation boundary to generate a deviation verification result. The deviation verification result is used to determine abnormal statistical states. Abnormal statistical states continue to maintain a correspondence with the synchronization source identifier, thereby distinguishing whether the deviation between the current client statistical state and the server statistical state needs to enter a subsequent re-verification process and the correction process corresponding to historical deviation information.

[0026] Historical deviation information describes the historical two-way deviation between the client-side and server-side statistical states of the same synchronization source identifier across multiple completed acquisition cycles. This historical deviation information is not generic historical statistical information unrelated to the current media transmission object; instead, it is organized according to the synchronization source identifier corresponding to abnormal statistical states. Therefore, when the current two-way deviation state corresponding to a certain synchronization source identifier becomes an abnormal statistical state, the historical deviation information corresponding to the same synchronization source identifier is read based on the synchronization source identifier corresponding to the abnormal statistical state, and the historical two-way deviation states corresponding to multiple acquisition cycles are obtained from this information. These historical two-way deviation states are then used to form a deviation history window and continuous deviation characteristics, thereby providing a historical deviation basis corresponding to the current media transmission object for generating corrective statistical states.

[0027] The corrected statistical status is used to determine how abnormal statistical statuses in the dual-end periodic statistical mapping are updated before proceeding to the subsequent media transmission quality analysis process. In the implementation described in this application, when a momentary spike occurs in the client's statistical status, while the server's statistical status corresponding to the same synchronization source identifier remains relatively stable, a deviation calibration status can be formed based on the historical deviation information corresponding to that synchronization source identifier. Then, a corrected statistical status is formed based on the deviation calibration status and the current server statistical status. The corrected statistical status is used to update the corresponding client statistical status in the dual-end periodic statistical mapping. The updated client statistical status maintains the correspondence between the synchronization source identifier and the media type, and together with the corresponding server statistical status, forms a calibration period statistical snapshot. The calibration period statistical snapshot continues to maintain the correspondence between the synchronization source identifier, media type, and media transmission statistical status, enabling step S3 to determine media transmission changes in adjacent acquisition cycles for the same media transmission object, without periodically comparing statistical statuses from different sources or with different media types.

[0028] In a preferred embodiment, the verification of bilateral statistical deviations and the correction of historical deviation information are performed continuously according to the synchronization source identifier. First, a statistical correspondence between the client and server is established using the synchronization source identifier, generating a bilateral periodic statistical mapping. Then, a bilateral deviation state is formed only between the client and server statistical states corresponding to the same synchronization source identifier in the bilateral periodic statistical mapping. When the deviation verification result corresponding to the bilateral deviation state results in an abnormal statistical state, historical deviation information is read according to the synchronization source identifier corresponding to the abnormal statistical state. Through this data organization method, abnormal statistical states, historical deviation information, and correction statistical states are continuously transmitted around the media transmission object corresponding to the same synchronization source identifier, reducing the possibility of statistical states from different media transmission objects overlapping and entering the deviation correction process.

[0029] The periodic change characterization, media transmission quality indicators, network quality judgment status, and acquisition scheduling status involved in steps S3 and S4 will be further explained in subsequent embodiments. This embodiment first describes the process of forming WebRTC periodic statistics information, forming client-side periodic statistics snapshots, matching server-side statistics information, establishing dual-end periodic statistics mapping, verifying dual-end statistical deviations, and correcting historical deviation information before forming calibration periodic statistics snapshots, so that calibration periodic statistics snapshots can be directly used as input for subsequently determining media transmission changes in adjacent acquisition periods.

[0030] Optionally, step S1 includes: Step S11: Obtain a client statistics snapshot of the previous collection period, call the WebRTC statistics interface to obtain client statistics information of the current collection period, establish a period correspondence relationship based on the collection timing relationship between the previous collection period and the current collection period, and generate WebRTC period statistics information. Step S12: Parse the synchronization source identifier and media type from the WebRTC periodic statistics information. The synchronization source identifier and media type are used to distinguish media transmission objects. Organize the corresponding media transmission statistics status according to the synchronization source identifier and media type, and generate a client periodic statistics snapshot. Step S13: Obtain the corresponding server-side statistical information based on the synchronization source identifier in the client-side periodic statistical snapshot; match the client-side periodic statistical snapshot with the server-side statistical information based on the synchronization source identifier; verify whether the matched client-side periodic statistical snapshot and the server-side statistical information correspond to the same media transmission object based on the media type; establish a statistical correspondence between the client and the server; and generate a dual-end periodic statistical mapping based on the statistical correspondence between the client and the server.

[0031] Specifically, in this application, the client statistics snapshot of the previous collection cycle in step S11 is derived from the client cycle statistics snapshot saved at the end of the previous round of WebRTC statistics collection. After parsing the client statistics information for a collection cycle, the parsed client cycle statistics snapshot is associated with the collection time point of that collection cycle and saved as the client statistics snapshot of the previous collection cycle for use in the next collection cycle. In this application, the content represented by Transport.appData.stats can be used as a form of saving the client statistics snapshot of the previous collection cycle, where Transport is the transport object, appData is the application data area associated with the transport object, and stats is the saved client statistics snapshot. When saving the client statistics snapshot of the previous collection cycle, the timestamp is updated synchronously so that the next collection cycle can determine the collection time point of the previous collection cycle based on the timestamp. The client statistics snapshot of the previous collection cycle and the corresponding collection time point then jointly enter the cycle correspondence establishment process of the current collection cycle.

[0032] After the current acquisition period begins, the WebRTC statistics interface is called to obtain client statistics for the current acquisition period. As one implementation, the `getStats` method of `RTCPeerConnection` can be used to obtain `StatsReport`, where `RTCPeerConnection` represents the end-to-end connection object in real-time web communication, `getStats` represents the method for reading connection statistics status, and `StatsReport` represents the returned statistics report. `StatsReport` can organize multiple media transmission statistics entries of different types according to a mapping structure. Since the WebRTC periodic statistics in this implementation are needed to determine media transmission changes in adjacent acquisition periods, after obtaining the client statistics for the current acquisition period, the acquisition time point of the current acquisition period is also obtained, and the periodic time interval is determined based on the acquisition time point of the current acquisition period and the acquisition time point of the previous acquisition period. This periodic time interval continues to maintain a correspondence with the client statistics snapshot of the previous acquisition period and the client statistics for the current acquisition period, thereby participating in the establishment of the periodic correspondence and ultimately forming the WebRTC periodic statistics.

[0033] The period correspondence here is used to determine whether the client statistical snapshot of the previous collection period and the client statistical information of the current collection period belong to adjacent collection periods within the same continuous statistical process. When establishing the period correspondence, the client statistical snapshot of the previous collection period is paired with the client statistical information of the current collection period according to the order of the collection times, and the period time interval is associated with the paired client statistical snapshot of the previous collection period and the client statistical information of the current collection period. This period correspondence is then used as a component of the WebRTC periodic statistics. When subsequently determining the changes in the cumulative media transmission statistics between adjacent collection periods, the period correspondence is used to determine the cumulative media transmission statistics that should be compared, thereby avoiding direct comparison of the cumulative media transmission statistics of non-adjacent collection periods.

[0034] In a preferred embodiment, only the client statistical snapshot of the previous acquisition cycle required for the next cycle comparison is retained. After the current acquisition cycle ends, the client cycle statistical snapshot formed in the current acquisition cycle is saved as the client statistical snapshot of the previous acquisition cycle used in the next acquisition cycle. The historical double-end deviation status required for historical deviation information is saved independently according to the organization method of historical deviation information, while the client statistical snapshot of the previous acquisition cycle used for comparing the cumulative statistical status of media transmission in adjacent acquisition cycles does not need to save all historical acquisition results. Thus, the client statistical snapshot of the previous acquisition cycle serves to determine the changes in media transmission in adjacent acquisition cycles, and the historical deviation information serves to correct abnormal statistical statuses. The two types of historical statistical content are organized according to their respective subsequent uses.

[0035] Specifically, in this application, step S12 is used to determine the synchronization source identifier and media type that can distinguish media transmission objects from the WebRTC periodic statistics. The synchronization source identifier is used to identify the source of the media stream, and the media type is used to identify the media category corresponding to the media transmission statistics status. In real-time audio and video communication scenarios, the media type can correspond to audio or video, for example. The synchronization source identifier is used to distinguish different media streams within the same media type, and the media type is used to distinguish different media categories. The synchronization source identifier and media type are used together to determine the media transmission object corresponding to the media transmission statistics status. The synchronization source identifier and media type then continue to participate in the media entry identifier mapping generation, the organization of cumulative media transmission statistics status, the generation of client periodic statistical snapshots, and the establishment of statistical correspondence between the client and the server.

[0036] After reading a media transmission statistics entry from the WebRTC periodic statistics information, the synchronization source identifier in the media transmission statistics entry is read first, followed by the media type. Once the synchronization source identifier and media type are determined, the media transmission statistics status is read from the media transmission statistics entry, and a correspondence is established between the media transmission statistics status and the corresponding synchronization source identifier and media type. After completing the above organization of each media transmission statistics entry, a client-side periodic statistics snapshot is formed. The client-side periodic statistics snapshot thus retains the synchronization source identifier required for establishing the statistical correspondence between the client and server, the media type required for subsequent media-specific statistics, and the media transmission statistics status used for comparison between adjacent collection periods.

[0037] Specifically, in this application, step S13 uses the aforementioned client-side periodic statistical snapshot as the basis for client-side statistics. First, the synchronization source identifier in the client-side periodic statistical snapshot is read, and then the corresponding server-side statistical information is accessed based on the synchronization source identifier. The server-side statistical information can be pre-mapped according to the synchronization source identifier; therefore, after the synchronization source identifier enters the index query of the server-side statistical mapping, the server-side statistical information formed by the server for the same media transmission object can be located. The read server-side statistical information continues to maintain its correspondence with the synchronization source identifier to participate in the matching between the client-side periodic statistical snapshot and the server-side statistical information.

[0038] After obtaining client-side periodic statistical snapshots and server-side statistical information with consistent synchronization source identifiers, the media type is used to verify whether the client-side periodic statistical snapshots and server-side statistical information describe the same media transmission object. This media type verification is used to avoid directly establishing a correspondence between statistical information with inconsistent media types simply because of synchronization source identifier index matching. After successful media type verification, the server-side statistical information is associated with the corresponding media transmission statistical status in the client-side periodic statistical snapshot to establish a statistical correspondence between the client and the server. Once the statistical correspondence between the client and the server is formed, it is further organized according to the synchronization source identifier and media type to generate a dual-end periodic statistical mapping. Step S2 then directly reads the client-side and server-side statistical statuses under the same synchronization source identifier based on the dual-end periodic statistical mapping, ensuring that the dual-end statistical deviation is verified under the condition that media transmission object alignment has been completed.

[0039] Optionally, step S12 includes: Step S121: Based on the media transmission statistics entries in the WebRTC periodic statistics information, determine the synchronization source identifier and media type corresponding to each media transmission statistics entry, and generate a media entry identifier mapping; Step S122: Based on the media entry identifier mapping, read the cumulative media transmission statistics status corresponding to the adjacent acquisition period from the WebRTC periodic statistics information, organize the cumulative media transmission statistics status according to the synchronization source identifier and media type, and generate a media transmission statistics slice; Step S123: Based on the WebRTC periodic statistics information, read the media receive buffer statistics status and link latency status corresponding to the media transmission statistics slice, associate the media receive buffer statistics status and link latency status with the media transmission statistics slice, and generate a client periodic statistics snapshot.

[0040] Specifically, in this application, media transmission statistics entries are statistical content categorized according to the type of statistical object within the WebRTC periodic statistics information. As one implementation, media transmission statistics entries can originate from statistics entries such as remote-inbound-rtp, outbound-rtp, inbound-rtp, track, and candidate-pair. Among these, remote-inbound-rtp represents statistics on remote inbound real-time transmission protocols, outbound-rtp represents statistics on outbound real-time transmission protocols, inbound-rtp represents statistics on inbound real-time transmission protocols, track represents media track statistics, and candidate-pair represents statistics on candidate transmission path pairs. The aforementioned English names describe the specific WebRTC statistical implementation of the media transmission statistics entries. These media transmission statistics entries are organized according to synchronization source identifiers and media types in subsequent processing.

[0041] After reading the media transmission statistics entries in step S121, the synchronization source identifier is determined from the field representing the media source, and the media type is determined from the kind field representing the media category. The kind field describes whether the current media transmission statistics entry corresponds to audio or video. Subsequently, a correspondence is established between the media transmission statistics entries and the synchronization source identifier and media type to generate a media entry identifier mapping. This media entry identifier mapping represents the correspondence between media transmission statistics entries and media transmission objects. Then, step S122 is performed, allowing the cumulative media transmission statistics status to be organized according to the media transmission objects determined by the synchronization source identifier and media type, rather than according to the original arrangement in StatsReport.

[0042] Specifically, for outbound-rtp type media transmission statistics entries, the fields bytesSent, packetsSent, framesEncoded, and retransmittedBytesSent can be read. bytesSent represents the cumulative byte status transmitted up to the current acquisition time, packetsSent represents the cumulative data packet status transmitted up to the current acquisition time, framesEncoded represents the cumulative frame status that has been encoded up to the current acquisition time, and retransmittedBytesSent represents the cumulative byte status that has been retransmitted up to the current acquisition time. For inbound-rtp type media transmission statistics entries, the fields bytesReceived, packetsReceived, framesDecoded, and framesDropped can be read, reflecting the cumulative received byte status, cumulative received data packet status, cumulative decoded frame status, and cumulative dropped frame status, respectively. These cumulative statuses are specific examples of cumulative media transmission statistics and maintain a correspondence with the synchronization source identifier and media type through media entry identifier mapping.

[0043] Since the cumulative media transmission statistics in the WebRTC statistics interface are typically represented as a continuously accumulating state from the start of communication or the starting point of statistics, this application does not directly use the cumulative media transmission statistics at a single acquisition point as the media transmission change within a period. Instead, it first uses media entry identifier mapping to find media transmission statistics entries in the previous and current acquisition periods that have the same synchronization source identifier and media type. Then, it pairs the cumulative media transmission statistics of two adjacent acquisition periods according to the period correspondence. The paired cumulative media transmission statistics form a media transmission statistics slice. The media transmission statistics slice simultaneously retains the synchronization source identifier, media type, and the cumulative media transmission statistics corresponding to adjacent acquisition periods, enabling subsequent implementations to determine media transmission statistics changes based on the changes in the cumulative media transmission statistics of the same media transmission object in adjacent acquisition periods.

[0044] In a preferred embodiment, the outbound-rtp media transmission statistics entry can also read the cumulative states related to FIR, NACK, and PLI. FIR stands for Full Intra Request; NACK stands for Negative Acknowledgment; and PLI stands for Picture Loss Indication. These cumulative states describe the feedback statistics generated by the receiving side during media transmission in response to data loss or image recovery. The cumulative states of FIR, NACK, and PLI are associated with the corresponding media transmission statistics slices according to the synchronization source identifier and media type, allowing the media transmission statistics slices to further retain the feedback statistics related to the corresponding media transmission object. When subsequent media transmission quality analysis requires the use of these feedback statistics, they are read from the corresponding media transmission statistics slice.

[0045] Specifically, in this application, step S123 further supplements the media receiving buffer statistical state and link delay state based on the media transmission statistical slice. The media receiving buffer statistical state is used to describe the jitter buffer statistical state formed by the receiving side in response to changes in the arrival time of media data. In this application, trackData represents track statistics, which may specifically include jitterBufferDelay and jitterBufferEmittedCount. jitterBufferDelay represents the jitter buffer delay state accumulated up to the current acquisition time, and jitterBufferEmittedCount represents the cumulative count state of media units output from the jitter buffer up to the current acquisition time. The jitter buffer delay state and the cumulative count state of media units are associated with the media transmission statistical slice according to the synchronization source identifier and media type, and together form the media receiving buffer statistical state. The media receiving buffer statistical state is then associated with the media transmission statistical slice to participate in the generation of client periodic statistical snapshots.

[0046] Link latency status can be derived from media transmission statistics entries of type candidate-pair. Candidate-pair describes the transmission path relationship between the local and remote candidate addresses used in the current media communication. Here, currentRoundTripTime represents the current round-trip latency status, and availableOutgoingBitrate represents the bandwidth available for sending media data outwards. After reading the link latency status corresponding to the candidate-pair, a correspondence is established between the link latency status and the current media communication link described by the media transmission statistics slice. Then, the link latency status is associated with the media transmission statistics slice. Thus, the cumulative media transmission statistics status in the media transmission statistics slice, together with the media reception buffer statistics status and link latency status of the same acquisition period, can form a client-side periodic statistical snapshot.

[0047] Furthermore, in this application, the network access type corresponding to the current client candidate address, such as a wireless local area network (WLAN) or mobile communication network, can also be read from the media transmission statistics entry of type `local-candidate`. The network access type is associated with the corresponding collection period and the client periodic statistical snapshot, representing the network transmission environment corresponding to the client periodic statistical snapshot. The network access type serves as a supplementary statistical status to the client periodic statistical snapshot, without changing the synchronization source identifier, and is the primary index for establishing the statistical correspondence between the client and server in the client periodic statistical snapshot and server-side statistical information.

[0048] Through the above steps, the media entry identifier mapping is used to establish the correspondence between media transmission statistics entries and synchronization source identifiers and media types; the media transmission statistics slice is used to organize the cumulative statistical status of media transmission in adjacent acquisition cycles; the media reception buffer statistics status is used to supplement the jitter buffer statistics status during media reception; and the link delay status is used to supplement the round-trip delay status of the media transmission path. After associating the media reception buffer statistics status and link delay status with the media transmission statistics slice, a client-side periodic statistical snapshot is formed. The client-side periodic statistical snapshot then proceeds to step S13, where the corresponding server-side statistical information is obtained using the synchronization source identifier as an index, and a statistical correspondence between the client and the server is established.

[0049] Optionally, step S13 includes: Step S131: Obtain the corresponding server-side periodic statistical snapshot based on the synchronization source identifier in the client-side periodic statistical snapshot; Step S132: Match the client periodic statistical snapshot and the server periodic statistical snapshot according to the synchronization source identifier, and verify whether the matched client periodic statistical snapshot and the server periodic statistical snapshot correspond to the same media transmission object according to the media type, and generate a dual-end media matching relationship; Step S133: Based on the dual-end media matching relationship, associate the network transmission statistics status in the server-side periodic statistical snapshot with the corresponding client-side periodic statistical snapshot, establish a statistical correspondence between the client and the server, and generate a dual-end periodic statistical mapping based on the statistical correspondence between the client and the server.

[0050] Specifically, in this application, the server-side periodic statistical snapshot is used to represent the network transmission statistical status formed by the server for the media transmission object within the collection period corresponding to the client-side periodic statistical snapshot. When the server-side statistical information establishes a server-side statistical mapping in advance according to the synchronization source identifier, the corresponding index item in the server-side statistical mapping can be accessed according to the synchronization source identifier in the client-side periodic statistical snapshot. In this application, statsMapIndexedBySsrc represents the server-side statistical information saved according to the synchronization source identifier index. After reading the index item, the server-side statistical information corresponding to the current synchronization source identifier is organized according to the current collection period to generate the server-side periodic statistical snapshot. The server-side periodic statistical snapshot continues to maintain the correspondence between the synchronization source identifier and the network transmission statistical status and participates in the generation of the dual-end media matching relationship.

[0051] The network transmission statistics status in the server-side periodic statistical snapshot can at least include the packet loss status and server round-trip time status observed by the server. In this application, fractionLost is used to represent the packet loss status observed by the server from the corresponding media transmission direction, and roundTripTime is used to represent the server-side round-trip time status obtained by the server. The packet loss status and server-side round-trip time status observed by the server are both part of the network transmission statistics status and correspond to the synchronization source identifier in the server-side periodic statistical snapshot, so that the subsequent step S132 can confirm the media transmission object described by the server-side periodic statistical snapshot based on the synchronization source identifier.

[0052] Step S132 first matches the client-side periodic statistical snapshot and the server-side periodic statistical snapshot based on the synchronization source identifier. If the synchronization source identifiers match, the media type in the client-side periodic statistical snapshot is read, and the media transmission object associated with the server-side periodic statistical snapshot is verified to be of the same media type. When the synchronization source identifiers match and the media type verification result indicates that they correspond to the same media transmission object, a two-end media matching relationship is generated. The two-end media matching relationship represents the correspondence between the client-side periodic statistical snapshot and the server-side periodic statistical snapshot for the same media transmission object, rather than unconditionally concatenating the two statistical snapshots.

[0053] In a preferred embodiment, two-end media matching relationships are established for audio media transmission objects and video media transmission objects respectively. The client-side periodic statistical snapshot corresponding to the audio media transmission object establishes a two-end media matching relationship only with the server-side periodic statistical snapshot that shares the same synchronization source identifier and is of audio media type; similarly, the client-side periodic statistical snapshot corresponding to the video media transmission object establishes a two-end media matching relationship only with the server-side periodic statistical snapshot that shares the same synchronization source identifier and is of video media type. Since audio media transmission objects and video media transmission objects have different statistical characteristics in terms of frame structure, transmission rate, and media reception buffer statistical status, establishing two-end media matching relationships according to media type ensures that subsequent two-end statistical deviation verification is performed within the same media type range.

[0054] Step S133 reads the network transmission statistics status from the server-side periodic statistical snapshot based on the dual-end media matching relationship, and then associates the network transmission statistics status with the corresponding client-side periodic statistical snapshot. After the association is completed, the media transmission statistics status, media reception buffer statistics status, and link latency status in the client-side periodic statistical snapshot correspond to the network transmission statistics status in the server-side periodic statistical snapshot through the synchronization source identifier and media type. This correspondence forms a statistical correspondence between the client and the server. After organizing multiple client-server statistical correspondences according to the synchronization source identifier and media type, a dual-end periodic statistical mapping is generated.

[0055] The dual-end periodic statistical mapping then proceeds to step S2. Since the dual-end periodic statistical mapping has already completed the synchronization source identifier matching and media type verification, step S2 can directly read the client statistical status and the server statistical status from the data location corresponding to the same synchronization source identifier, and form the dual-end statistical deviation based on the client statistical status and the server statistical status, without having to determine again whether the client statistical status and the server statistical status describe the same media transmission object in the dual-end statistical deviation verification stage.

[0056] Optionally, step S2 includes: Step S21: Based on the synchronization source identifier in the dual-end periodic statistical mapping, read the client statistical status and the corresponding server statistical status, and generate a dual-end deviation status based on the degree of deviation between the client statistical status and the server statistical status. Step S22: Verify the double-end deviation state according to the preset deviation boundary and generate a deviation verification result; Step S23: Determine the abnormal statistical status and its corresponding synchronization source identifier based on the deviation verification result, associate the abnormal statistical status with its corresponding synchronization source identifier, and generate abnormal deviation location information. Step S24: Obtain the corresponding historical deviation information based on the abnormal deviation location information, generate a correction statistical state based on the historical deviation information, update the abnormal statistical state in the dual-end periodic statistical mapping based on the correction statistical state, and generate a calibration periodic statistical snapshot.

[0057] Specifically, in this application, step S21 uses the same synchronization source identifier in the dual-end periodic statistical mapping as the reading range to obtain the client statistical status and the server statistical status respectively. In a specific implementation described in this application, the client statistical status can be the client packet loss status obtained from local client statistics, and the server statistical status can be the server packet loss status formed by the server for the same synchronization source identifier. The client packet loss status can be formed from media transmission statistical entries of type remote-inbound-rtp or inbound-rtp, and the server packet loss status can be read from the network transmission statistical status in the server periodic statistical snapshot indexed by the synchronization source identifier. Both the client packet loss status and the server packet loss status are used to describe the packet loss situation of the media transmission object corresponding to the same synchronization source identifier, therefore, they are both included in the dual-end statistical deviation calculation under the same statistical caliber.

[0058] After reading the client-side packet loss status and the server-side packet loss status, a two-way statistical deviation is formed based on the degree of deviation between the two-way packet loss statuses, and a two-way deviation status is generated based on the two-way statistical deviation. The two-way deviation status is associated with the corresponding synchronization source identifier. Here, neither the client-side nor the server-side packet loss status is pre-determined as an abnormal statistical status. Instead, a two-way deviation status between the client-side and server-side packet loss status is first formed, and then verified by step S22 according to the preset deviation boundary.

[0059] The preset deviation boundary is used to distinguish between two-end deviation states that are within the allowable deviation range and those that require re-verification. The preset deviation boundary can be configured according to the statistical caliber of the client and server statistical states before performing WebRTC periodic statistical information collection. Taking client-side and server-side packet loss states as an example, the preset deviation boundary is configured with the same proportional dimension as the client-side and server-side packet loss states. For example, the preset deviation boundary can be configured to a certain percentage, such as 5 percentage points. The above specific values ​​are used to illustrate one configuration method for the preset deviation boundary; in actual implementation, the preset deviation boundary should be configured according to the statistical caliber used for network quality assessment. The configured preset deviation boundary is then used simultaneously for both the first two-end deviation state verification and the re-sampling deviation state verification, ensuring that the deviation verification results and the re-verification results have a consistent judgment benchmark.

[0060] Step S22 verifies the two-end deviation state against a preset deviation boundary. When the two-end deviation state is within the preset deviation boundary, the deviation verification result indicates that the two-end deviation state of the corresponding synchronization source identifier does not need to undergo a re-verification process; when the two-end deviation state exceeds the preset deviation boundary, the deviation verification result is used to determine the synchronization source identifier that needs to be re-verified. The deviation verification result is associated with the synchronization source identifier and then directly proceeds to step S23, which is used to form a statistical snapshot to be verified and to determine abnormal statistical states.

[0061] Specifically, in this application, the abnormal statistical state indicates that the statistical state of the two-end deviation state corresponding to the synchronization source identifier, after being judged by the deviation verification result and subsequent re-verification results, meets the requirements for entering the historical deviation information correction process. The abnormal statistical state does not directly indicate that the network transmission itself has experienced a transmission anomaly, but rather indicates that there is a two-end statistical deviation between the client's statistical state and the server's statistical state that still requires further correction after cross-period verification. After associating the abnormal statistical state with its corresponding synchronization source identifier, abnormal deviation location information is generated. This abnormal deviation location information is then used to determine the synchronization source identifier to be corrected, ensuring that subsequent historical deviation information reading and correction statistical state generation are only performed on the media transmission object requiring correction.

[0062] Historical deviation information is stored according to the synchronization source identifier, representing the historical two-end deviation status of the same media transmission object across multiple completed acquisition cycles. Step S24 accesses the corresponding historical deviation information based on the synchronization source identifier in the abnormal deviation location information, establishing a timing relationship between the abnormal statistical status and the historical two-end deviation status of the same media transmission object across previous acquisition cycles. Subsequently, a deviation history window is formed based on the historical deviation information, a continuous deviation feature is formed based on the deviation history window, and a deviation calibration status is formed based on the continuous deviation feature. The deviation calibration status continues to work with the current server-side statistical status to generate a correction statistical status. The correction statistical status is used to update the client-side statistical status in the two-end cycle statistical mapping to generate a calibration cycle statistical snapshot.

[0063] In a preferred embodiment, the deviation verification results and historical deviation information are processed in stages. When the double-ended deviation state exceeds the preset deviation boundary for the first time in the current acquisition cycle, the correction statistical state is not directly generated based on the single double-ended deviation state. Instead, the deviation state is first resampled and the reverification results are used to distinguish between double-ended deviation states that persist across cycles and double-ended deviation states that have fallen back in subsequent acquisition cycles. For synchronization source identifiers that still form abnormal statistical states after reverification, the corresponding historical deviation information is read based on the abnormal deviation location information. Thus, resampling is used to determine whether the current double-ended deviation state has cross-cycle continuity, and historical deviation information is used to describe the historical double-ended deviation states of the same synchronization source identifier in multiple acquisition cycles. Both are applied to different acquisition time ranges and participate in the generation of correction statistical states in chronological order.

[0064] The updated dual-end periodic statistical mapping forms a calibration period statistical snapshot. This snapshot retains the synchronization source identifier, media type, and media transmission statistics relevant to comparisons with subsequent adjacent acquisition periods. Therefore, updating the client's statistical status based on the calibration period statistical snapshot does not sever the data correspondence between steps S2 and S3. Subsequent step S3 determines the media transmission changes in adjacent acquisition periods based on the calibration period statistical snapshot and further generates a periodic change representation.

[0065] Optionally, step S23 includes: Step S231: Determine the synchronization source identifier that needs to be re-verified based on the deviation verification result, read the corresponding dual-end statistical status from the dual-end periodic statistical mapping based on the synchronization source identifier that needs to be re-verified, and generate a statistical snapshot to be verified. Step S232: Based on the statistical snapshot to be verified, obtain the corresponding dual-end statistical status in the subsequent collection cycle, and generate the resampling deviation status based on the dual-end statistical status of the subsequent collection cycle. Step S233: Verify the resampling deviation state according to the preset deviation boundary, and generate a re-verification result; Step S234: Determine the cross-cycle deviation change status of the corresponding synchronization source identifier based on the deviation verification result and the re-verification result, determine the abnormal statistical status based on the cross-cycle deviation change status, and generate abnormal deviation location information.

[0066] Specifically, in this application, step S231 first reads the synchronization source identifiers from the deviation verification results where the dual-end deviation state exceeds the preset deviation boundary, and identifies these synchronization source identifiers as those requiring re-verification. Then, using these re-verified synchronization source identifiers as indexes, the client statistical state, server statistical state, and the client-server statistical correspondence between the client and server statistical states used in this deviation verification are read from the dual-end periodic statistical mapping. These client statistical states, server statistical states, and the client-server statistical correspondence are then organized according to the synchronization source identifiers requiring re-verification to generate a statistical snapshot to be verified. This statistical snapshot saves the synchronization source identifiers required for resampling and the dual-end statistical states corresponding to the first deviation verification, and proceeds to step S232.

[0067] After step S232 enters the subsequent collection cycle, the new client statistical status is read according to the synchronization source identifier that needs to be re-verified in the statistical snapshot to be verified, and the new server statistical status is obtained according to the same synchronization source identifier that needs to be re-verified. The client statistical status and server statistical status obtained in the subsequent collection cycle continue to form a two-end statistical deviation according to the same statistical caliber as in step S21, and a resampling deviation status is generated based on the two-end statistical deviation. The resampling deviation status has the same statistical meaning and synchronization source identifier correspondence as the two-end deviation status used in the first deviation verification. Therefore, the deviation verification result and the re-verification result can be correlated across cycles according to the synchronization source identifier.

[0068] Step S233 uses the same preset deviation boundary as step S22 to verify the resampling deviation state, thereby generating a reverification result. When the resampling deviation state exceeds the preset deviation boundary, the reverification result indicates that the two-end statistical deviation corresponding to the synchronization source identifier that needs to be reverified continues to exist in subsequent acquisition cycles; when the resampling deviation state is within the preset deviation boundary, the reverification result indicates that the two-end statistical deviation corresponding to the synchronization source identifier that needs to be reverified has decreased in subsequent acquisition cycles. The reverification result then proceeds to step S234 together with the deviation verification result.

[0069] Step S234 associates the deviation verification result and the re-verification result according to the corresponding synchronization source identifier and the acquisition time sequence to generate a cross-cycle deviation change status. The cross-cycle deviation change status represents the change of the two-end statistical deviation of the same synchronization source identifier from the first deviation verification to the re-sampling verification. In one embodiment, when both the deviation verification result and the re-verification result indicate that the corresponding two-end deviation status exceeds the preset deviation boundary, an abnormal statistical status is determined based on the cross-cycle deviation change status; when the re-verification result indicates that the re-sampling deviation status is within the preset deviation boundary, an abnormal statistical status that needs to enter the historical deviation information correction process is not generated based on the cross-cycle deviation change status, so that the synchronization source identifier continues to form subsequent calibration cycle statistical snapshots according to the normal cycle statistical process.

[0070] In a preferred embodiment, the synchronization source identifiers requiring re-verification have a priority resampling relationship in subsequent acquisition cycles. This priority resampling relationship means that after WebRTC cycle statistics are generated in subsequent acquisition cycles, the system first checks if a statistical snapshot to be verified exists. If such a snapshot exists, the corresponding end-to-end statistical status is read according to the synchronization source identifier requiring re-verification in the snapshot, and the resampling deviation status and re-verification result are generated. Then, the statistical status of that acquisition cycle is entered into the subsequent quality analysis process. This priority resampling relationship ensures direct data continuity between the first deviation verification and the re-verification through the statistical snapshot to be verified, enabling the differentiation within a short acquisition cycle span between whether the end-to-end statistical deviation is a subsequent decline or a persistent issue across cycles.

[0071] After determining the abnormal statistical state based on the cross-cycle deviation change status, the abnormal statistical state is associated with its corresponding synchronization source identifier to generate abnormal deviation location information. The abnormal deviation location information then serves as the entry point for step S24 to read historical deviation information, ensuring that the deviation calibration state and correction statistical state corresponding to the historical deviation information only apply to media transmission objects that still form an abnormal statistical state after re-verification.

[0072] Optionally, step S24 includes: Step S241: Determine the identifier of the synchronization source to be corrected based on the abnormal deviation location information, and obtain the corresponding historical deviation information based on the identifier of the synchronization source to be corrected; Step S242: Determine the historical double-end deviation status corresponding to multiple collection cycles from the historical deviation information according to the collection time sequence, generate a deviation history window, determine the continuous deviation characteristics of the client statistical status relative to the server statistical status according to the deviation history window, and generate a deviation calibration status according to the continuous deviation characteristics. Step S243: Generate a correction statistics status based on the deviation calibration status and the current server statistics status; Step S244: Update the corresponding client statistical status in the dual-end periodic statistical mapping according to the calibration statistical status, and maintain the correspondence between the synchronization source identifier and the media type during the update, and generate a calibration periodic statistical snapshot.

[0073] Specifically, in this application, step S241 first reads the abnormal statistical status and the corresponding synchronization source identifier from the abnormal deviation location information, and identifies the synchronization source identifier still in the abnormal statistical status as the synchronization source identifier to be corrected. The synchronization source identifier to be corrected is then used to access the historical deviation information corresponding to the same media transmission object. The historical deviation information comes from the client statistical status, server statistical status, and corresponding historical two-end deviation status formed by the synchronization source identifier to be corrected in the previously completed collection cycle. After the two-end deviation status verification of each collection cycle is completed, the two-end deviation status formed in that collection cycle is written into the historical deviation information according to the synchronization source identifier and the collection time sequence, so that the historical deviation information can continuously form a historical two-end deviation status sequence corresponding to the same synchronization source identifier. The historical deviation information then proceeds to step S242 to form a deviation history window.

[0074] Step S242 determines multiple acquisition cycles adjacent to the current acquisition cycle from the historical deviation information according to the acquisition sequence, and organizes the historical double-end deviation states corresponding to the multiple acquisition cycles according to the acquisition sequence to generate a deviation history window. The length of the deviation history window can be pre-configured as several recent acquisition cycles, such as the most recent 10 acquisition cycles. The specific window length mentioned above is used to illustrate one configuration method of the deviation history window, without changing the technical relationship that the deviation history window always organizes multiple historical double-end deviation states around the same synchronization source identifier to be corrected.

[0075] After forming the deviation history window, the historical two-end deviation states in the deviation history window are read sequentially according to the acquisition time sequence. For each historical two-end deviation state, the deviation direction and degree of the client statistical state relative to the server statistical state are determined, and then a continuous deviation feature is formed based on the deviation direction and degree corresponding to multiple acquisition cycles. The continuous deviation feature is used to describe whether the client statistical state relative to the server statistical state maintains a similar two-end statistical deviation change relationship over multiple acquisition cycles. For example, when the client statistical state relative to the server statistical state maintains a similar deviation direction and degree over multiple acquisition cycles, the continuous deviation feature indicates that the synchronization source identifier to be corrected has a relatively stable historical two-end deviation state; when the two-end deviation state of the current acquisition cycle deviates significantly from the historical two-end deviation state represented by the deviation history window, the continuous deviation feature is further used to generate a deviation calibration state that reflects the relationship between the current deviation degree and the historical deviation.

[0076] In a preferred embodiment, a deviation calibration state can be generated based on the average deviation of multiple historical two-way deviation states within the deviation history window. The long-term calibration coefficient in this application corresponds to a specific implementation of the deviation calibration state. The average deviation of multiple historical two-way deviation states is used to describe the long-term two-way statistical deviation relationship between the client's statistical state and the server's statistical state within the deviation history window. After the deviation calibration state is generated, the process continues to step S243, rather than being directly used as the network quality judgment state. Therefore, the deviation calibration state serves to correct the client's statistical state corresponding to the abnormal statistical state, while the network quality judgment state is still formed subsequently based on the statistical snapshot of the calibration period.

[0077] Specifically, in this application, step S243 first reads the current server statistical state corresponding to the synchronization source identifier to be corrected from the dual-end periodic statistical mapping. The current server statistical state and the deviation calibration state formed in step S242 are used together to determine the correction direction of the current client statistical state and the corrected statistical state. In one embodiment described in this application, when the client packet loss state experiences a momentary spike in the current acquisition period, and the server packet loss state obtained by the server for the same synchronization source identifier to be corrected remains similar to the server packet loss state in previous acquisition periods, the current server statistical state is used as the server observation reference for the current acquisition period, and then combined with the historical dual-end deviation state represented by the deviation calibration state to generate the corrected statistical state.

[0078] The corrected statistical state describes the current client statistical state after correction according to the current server statistical state and the deviation calibration state. When generating the corrected statistical state, the long-term two-way statistical deviation relationship represented by the deviation history window is not eliminated. Instead, the client statistical state is determined based on the current server statistical state and the deviation calibration state to be consistent with the historical two-way deviation state. When the deviation history window indicates that the client statistical state has a similar long-term two-way statistical deviation relative to the server statistical state, the corrected statistical state retains the two-way statistical deviation relationship corresponding to the persistent deviation characteristic. When the current client statistical state exhibits a momentary deviation relative to the historical two-way deviation state, the corrected statistical state is used to reduce the extent to which the momentary deviation directly enters the subsequent media transmission quality analysis process.

[0079] Step S244 accesses the client statistical status corresponding to the synchronization source identifier to be corrected in the dual-end periodic statistical mapping according to the correction statistical status, and updates the client statistical status accordingly. During the update process, the synchronization source identifier remains the index between the client statistical status and the server statistical status, and the media type remains the media category corresponding to the client statistical status. Therefore, the client statistical status update will not change the synchronization source identifier and media type corresponding to the media transmission object. The updated client statistical status continues to maintain the statistical correspondence between the client and the server with the server statistical status corresponding to the same synchronization source identifier, thereby generating a calibration periodic statistical snapshot.

[0080] Furthermore, in this application, the calibration cycle statistical snapshot does not replace the historical two-way deviation state used to form historical deviation information. The statistical state used for subsequent media transmission quality analysis adopts the calibration cycle statistical snapshot, while the historical deviation information used in subsequent acquisition cycles to determine the long-term two-way statistical deviation relationship between the client-side and server-side statistical states continues to retain the historical two-way deviation state formed before the corresponding acquisition cycle correction. Thus, the historical deviation information is used to describe the change of the actual two-way statistical deviation between the client-side and server-side statistical states with the acquisition cycle, and the calibration cycle statistical snapshot is used to describe the statistical state after two-way statistical deviation verification and historical deviation information correction before entering the subsequent media transmission quality analysis process. The two serve the deviation correction process and the media transmission quality analysis process, respectively.

[0081] In a preferred embodiment, when the re-verification result indicates that the resampling deviation status is within the preset deviation boundary, historical deviation information correction is not performed on the corresponding synchronization source identifier. Instead, the client statistical status formed according to the normal statistical process of the corresponding acquisition cycle continues to be used. Only when the cross-cycle deviation change status indicates that the dual-end statistical deviation corresponding to the same synchronization source identifier continues to exist across acquisition cycles and forms an abnormal statistical status, the synchronization source identifier to be corrected is determined based on the abnormal deviation location information, and a deviation calibration status is further formed based on the deviation history window corresponding to the synchronization source identifier to be corrected. Thus, the resampling deviation status and the re-verification result are placed before the historical deviation information correction, ensuring that the dual-end statistical deviation that has already fallen back in subsequent acquisition cycles will not directly enter the historical deviation information correction process.

[0082] Optionally, step S3 includes: Step S31: Distinguish the media transmission statistics status according to the media type in the calibration cycle statistical snapshot, and associate the media transmission statistics status of the same media transmission object in adjacent acquisition cycles according to the synchronization source identifier to generate media cycle statistical slices. Step S32: Determine the media transmission statistical changes in adjacent acquisition cycles based on the media cycle statistical slices, and generate a cycle change characterization. Step S33: Generate a media transmission change state based on the periodic change characterization and the corresponding acquisition period relationship, associate the corresponding link delay state and transmission direction with the media transmission change state, and generate a media transmission quality index. Step S34: Determine the quality index status of the corresponding transmission direction based on the transmission direction in the media transmission quality index, determine the network quality status of the corresponding transmission direction based on the quality index status, and generate a network quality judgment status.

[0083] Specifically, in this application, step S31 follows the calibration cycle statistical snapshot formed in step S24. The calibration cycle statistical snapshot maintains the correspondence between the synchronization source identifier, media type, and media transmission statistical status. The media type is used to distinguish different categories of real-time media data, and the synchronization source identifier is used to further distinguish different media transmission objects under the same media type. Therefore, before entering the media transmission change determination process for adjacent acquisition cycles, the media transmission statistical status in the calibration cycle statistical snapshot is first distinguished according to the media type. Then, according to the synchronization source identifier, a timing correspondence is established between the media transmission statistical status of the previous acquisition cycle and the current acquisition cycle belonging to the same media transmission object, to generate a media cycle-specific statistical slice. The media cycle-specific statistical slice continues to maintain the correspondence between the synchronization source identifier, media type, and media transmission statistical status of adjacent acquisition cycles, and serves as the basis for step S32 to determine the media transmission statistical changes.

[0084] In real-time audio and video communication scenarios, media types can include audio and video. Audio and video media transmission objects exhibit different statistical characteristics in terms of frame structure, transmission rate, media reception buffer statistics, and the impact of network fluctuations on the media output process. Therefore, this application does not directly mix the media transmission statistics corresponding to different media types into the same periodic change analysis. Instead, it maintains the correspondence between media types and synchronization source identifiers. For the same synchronization source identifier, when corresponding media transmission statistics exist in both the previous and current acquisition periods, the media transmission statistics of the two acquisition periods are associated according to the acquisition sequence to generate a media-period statistical slice corresponding to the synchronization source identifier and media type. Thus, the preceding and following media transmission statistics in the media-period statistical slice describe the same media transmission object and have a definite acquisition sequence relationship, which subsequently continues to participate in the determination of media transmission statistical changes.

[0085] The media transmission statistics status in the media period statistical slice can include the aforementioned cumulative media transmission statistics status, media reception buffer statistics status, and other media transmission statistics statuses related to changes in media transmission. For the cumulative media transmission statistics status, the media period statistical slice does not directly use the cumulative media transmission statistics status itself as the media transmission statistics change for the current acquisition period. Instead, in step S32, it determines the media transmission statistics change based on the cumulative media transmission statistics status changes corresponding to adjacent acquisition periods. Therefore, differences in the base value of the cumulative media transmission statistics status caused by different communication durations or different communication start times will not be directly used as the basis for media transmission quality in the current acquisition period.

[0086] Specifically, in this application, step S32 reads the media transmission statistics status corresponding to the previous and current acquisition periods from the media period statistical slices, and determines the media transmission statistics changes between adjacent acquisition periods according to the statistical meaning of the media transmission statistics status. Taking the cumulative transmitted byte status as an example, the change between the cumulative transmitted byte status of the current acquisition period and the cumulative transmitted byte status of the previous acquisition period is used to represent the amount of newly transmitted media data between the two acquisition points; taking the cumulative transmitted frame status as an example, the change between the cumulative transmitted frame status of the current acquisition period and the cumulative transmitted frame status of the previous acquisition period is used to represent the number of newly transmitted frames between the two acquisition points. Other media transmission cumulative statistics statuses determine the corresponding media transmission statistics changes according to the same correspondence between adjacent acquisition periods.

[0087] Media transmission statistics are correlated with the synchronization source identifier, media type, and corresponding acquisition cycle to generate a periodic change representation. This periodic change representation describes the actual media transmission statistics changes occurring between adjacent acquisition cycles for the same media transmission object, rather than describing the cumulative media transmission statistics at a single acquisition point. The periodic change representation retains the aforementioned acquisition cycle relationships and the corresponding periodic time intervals, allowing subsequent generation of media transmission change states to combine media transmission statistics with the corresponding periodic time intervals, thus forming media transmission change states adapted to different target acquisition intervals.

[0088] In a preferred embodiment, if the cumulative media transmission statistics of the current acquisition period are less than those of the previous acquisition period, the system first verifies whether the previous and current acquisition periods still correspond to the same continuous statistical object based on the synchronization source identifier and media type. When the verification result indicates that the cumulative media transmission statistics have restarted, the corresponding media transmission statistics entry is marked as a continuous change in cumulative statistics. This continuous change in cumulative statistics can correspond to changes in the statistical starting point, such as the re-establishment of the media transmission object, the re-establishment of the real-time audio / video communication connection, or the re-initialization of WebRTC statistical content. For media transmission statistics entries that form a continuous change in cumulative statistics, the periodic statistical starting point of the cumulative media transmission statistics is re-established with the current acquisition period, and the media transmission statistical change is determined after a new adjacent acquisition period relationship is formed. Therefore, the continuous change in cumulative statistics continues to participate in the re-establishment of the statistical starting point for subsequent periods and is not directly interpreted as a negative change in media transmission statistics.

[0089] Specifically, in this application, step S33 generates a media transmission change state based on the media transmission statistical changes in the periodic change representation and the acquisition cycle relationship corresponding to the periodic change representation. The media transmission change state describes the changes exhibited by media data transmission, media data reception, media frame changes, media data retransmission, media data loss, and media reception buffering processes within a time range determined by adjacent acquisition cycles. The media transmission change state is formed based on the media transmission statistical states with the same synchronization source identifier and media type in adjacent acquisition cycles, and maintains the correspondence between the synchronization source identifier, media type, and acquisition cycle relationship.

[0090] As one implementation, the periodic change characterization may include a transmitted byte change state. The transmitted byte change state is formed by the change in the cumulative transmitted byte state of the current acquisition period relative to the cumulative transmitted byte state of the previous acquisition period. A transmitted bitrate state is generated based on the transmitted byte change state and the corresponding periodic time interval. The transmitted bitrate state describes the amount of media data actually transmitted per unit time within the corresponding time range of adjacent acquisition periods. Specifically, the transmitted byte change state is first determined based on the cumulative transmitted byte state of the current acquisition period and the cumulative transmitted byte state of the previous acquisition period. Then, the number of bytes represented by the transmitted byte change state is converted into the corresponding number of bits. Subsequently, the transmitted bitrate state corresponding to the unit time is determined based on the corresponding periodic time interval to generate the transmitted bitrate state. The bitrate in this application can be considered a specific implementation of the transmitted bitrate state. After the transmitted bitrate state is generated, it continues to participate in the generation of media transmission quality indicators as part of the media transmission change state.

[0091] For video media transmission objects, the transmission frame change state can be determined based on the cumulative transmission frame state of the current acquisition period and the cumulative transmission frame state of the previous acquisition period. Then, the transmission frame rate state is generated based on the transmission frame change state and the corresponding period time interval. In this application, `framesSent` or `framesEncoded` can be used as specific implementations of the cumulative transmission frame state or the cumulative encoded frame state, respectively. `fps`, or frames per second, can be used as a specific implementation of the transmission frame rate state. When there is no corresponding cumulative transmission frame state in the previous acquisition period, the current acquisition period is used as the new starting point for frame rate statistics. After forming a new relationship between adjacent acquisition periods, the transmission frame change state and the transmission frame rate state are generated, ensuring that the transmission frame rate state always originates from the changes in the cumulative transmission frame state corresponding to adjacent acquisition periods.

[0092] For the media retransmission process, the retransmitted byte change status can be determined based on the cumulative retransmitted byte status of the current acquisition period and the cumulative retransmitted byte status of the previous acquisition period. Then, the retransmitted bitrate status is generated based on the retransmitted byte change status and the corresponding period time interval. In this application, retransmittedBytesSent represents the cumulative retransmitted byte status, and retransmittedBitrate represents the retransmitted bitrate. The retransmitted bitrate status and the transmission bitrate status together maintain the correspondence between the synchronization source identifier, media type, and acquisition period, and continue to participate in the generation of media transmission quality indicators as part of the media transmission change status.

[0093] For the media data reception process, the received byte change status can be determined based on the cumulative received byte status of the current acquisition period and the cumulative received byte status of the previous acquisition period. Then, the received bitrate status is generated based on the received byte change status and the corresponding periodic time interval. Alternatively, the received frame change status can be determined based on the cumulative decoded frame status or cumulative received frame status of the current acquisition period and the corresponding cumulative decoded frame status or cumulative received frame status of the previous acquisition period. Then, the received frame rate status is generated based on the received frame change status and the corresponding periodic time interval. Thus, the transmission bitrate status, transmission frame rate status, retransmission bitrate status, received bitrate status, and received frame rate status are generated from the corresponding cumulative statistical status changes in media transmission, and together they constitute the content of the media transmission change status.

[0094] Furthermore, in this application, the media transmission change status may also include packet loss status. Packet loss status is formed based on the data packet statistics status and lost data packet statistics status corresponding to the same synchronization source identifier and media type. For the remote-inbound-rtp type media transmission statistics entries in this application, packetsLost, i.e., the cumulative lost data packet status, can be read, and combined with the corresponding data packet statistics status to determine the client packet loss status for the current collection period; for fractionLost obtained in the server-side periodic statistical snapshot according to the same synchronization source identifier, a server-side packet loss status corresponding to the client packet loss status can be formed. The aforementioned step S2 has already performed a two-way statistical deviation verification based on the client packet loss status and the server packet loss status, and updated the client statistical status that needs correction based on historical deviation information. Therefore, the packet loss status entering step S33 originates from the corrected media transmission statistical status maintained by the calibration periodic statistical snapshot, and continues to participate in the generation of media transmission quality indicators as part of the media transmission change status.

[0095] The link delay state originates from the link delay state associated with the media transmission statistical slice in the aforementioned client periodic statistical snapshot. In step S33, the corresponding link delay state is read based on the synchronization source identifier, media type, and communication link relationship corresponding to the current media transmission object, according to the periodic change characterization, and the link delay state is associated with the media transmission change state. The currentRoundTripTime in this application, i.e., the current round-trip time, can be considered a specific implementation of the link delay state. RTT stands for Round Trip Time, which describes the time elapsed for data to travel from one end to the other and back via the communication link. After being associated with the media transmission change state, the link delay state continues to participate in the generation of media transmission quality indicators.

[0096] The transmission direction is used to distinguish between the sending and receiving directions of media data relative to the current client. The transmission direction is determined based on the type of media transmission statistics entry that forms the media transmission statistics status. For example, media transmission statistics formed by outbound-rtp correspond to the sending direction, and media transmission statistics formed by inbound-rtp correspond to the receiving direction. After determining the transmission direction, it is associated with the media transmission change status and link delay status corresponding to the same synchronization source identifier and media type to generate media transmission quality indicators (MTIs). The MTIs thus maintain the correspondence between synchronization source identifier, media type, transmission direction, media transmission change status, and link delay status.

[0097] In a preferred embodiment, media transmission quality indicators are stored according to the synchronization source identifier and media type, including available states among transmit bitrate state, receive bitrate state, transmit frame rate state, receive frame rate state, retransmission bitrate state, packet loss state, jitter buffer delay state, and link delay state. If different browsers or different versions of the same browser's WebRTC statistics interface do not provide a certain media transmission statistics state, then the periodic change analysis continues to be performed on the media transmission statistics states that have been obtained and have a continuous collection period relationship, without changing the established correspondence between the synchronization source identifier, media type, and transmission direction due to the absence of a single media transmission statistics state. The available states are then organized according to the transmission direction into quality indicator states for the corresponding transmission direction and participate in the generation of network quality judgment states.

[0098] Step S34 continues to determine the quality index status of the corresponding transmission direction based on the transmission direction in the media transmission quality index. The quality index status is the state content in the media transmission quality index used to generate the network quality status of the corresponding transmission direction. In this application, the quality index status includes link delay status and packet loss status; the transmission rate status, reception rate status, transmission frame rate status, reception frame rate status, retransmission rate status, and jitter buffer delay status, as the media transmission quality status of the corresponding media transmission object, are retained in the media transmission quality index. The network quality status of the corresponding transmission direction is determined based on the quality index status of the corresponding transmission direction, and the network quality statuses of different transmission directions are correlated to generate a network quality judgment status.

[0099] Therefore, steps S31 to S34 form a continuous technical processing relationship from calibration cycle statistical snapshots to network quality determination status: the calibration cycle statistical snapshots first form media-specific statistical slices according to media type and synchronization source identifier; the media-specific statistical slices further form periodic change representations; the periodic change representations, combined with the acquisition cycle relationship, form media transmission change status; the media transmission change status, combined with link latency status and transmission direction, forms media transmission quality indicators; the media transmission quality indicators, according to transmission direction, form quality indicator status; the quality indicator status further forms the network quality status for the corresponding transmission direction; the network quality statuses for different transmission directions together form the network quality determination status. The network quality determination status then directly proceeds to step S4, used to determine the target acquisition interval for the next acquisition cycle.

[0100] Optionally, the media transmission change state in step S33 includes a jitter buffer delay state, and the generation of the jitter buffer delay state includes: Step S331: Obtain the jitter buffer cumulative state corresponding to adjacent acquisition cycles based on the periodic change characterization, and generate jitter buffer cycle slices; Step S332: Determine the buffer delay change state and buffer output change state between adjacent acquisition cycles based on the jitter buffer cycle slice, and associate the buffer delay change state and buffer output change state to generate a jitter buffer change characterization. Step S333: Generate a jitter buffer delay state based on the correspondence between the buffer delay change state and the buffer output change state in the jitter buffer change representation, and associate the jitter buffer delay state with the periodic change representation to generate the media transmission quality index.

[0101] Specifically, in this application, the jitter buffer is used to absorb changes in the arrival time of media data packets, enabling the media receiver to output the received media data in a relatively continuous output rhythm. JitterBuffer, or jitter buffer, is a type of buffer that handles jitter. The media receiver buffer statistical state in this application includes cumulative statistical content used to form the jitter buffer cumulative state in this step. In this application, trackData represents media track statistics, which may include jitterBufferDelay and jitterBufferEmittedCount. To distinguish the cumulative field from the jitter buffer delay state finally generated in step S333, this embodiment refers to the cumulative statistical content corresponding to jitterBufferDelay as the jitter buffer cumulative delay state, and the cumulative statistical content corresponding to jitterBufferEmittedCount as the jitter buffer cumulative output state. The jitter buffer cumulative delay state and the jitter buffer cumulative output state together constitute the jitter buffer cumulative state. The jitter buffer cumulative state originates from the media receiver buffer statistical state in the aforementioned client periodic statistical snapshot and continues to participate in the generation of jitter buffer periodic slices.

[0102] Step S331 reads the jitter buffer cumulative delay state and jitter buffer cumulative output state corresponding to the previous acquisition cycle and the current acquisition cycle, respectively, based on the synchronization source identifier and media type in the cycle change representation. The jitter buffer cumulative delay state and jitter buffer cumulative output state of the two acquisition cycles are paired according to the acquisition sequence to generate a jitter buffer cycle slice. The jitter buffer cycle slice continues to maintain the synchronization source identifier, media type, jitter buffer cumulative state of the previous acquisition cycle, jitter buffer cumulative state of the current acquisition cycle, and the relationship between adjacent acquisition cycles, and serves as the basis for step S332 to determine the buffer delay change state and buffer output change state.

[0103] Step S332 first determines the buffer delay change state based on the current acquisition cycle jitter buffer cumulative delay state and the previous acquisition cycle jitter buffer cumulative delay state in the jitter buffer period slice. The buffer delay change state represents the newly added cumulative buffer waiting time between adjacent acquisition time points. Subsequently, the buffer output change state is determined based on the current acquisition cycle jitter buffer cumulative output state and the previous acquisition cycle jitter buffer cumulative output state. The buffer output change state represents the change in the number of media units actually output from the jitter buffer within the same acquisition cycle relationship.

[0104] The buffer delay change state and the buffer output change state are associated according to the same synchronization source identifier, media type, and acquisition period relationship to generate a jitter buffer change characterization. The jitter buffer change characterization maintains the correspondence between the buffer delay change state and the buffer output change state, ensuring that the buffer delay change state and the buffer output change state are within the same media transmission object and the same acquisition period relationship, avoiding the combination of jitter buffer cumulative states from different media transmission objects or different acquisition period ranges to generate a jitter buffer delay state.

[0105] Step S333 generates a jitter buffer delay state based on the correspondence between the buffer delay change state and the buffer output change state in the jitter buffer change representation. Specifically, based on the cumulative buffer waiting time added in adjacent acquisition cycles and the change in the number of media units actually output in the same acquisition cycle, the average buffer waiting state corresponding to the current acquisition cycle is determined to generate the jitter buffer delay state. The jitterBufferMs in this application can be used as a specific implementation of the jitter buffer delay state, which uses milliseconds to describe the average buffer waiting state corresponding to each media unit output from the jitter buffer in adjacent acquisition cycles.

[0106] When the buffer output change status indicates that no new media units are output from the jitter buffer in the current acquisition cycle, the jitter buffer delay status corresponding to the average media unit is not generated based on the buffer delay change status of that acquisition cycle. Instead, the jitter buffer cumulative status of the current acquisition cycle is retained. After a valid buffer output change status is formed in a subsequent acquisition cycle, the buffer delay change status and buffer output change status are determined based on the new jitter buffer cycle slice. This avoids the formation of a jitter buffer delay status lacking practical statistical significance when the buffer output change status does not reflect a change in the number of valid media units.

[0107] In a preferred embodiment, when the jitter buffer cumulative state of the current acquisition cycle is less than the jitter buffer cumulative state of the previous acquisition cycle and the corresponding statistics have been restarted, a jitter buffer cumulative continuous change state is generated. The statistical starting point of the jitter buffer cumulative state is re-established based on this continuous change state, and jitter buffer cycle slices are regenerated after a new adjacent acquisition cycle relationship is formed. The jitter buffer cumulative continuous change state is used to control the establishment of a new jitter buffer statistical starting point and does not directly participate in the generation of the jitter buffer delay state as a buffer delay change state or buffer output change state.

[0108] After generating the jitter buffer delay state, it is associated with the periodic variation representation according to the synchronization source identifier and media type. This ensures that the jitter buffer delay state maintains consistency with the transmission rate state, reception rate state, transmission frame rate state, reception frame rate state, retransmission rate state, and packet loss state corresponding to the same media transmission object, maintaining a consistent acquisition period relationship. The periodic variation representation then proceeds to the media transmission quality index generation process in step S33. Therefore, the jitter buffer delay state can be included in the same media transmission quality index along with the link delay state.

[0109] Furthermore, in this application, the link delay state describes the time state of media data during the round-trip time of the communication link, and the jitter buffer delay state describes the average buffering wait state of the media data after entering the jitter buffer at the receiving end. The link delay state and the jitter buffer delay state describe different time stages in the media transmission process; therefore, they are stored separately in the media transmission quality index. By simultaneously retaining both the link delay state and the jitter buffer delay state, the media transmission quality index can distinguish between changes in the communication link round-trip time and changes in the receiving-side buffering wait, and can continue to be used for quality index status and network quality status analysis in the corresponding transmission direction.

[0110] Optionally, step S34 includes: Step S341: Determine the media transmission quality index corresponding to different transmission directions according to the transmission direction in the media transmission quality index; Step S342: Based on the link delay status in the media transmission quality indicators corresponding to different transmission directions, generate the corresponding delay quality level according to the preset delay level correspondence. Step S343: Based on the packet loss status in the media transmission quality indicators corresponding to different transmission directions, generate the corresponding packet loss quality level according to the preset packet loss level correspondence. Step S344: Verify the delay quality level and packet loss quality level corresponding to the same transmission direction according to the preset direction level synthesis rules, generate the network quality level of the corresponding transmission direction, and generate the network quality judgment status according to the network quality level of different transmission directions.

[0111] Specifically, in this application, step S341 determines the media transmission quality indicators corresponding to different transmission directions according to the transmission direction in the media transmission quality indicators. From the current client's perspective, the transmission direction includes the sending direction and the receiving direction. The sending direction corresponds to the transmission process of the client sending real-time audio and video media data to the remote end, and the receiving direction corresponds to the transmission process of the client receiving real-time audio and video media data from the remote end. In this application, uplink network quality level and downlink network quality level are used to describe the network quality status of the two transmission directions respectively. Therefore, the media transmission quality indicator corresponding to the sending direction can form the uplink media transmission quality indicator, and the media transmission quality indicator corresponding to the receiving direction can form the downlink media transmission quality indicator. Both the uplink media transmission quality indicator and the downlink media transmission quality indicator continue to maintain the corresponding link delay state and packet loss state, and proceed to steps S342 and S343 respectively.

[0112] Step S342 reads the link delay status from the media transmission quality indicators corresponding to different transmission directions, and then generates the corresponding delay quality level according to the preset delay level correspondence. The preset delay level correspondence is configured before performing network quality determination. Its configuration includes multiple preset delay level boundaries arranged from lower to higher ranges according to the link delay status, and the delay quality level corresponding to each preset delay level interval. After the link delay status enters the corresponding preset delay level interval, the delay quality level corresponding to the preset delay level interval is used as the delay quality level of the corresponding transmission direction.

[0113] As one implementation method, a lower link latency state corresponds to a latency quality level with a lower degree of quality degradation. When the link latency state crosses a higher preset latency level boundary, the corresponding latency quality level changes according to a preset quality degradation order. The multi-level round-trip latency boundary in this application can be used as a specific configuration method for the preset latency level correspondence. The specific preset latency level boundary is used to illustrate the implementation method of the preset latency level correspondence and does not change the processing relationship of determining the latency quality level through the interval where the link latency state is located.

[0114] Step S343 processes packet loss status in the same manner as step S342. The preset packet loss level correspondence is configured before network quality determination. This configuration includes multiple preset packet loss level boundaries arranged from lower to higher ranges according to packet loss status, and the packet loss quality level corresponding to each preset packet loss level interval. After reading the packet loss status from the media transmission quality index corresponding to a certain transmission direction, the position of the packet loss status relative to the multiple preset packet loss level boundaries is determined, and the packet loss quality level for the corresponding transmission direction is generated based on the preset packet loss level interval where the packet loss status is located.

[0115] As one implementation method, lower packet loss states correspond to packet loss quality levels with lower quality degradation. When a packet loss state crosses a higher preset packet loss classification boundary, the corresponding packet loss quality level changes according to a preset quality degradation order. The multi-level packet loss rate boundaries in this application can be used as a specific configuration method for the preset packet loss level correspondence. The specific preset packet loss classification boundaries are used to illustrate the implementation method of the preset packet loss level correspondence and do not change the processing relationship of determining the packet loss quality level through the interval where the packet loss state is located.

[0116] Step S344 verifies the delay quality level and packet loss quality level within the same transmission direction according to a preset direction level synthesis rule. The preset direction level synthesis rule determines how to generate the network quality level for the corresponding transmission direction when both delay quality level and packet loss quality level exist simultaneously in the same transmission direction. In one embodiment, the preset direction level synthesis rule verifies the delay quality level and packet loss quality level of the same transmission direction according to a preset quality degradation order, and determines the quality level with the higher degree of quality degradation as the network quality level for the corresponding transmission direction. The network quality level for the corresponding transmission direction is then associated with the corresponding transmission direction and participates in the generation of the network quality determination state.

[0117] Therefore, when the link delay state corresponds to a delay quality level with a lower degree of quality degradation, and the packet loss state corresponds to a packet loss quality level with a higher degree of quality degradation, the network quality level for the corresponding transmission direction is determined by the packet loss quality level; conversely, when the packet loss state corresponds to a packet loss quality level with a lower degree of quality degradation, and the link delay state corresponds to a delay quality level with a higher degree of quality degradation, the network quality level for the corresponding transmission direction is determined by the delay quality level. The preset direction level synthesis rule ensures that the link delay state and packet loss state are mapped to the same dimensions before quality level verification, rather than directly comparing the original values ​​of the link delay state and packet loss state.

[0118] After generating network quality levels for different transmission directions, a network quality assessment status is generated based on these levels. The network quality assessment status retains the correspondence between different transmission directions and network quality levels, enabling step S4 to determine the current quality level and the target acquisition interval for the next acquisition cycle based on the network quality assessment status.

[0119] In a preferred embodiment, the media type and synchronization source identifier continue to be associated with the media transmission quality index. Therefore, when multiple synchronization source identifiers exist in the same real-time audio and video communication, a corresponding media transmission quality index is first formed based on each synchronization source identifier and media type, and then a network quality level for the corresponding transmission direction is formed based on the transmission direction in the media transmission quality index. When media quality callback information needs to be generated, the synchronization source identifier, media type, and transmission direction are read from the media transmission quality index; when network quality judgment status needs to be generated, a network quality judgment status is formed based on the network quality levels for different transmission directions. The synchronization source identifier, media type, and transmission direction then continue to participate in the generation of the network quality callback result in step S5.

[0120] Optionally, the preset latency level correspondence is configured to determine the latency quality level based on the position of the link latency state relative to multiple preset latency classification boundaries, and the preset packet loss level correspondence is configured to determine the packet loss quality level based on the position of the packet loss state relative to multiple preset packet loss classification boundaries. According to the preset direction level synthesis rule, the latency quality level and packet loss quality level of the same transmission direction are verified according to the preset quality degradation order to generate the network quality level of the corresponding transmission direction. The WebRTC connection status is obtained, the connection anomaly status is determined based on the WebRTC connection status, the network quality level of the corresponding transmission direction is updated based on the connection anomaly status, and a network quality judgment status is generated.

[0121] Specifically, in this application, multiple preset delay classification boundaries are arranged from lower to higher ranges according to the link delay status, and multiple preset delay classification intervals are formed by these multiple preset delay classification boundaries. Each preset delay classification interval corresponds to a delay quality level. When determining the delay quality level, the link delay status is read from the media transmission quality index, the preset delay classification interval in which the link delay status is located is determined, and the corresponding delay quality level is determined based on the preset delay classification interval. Thus, the correspondence between preset delay levels consists of the correspondence between preset delay classification boundaries, preset delay classification intervals, and delay quality levels, and is further used to generate delay quality levels for different transmission directions.

[0122] Multiple preset packet loss classification boundaries are arranged from lower to higher packet loss states, forming multiple preset packet loss classification intervals. Each preset packet loss classification interval corresponds to a packet loss quality level. When determining the packet loss quality level, the packet loss state is read from the media transmission quality index, the preset packet loss classification interval in which the packet loss state falls is determined, and the corresponding packet loss quality level is determined based on that interval. Therefore, the preset packet loss level correspondence consists of the correspondence between the preset packet loss classification boundaries, the preset packet loss classification intervals, and the packet loss quality levels, and is further used to generate packet loss quality levels for different transmission directions.

[0123] The preset latency level correspondence and preset packet loss level correspondence are configured according to the respective units of link latency status and packet loss status. Therefore, direct numerical comparisons between link latency status and packet loss status based on different units are not performed. Link latency status is first converted to latency quality level, and packet loss status is first converted to packet loss quality level. Then, the latency quality level and packet loss quality level are verified according to the preset quality degradation order. The preset quality degradation order defines the arrangement of network quality levels from lower to higher degradation levels and serves as the common order for verifying latency quality level and packet loss quality level in the preset directional level synthesis rules.

[0124] After generating the network quality level for the corresponding transmission direction according to the preset direction level synthesis rules, the WebRTC connection status is further obtained. The WebRTC connection status is derived from the current real-time audio and video communication connection and is used to describe whether the current real-time audio and video communication connection is still in a normal media transmission state. When the WebRTC connection status indicates that the real-time audio and video communication connection has been disconnected or is in the process of being re-established, a connection anomaly status is generated based on the WebRTC connection status. The connection anomaly status continues to serve as the basis for updating the network quality level for the corresponding transmission direction.

[0125] The statistical quality changes described by connection anomaly status have different meanings than those described by latency quality level or packet loss quality level. Latency quality level and packet loss quality level are quality levels generated based on link latency and packet loss status when real-time audio / video communication connections can still transmit media. Connection anomaly status indicates that the real-time audio / video communication connection has entered a stage where it cannot be evaluated according to normal continuous transmission status. Therefore, when there is no connection anomaly status, the network quality level for the corresponding transmission direction is generated based on the latency quality level and packet loss level; when a connection anomaly status is generated, the network quality level for the corresponding transmission direction is updated according to the connection anomaly status.

[0126] In a preferred embodiment, the connection anomaly state has an update priority relationship for the network quality level of the corresponding transmission direction generated based on the latency quality level and packet loss quality level. This update priority relationship means that: when the WebRTC connection state is still in a normal media transmission state, the network quality level of the corresponding transmission direction generated according to the preset direction level synthesis rule is retained; when the WebRTC connection state becomes a connection anomaly state, the network quality level of the corresponding transmission direction is updated to the network quality level corresponding to the connection anomaly state. The network disconnection level used in this application when the network is disconnected or reconnected can be considered as a specific implementation of updating the network quality level in the connection anomaly state.

[0127] After updating the network quality level for the corresponding transmission direction based on the connection anomaly status, the network quality levels for different transmission directions are associated according to the transmission direction to generate a network quality determination status. This network quality determination status then proceeds to step S4, which determines the current quality level and the target acquisition interval for the next acquisition cycle.

[0128] Optionally, step S4 includes: Step S41: Determine the network quality level corresponding to different transmission directions based on the network quality judgment status, and determine the current quality level based on the network quality level; Step S42: Determine the target acquisition interval corresponding to the current quality level according to the preset correspondence between quality level and acquisition interval; Step S43: Determine the acquisition sequence of the next acquisition cycle according to the target acquisition interval, generate an acquisition scheduling state according to the acquisition sequence, associate the acquisition scheduling state with the network quality judgment state, and generate a network quality assessment result.

[0129] Specifically, in this application, step S41 follows the network quality assessment status generated in step S34. The network quality assessment status maintains the correspondence between different transmission directions and their corresponding network quality levels. Therefore, step S41 first reads the network quality levels corresponding to different transmission directions from the network quality assessment status, and then determines the current quality level based on these network quality levels. The current quality level represents the control level of the network quality levels for different transmission directions in subsequent acquisition interval adjustments, and continues to serve as the direct basis for determining the target acquisition interval in step S42.

[0130] In one embodiment, the current quality level is determined based on the network quality levels with higher quality degradation in different transmission directions according to a preset quality degradation order. When the network quality level in one transmission direction is at a lower quality degradation level, while the network quality level in another transmission direction has entered a higher quality degradation level, the current quality level is determined based on the higher quality degradation level. Thus, the current quality level reflects the transmission direction that requires an increased frequency of subsequent network status data collection. Once determined, the current quality level remains associated with the corresponding network quality level and is used to generate the data collection interval adjustment status.

[0131] The preset correspondence between quality levels and acquisition intervals is configured before performing network quality assessment. This preset correspondence describes the acquisition interval adjustment method corresponding to different current quality levels. The configuration may include an increasing acquisition interval relationship corresponding to stable network quality, a baseline acquisition interval relationship corresponding to network quality in a periodic monitoring state, and a decreasing acquisition interval relationship corresponding to abnormal network quality. The preset correspondence may also include preset extension boundaries and preset shortening boundaries to limit the adjustment range of the target acquisition interval in a continuous acquisition cycle. The configured preset correspondence between quality levels and acquisition intervals is then used in steps S42 and S422 to determine the target acquisition interval.

[0132] Step S42 queries the preset correspondence between quality levels and acquisition intervals based on the current quality level, and determines the target acquisition interval for the next acquisition cycle based on the query result. The target acquisition interval represents the target time interval between the end of the current acquisition cycle and the invocation of the WebRTC statistics interface in the next acquisition cycle. After the target acquisition interval is determined, proceed to step S43, which is used to generate the acquisition timing sequence for the next acquisition cycle.

[0133] Step S43 determines the acquisition sequence for the next acquisition cycle based on the target acquisition interval and the acquisition time point of the current acquisition cycle. The acquisition sequence includes at least the acquisition time point when the WebRTC statistics interface is called in the next acquisition cycle. After generating the acquisition scheduling state based on the acquisition sequence, the acquisition scheduling state is associated with the network quality judgment state that generated it to generate a network quality assessment result. The network quality assessment result thus maintains at least the correspondence between the network quality judgment state and the acquisition scheduling state.

[0134] The data acquisition scheduling state then directly participates in the acquisition of WebRTC periodic statistics for the next acquisition cycle. When the acquisition time point corresponding to the data acquisition scheduling state arrives, the WebRTC statistics interface is called again to obtain client statistics for the next acquisition cycle. Following the aforementioned step S11, a periodic correspondence is established between the client statistics for the next acquisition cycle and the client statistics snapshot from the previous acquisition cycle to generate new WebRTC periodic statistics. Therefore, the data acquisition scheduling state formed in step S4 maintains a continuous technical relationship with the re-execution of step S1 in the next acquisition cycle. The current network quality judgment state influences the statistical acquisition timing of the next acquisition cycle through the data acquisition scheduling state.

[0135] Specifically, when the current quality level corresponding to the network quality assessment status indicates stable network quality, the current collection interval can be increased according to the preset correspondence between the quality level and the collection interval to form a relatively long target collection interval, thereby reducing the frequency of WebRTC statistics interface calls during periods of stable network quality. Conversely, when the current quality level corresponding to the network quality assessment status indicates abnormal network quality, the current collection interval can be decreased according to the preset correspondence between the quality level and the collection interval to form a relatively short target collection interval, enabling the formation of new WebRTC cycle statistics information earlier in the next collection cycle. Thus, the current network quality assessment status continuously influences the statistical collection timing of the next collection cycle through the current quality level, the target collection interval, and the collection scheduling status.

[0136] Optionally, step S42 includes: Step S421: Determine the acquisition interval adjustment state based on the current quality level and the corresponding network quality level; Step S422: When the acquisition interval adjustment state indicates that the network quality is stable, the current acquisition interval is increased according to the preset correspondence between the quality level and the acquisition interval to obtain the target acquisition interval for the next acquisition cycle. When the acquisition interval adjustment state indicates that the network quality is in a periodic monitoring state, the baseline acquisition interval is determined according to the preset correspondence between the quality level and the acquisition interval, and the target acquisition interval for the next acquisition cycle is determined according to the baseline acquisition interval. When the acquisition interval adjustment state indicates that the network quality is abnormal, the current acquisition interval is decreased according to the preset correspondence between the quality level and the acquisition interval to obtain the target acquisition interval for the next acquisition cycle.

[0137] Specifically, in this application, step S421 reads the network quality level corresponding to the current quality level and determines the acquisition interval adjustment state based on the position of the network quality level in the preset quality degradation order. The acquisition interval adjustment state indicates the adjustment method adopted by the target acquisition interval of the next acquisition cycle relative to the current acquisition interval. The acquisition interval adjustment state includes an acquisition interval adjustment state representing stable network quality, an acquisition interval adjustment state representing network quality in a periodic monitoring state, and an acquisition interval adjustment state representing abnormal network quality. The acquisition interval adjustment state then proceeds to step S422 and is used to select the corresponding acquisition interval adjustment relationship in the preset correspondence between quality level and acquisition interval.

[0138] The current acquisition interval is derived from the target acquisition interval actually used in the current acquisition cycle. Before the start of the current acquisition cycle, the previous acquisition cycle generates an acquisition scheduling state based on the network quality assessment status, and the acquisition time point of the current acquisition cycle is determined by the acquisition scheduling state. Therefore, the target acquisition interval actually used in the current acquisition cycle forms the current acquisition interval within the current acquisition cycle. The current acquisition interval then serves as the basis for increasing or decreasing the acquisition interval in step S422, ensuring a direct continuity between the target acquisition intervals of consecutive acquisition cycles.

[0139] When the network quality is stable according to the acquisition interval adjustment state, the current acquisition interval is increased according to the preset correspondence between quality level and acquisition interval to generate the target acquisition interval for the next acquisition cycle. When increasing the current acquisition interval, the current acquisition interval can be gradually increased according to the adjustment step size in the preset correspondence between quality level and acquisition interval, and the increase range of the target acquisition interval is limited according to a preset extension boundary. In this application, gradually extending the acquisition interval to a second-level upper limit when the network quality is at a relatively good level can be considered a specific implementation of the preset extension boundary and adjustment method. The generated target acquisition interval then proceeds to step S43 to form the acquisition scheduling state.

[0140] When the data acquisition interval adjustment status indicates that the network quality is in a periodic monitoring state, the baseline data acquisition interval is read according to the preset correspondence between the quality level and the data acquisition interval, and the target data acquisition interval for the next data acquisition cycle is determined based on the baseline data acquisition interval. The baseline data acquisition interval can be the regular WebRTC periodic statistical information acquisition interval pre-configured after the real-time audio and video communication connection is established. If the current data acquisition interval was previously increased due to stable network quality, after the network quality enters the periodic monitoring state, the target data acquisition interval is formed based on the baseline data acquisition interval, so that the statistical data acquisition in the next data acquisition cycle resumes according to the baseline data acquisition interval.

[0141] When the acquisition interval adjustment status indicates an abnormal network quality, the current acquisition interval is reduced according to the preset correspondence between quality levels and acquisition intervals to generate the target acquisition interval for the next acquisition cycle. When reducing the current acquisition interval, the adjustment method in the preset correspondence between quality levels and acquisition intervals can be followed, and the minimum range of the target acquisition interval is limited by a preset shortening boundary. In this application, shortening the acquisition interval to sub-second levels when the network quality enters a poor level or a connection anomaly state can be considered a specific implementation of the preset shortening boundary. The generated target acquisition interval then proceeds to step S43 to form an acquisition scheduling state.

[0142] In a preferred embodiment, when multiple consecutive acquisition cycles form a stable acquisition interval adjustment state, a new target acquisition interval is gradually generated based on the current acquisition interval until the target acquisition interval reaches a preset extension boundary. When the network quality level corresponding to any transmission direction enters the current quality level that indicates the network quality is in a periodic monitoring state, a target acquisition interval is formed using a reference acquisition interval. When the network quality level corresponding to any transmission direction enters the current quality level that indicates an abnormal network quality, a shorter target acquisition interval is formed based on the current acquisition interval and a preset shortening boundary. Thus, the target acquisition interval changes with the network quality judgment state of consecutive acquisition cycles, rather than using a fixed acquisition interval in each acquisition cycle.

[0143] The acquisition interval adjustment process and the aforementioned resampling deviation status verification process operate on different technical aspects. The acquisition scheduling state is used to determine the acquisition time point for calling the WebRTC statistics interface in the next acquisition cycle; the statistical snapshot to be verified is used to determine the synchronization source identifier that needs to be prioritized for resampling deviation status verification after the acquisition time point arrives and new WebRTC cycle statistics information is formed. When a statistical snapshot to be verified exists, the corresponding dual-end statistical status is read first based on the synchronization source identifier that needs to be re-verified in the statistical snapshot to be verified, and a resampling deviation status is formed; when no statistical snapshot to be verified exists, the media transmission statistical status of the corresponding synchronization source identifier is processed according to the regular cycle statistical process. Thus, the acquisition scheduling state and the statistical snapshot to be verified operate on the acquisition timing and the post-acquisition statistical processing order, respectively, and there is no conflict between the two processing objects.

[0144] Optionally, step S5 is also included: Step S51: Determine the corresponding synchronization source identifier, media type and transmission direction according to the media transmission quality index; determine the network quality status corresponding to the transmission direction according to the network quality judgment status; associate the synchronization source identifier, media type, transmission direction and network quality status to generate media quality callback information. Step S52: Obtain the network quality status corresponding to different transmission directions based on the network quality assessment results, and generate quality conclusion callback information; Step S53: Based on the synchronization source identifier and media type, associate the media quality callback information with the quality conclusion callback information to generate a network quality callback result; Step S54: Output the network quality callback result through the network quality callback interface.

[0145] Specifically, in this application, step S51 reads the corresponding synchronization source identifier, media type, and transmission direction based on the media transmission quality index, and then reads the network quality status corresponding to the transmission direction from the network quality judgment status. The synchronization source identifier is used to determine the media transmission object corresponding to the media quality callback information, the media type is used to determine the media category corresponding to the media quality callback information, the transmission direction is used to determine the sending or receiving direction corresponding to the media quality callback information, and the network quality status is used to describe the network quality judgment result for the corresponding transmission direction. The synchronization source identifier, media type, transmission direction, and network quality status are associated to generate media quality callback information. The media quality callback information is then further associated with the quality conclusion callback information.

[0146] Media quality callback information is used to describe the network quality status of the corresponding media transmission object. When multiple synchronization source identifiers exist in the same real-time audio and video communication, media quality callback information is generated separately for each synchronization source identifier. For audio media transmission objects, the media quality callback information maintains the correspondence between the corresponding synchronization source identifier, audio media type, transmission direction, and network quality status; for video media transmission objects, the media quality callback information maintains the correspondence between the corresponding synchronization source identifier, video media type, transmission direction, and network quality status. Therefore, the media quality callback information corresponding to different media transmission objects can be distinguished based on the synchronization source identifier and media type.

[0147] Step S52 obtains the network quality status corresponding to different transmission directions based on the network quality judgment status in the network quality assessment results, and associates the network quality status corresponding to different transmission directions to generate quality conclusion callback information. The quality conclusion callback information describes the network quality judgment results for different transmission directions formed in the current acquisition period. The media quality callback information maintains the correspondence between the synchronization source identifier and media type at the media transmission object level, while the quality conclusion callback information maintains the correspondence between network quality statuses at the different transmission directions level. Both originate from the media transmission quality indicators, network quality judgment status, and network quality assessment results formed in the same acquisition period.

[0148] Step S53 associates the media quality callback information with the quality conclusion callback information based on the synchronization source identifier and media type to generate a network quality callback result. The network quality callback result thus simultaneously maintains the media quality callback information corresponding to the media transmission object and the quality conclusion callback information corresponding to different transmission directions in the current acquisition period. In specific data organization, media quality callback information can be saved according to the synchronization source identifier and media type, and the quality conclusion callback information corresponding to different transmission directions can be saved in the same network quality callback result, enabling the network quality callback result to express the current network quality status at both the media transmission object level and the transmission direction level.

[0149] The network quality callback interface is configured as a callback interface for outputting network quality callback results before performing network quality assessment. The `onNetworkQuality` method in this application can be a specific implementation of the network quality callback interface. `onNetworkQuality` is used to output the network quality callback result to the application layer function that called the network quality assessment method after the network quality determination status has been updated. After outputting the network quality callback result through the network quality callback interface in step S54, the network quality callback result can enter the network quality display, network status prompt, or other data processing procedures based on the network quality status. The network quality callback result maintains its correspondence with the network quality assessment result that generated it after it is output.

[0150] In a preferred embodiment, the network quality callback result is associated with the network quality assessment result of the corresponding acquisition period according to the acquisition sequence. Therefore, each network quality callback result can maintain a correspondence with the network quality judgment state, acquisition scheduling state, and target acquisition interval that generated the callback result. When the target acquisition interval changes in consecutive acquisition periods, the network quality judgment state and subsequent acquisition scheduling state corresponding to each network quality callback result can be distinguished according to the acquisition sequence.

[0151] Optionally, step S5 is also included: Step S51: Determine the abnormal statistical status and its corresponding synchronization source identifier based on the abnormal deviation location information; generate a two-end statistical inconsistency status based on the abnormal statistical status; associate the two-end statistical inconsistency status with the corresponding synchronization source identifier; and generate two-end abnormal callback information. Step S52: Generate quality callback information based on the network quality assessment results; Step S53: Associate the dual-end abnormal callback information with the quality callback information according to the synchronization source identifier to generate an abnormal network quality callback result; Step S54: Output the abnormal network quality callback result through the network quality callback interface.

[0152] Specifically, in this application, step S51 in this embodiment follows the abnormal deviation location information generated in step S234. The abnormal deviation location information includes the abnormal statistical state determined by the deviation verification result and the re-verification result, as well as the synchronization source identifier corresponding to the abnormal statistical state. Therefore, after reading the abnormal statistical state and the corresponding synchronization source identifier based on the abnormal deviation location information, it is possible to determine the media transmission object that needs to generate a dual-end statistical inconsistency state.

[0153] A statistical inconsistency status is generated based on the abnormal statistical status. This status indicates that, even after deviation verification and re-verification, the client and server statistical statuses corresponding to the same synchronization source identifier still exhibit a persistent statistical deviation across time periods. This inconsistency describes the statistical consistency between the client and server statistical statuses, but does not replace the network quality status formed based on media transmission quality indicators. The statistical inconsistency status is then associated with the corresponding synchronization source identifier to generate a dual-end anomaly callback message. This callback message is subsequently associated with the quality callback message.

[0154] In one embodiment, when the deviation verification result first indicates that the two-end deviation state exceeds the preset deviation boundary, a statistical snapshot to be verified is generated based on the synchronization source identifier to be verified again, instead of directly generating a two-end statistical inconsistency state; only when the re-verification result still indicates that the resampling deviation state exceeds the preset deviation boundary, and further an abnormal statistical state is formed based on the cross-cycle deviation change state, is a two-end statistical inconsistency state generated based on the abnormal statistical state. Therefore, the two-end abnormal callback information describes the two-end statistical inconsistency state formed after cross-cycle re-verification, rather than a two-end deviation state temporarily formed in a single acquisition cycle.

[0155] Step S52 generates quality callback information based on the network quality judgment status in the network quality assessment results. The quality callback information describes the network quality judgment status formed in the current acquisition period and the network quality assessment result corresponding to that status. The quality callback information originates from the media transmission quality analysis and network quality judgment processes, while the end-to-end anomaly callback information originates from the end-to-end statistical deviation verification and resampling deviation status verification processes. The quality callback information and the end-to-end anomaly callback information respectively describe the network quality status and the end-to-end statistical consistency status.

[0156] Step S53 associates the dual-end anomaly callback information with the quality callback information based on the synchronization source identifier to generate an anomaly network quality callback result. The anomaly network quality callback result thus simultaneously retains both the quality callback information and the dual-end anomaly callback information corresponding to the synchronization source identifier. Through the synchronization source identifier, it can be determined which media transmission object corresponds to the dual-end statistical inconsistency state in the anomaly network quality callback result. In this application, marking the dual-end data inconsistency corresponding to the synchronization source identifier as an independent field in the quality callback can serve as a specific data organization method for the anomaly network quality callback result.

[0157] Step S54 outputs the abnormal network quality callback result through the network quality callback interface. The abnormal network quality callback result can be output through the same network quality callback interface as the aforementioned network quality callback result. When there is no statistical inconsistency between the two ends, the network quality callback result is output through the network quality callback interface; when there is statistical inconsistency between the two ends, the abnormal callback information from both ends is associated with the quality callback information to form the abnormal network quality callback result, and this abnormal network quality callback result is output through the network quality callback interface. Therefore, the network quality callback interface continues to serve as the unified output interface for network quality assessment results and statistical consistency status between the two ends.

[0158] In a preferred embodiment, when the re-verification result indicates that the resampling deviation status is within a preset deviation boundary, no abnormal statistical status is generated based on the cross-cycle deviation change status, and the pending verification status corresponding to the synchronization source identifier that needs to be re-verified is revoked. Therefore, no dual-end statistical inconsistency status or dual-end abnormal callback information is generated corresponding to the synchronization source identifier. Subsequent collection cycles generate network quality callback results based on the current network quality assessment results. When subsequent new deviation verification results and re-verification results again generate abnormal statistical statuses, new dual-end statistical inconsistency statuses and dual-end abnormal callback information are generated based on the abnormal statistical statuses.

[0159] Furthermore, in this application, media quality callback information, quality conclusion callback information, end-to-end anomaly callback information, and quality callback information all maintain a correspondence with their source technical status. Media quality callback information originates from media transmission quality indicators and network quality judgment status; quality conclusion callback information originates from the network quality judgment status in the network quality assessment results; end-to-end anomaly callback information originates from the anomaly statistical status and synchronization source identifier in the anomaly deviation location information; and quality callback information originates from the network quality assessment results. The network quality callback result is formed by media quality callback information and quality conclusion callback information, and the abnormal network quality callback result is formed by end-to-end anomaly callback information and quality callback information. Therefore, each callback information can be traced back to the aforementioned statistical collection, end-to-end statistical deviation verification, and network quality judgment process.

[0160] like Figure 2 As shown, this is an embodiment of a network quality assessment device according to this application, comprising: The dual-end statistical mapping module is used to obtain the WebRTC periodic statistical information of the client, obtain the corresponding server-side statistical information according to the synchronization source identifier in the WebRTC periodic statistical information, establish the statistical correspondence between the client and the server based on the synchronization source identifier, and generate a dual-end periodic statistical mapping. The deviation calibration module is used to verify the two-end statistical deviation according to the two-end periodic statistical mapping, determine the abnormal statistical state, generate the correction statistical state according to the historical deviation information corresponding to the abnormal statistical state, update the two-end periodic statistical mapping according to the correction statistical state, and generate a calibration periodic statistical snapshot. The quality assessment module is used to determine the media transmission changes in adjacent acquisition cycles based on the statistical snapshot of the calibration cycle, generate a cycle change characterization, generate a media transmission quality index based on the cycle change characterization, and generate a network quality assessment status based on the media transmission quality index. The data acquisition and scheduling module is used to determine the target acquisition interval for the next acquisition cycle based on the network quality assessment status, generate an acquisition scheduling status based on the target acquisition interval, associate the acquisition scheduling status with the network quality assessment status, and generate a network quality assessment result.

[0161] like Figure 3 As shown, an electronic device according to an embodiment of this application includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement any of the above-described network quality assessment methods.

[0162] like Figure 4 As shown, this is an embodiment of a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements any of the above-described network quality assessment methods.

[0163] like Figure 5 As shown, this is an embodiment of a network quality assessment system according to this application, including a client device and a media server. The client device is configured with WebRTCSDK and establishes a real-time audio and video communication connection with the media server. The media server is used to provide corresponding server-side statistical information according to the synchronization source identifier; The WebRTCSDK is used to periodically obtain WebRTC periodic statistics information of the client device, obtain server-side statistics information based on the synchronization source identifier in the WebRTC periodic statistics information, and establish a statistical correspondence between the client and the server based on the synchronization source identifier to generate a dual-end periodic statistics mapping. The WebRTCSDK is also used to verify the two-end statistical deviation according to the two-end periodic statistical mapping to determine the abnormal statistical state, generate the correction statistical state according to the historical deviation information corresponding to the abnormal statistical state, and update the two-end periodic statistical mapping according to the correction statistical state to generate a calibration periodic statistical snapshot. The WebRTCSDK is also used to determine the media transmission changes in adjacent acquisition cycles based on the calibration cycle statistical snapshot, to generate a cycle change characterization, to generate a media transmission quality index based on the cycle change characterization, to generate a network quality judgment status based on the media transmission quality index, to determine the target acquisition interval for the next acquisition cycle based on the network quality judgment status, to generate an acquisition scheduling status based on the target acquisition interval, and to associate the acquisition scheduling status with the network quality judgment status to generate a network quality evaluation result and output it to the application layer of the client device.

[0164] In one specific embodiment, this application is applied to the real-time audio and video communication process in an online classroom. The client device runs the WebRTCSDK and establishes a real-time audio and video communication connection through RTCPeerConnection. By default, 1 second can be configured as the initial acquisition interval, and statistical acquisition is performed periodically according to the initial acquisition interval. When a statistical acquisition begins, the client statistical snapshot saved in the previous acquisition period is read first. The lastStats in this application can be used as a specific implementation of the client statistical snapshot of the previous acquisition period. lastStats is used to save the statistical content corresponding to the current media transmission object in the previous acquisition period. Then, transport.getStats() is called to obtain the StatsReport of the current acquisition period. StatsReport is the statistical report returned by the WebRTC statistical interface in the current acquisition period. The StatsReport as a whole constitutes the client statistical information of the current acquisition period. After parsing the media transmission statistical entries in StatsReport, the statistical entries corresponding to a certain synchronization source identifier and media type in the current acquisition period can be recorded as currentStats. currentStats is the current statistical content of the corresponding media transmission object in the current acquisition period. Simultaneously, the collection time points of the previous collection cycle and the current collection cycle are recorded respectively, and the cycle time interval is determined based on the collection time points of the previous and current collection cycles. The `seconds` parameter in this application can be used as a specific implementation of the cycle time interval. Therefore, the client statistical snapshot of the previous collection cycle, the client statistical information of the current collection cycle, and the cycle time interval are established according to the collection sequence to generate WebRTC cycle statistics. After completing the statistical processing of the current collection cycle, the client cycle statistical snapshot formed in the current collection cycle is saved to `Transport.appData.stats`, and the `timestamp` field is updated synchronously. The `timestamp` field is used to save the collection time point of the current collection cycle, so that the client cycle statistical snapshot of the current collection cycle can participate in the establishment of the cycle correspondence in the next collection cycle as a new client statistical snapshot of the previous collection cycle.

[0165] After obtaining the StatsReport, the media transmission statistics entries in the StatsReport are parsed according to the entry type. For media transmission statistics entries of the remote-inbound-rtp type, packetsLost and jitter are read. PacketsLost represents the cumulative lost packet status for the corresponding media transmission object at the remote end, and jitter represents the network jitter status corresponding to the change in packet arrival time. At the same time, the kind field is read to determine the media type. If kind is audio, it corresponds to an audio media transmission object; if kind is video, it corresponds to a video media transmission object. For media transmission statistics entries of the outbound-rtp type, the cumulative media transmission statistics status such as bytesSent, packetsSent, framesEncoded, and retransmittedBytesSent are read. Among them, bytesSent represents the cumulative number of bytes sent, packetsSent represents the cumulative number of data packets sent, framesEncoded represents the cumulative number of encoded frames, and retransmittedBytesSent represents the cumulative number of retransmitted bytes. For inbound-rtp type media transmission statistics entries, the cumulative media transmission statistics statuses such as bytesReceived, packetsReceived, framesDecoded, and framesDropped are read. bytesReceived represents the cumulative received bytes status, packetsReceived represents the cumulative received data packets status, framesDecoded represents the cumulative decoded frames status, and framesDropped represents the cumulative dropped frames status. For each media transmission statistics entry, it is associated with the corresponding SSRC and media type to form a media entry identifier mapping. SSRC stands for Synchronization Source. The media entry identifier mapping is used to correspond media transmission statistics entries belonging to the same synchronization source identifier and the same media type in the previous and current acquisition cycles, thereby enabling the cumulative media transmission statistics status of adjacent acquisition cycles to be organized according to the same media transmission object.

[0166] For example, for a video transmission media object, SSRC constitutes the synchronization source identifier corresponding to that video transmission media object. Based on the media entry identifier mapping, the cumulative transmitted byte status of the previous acquisition period and the cumulative transmitted byte status of the current acquisition period can be read. The cumulative transmitted byte status of the previous acquisition period can specifically correspond to bytesSent in lastStats, and the cumulative transmitted byte status of the current acquisition period can specifically correspond to bytesSent in currentStats. Based on the change in the cumulative transmitted byte status of the current acquisition period relative to the cumulative transmitted byte status of the previous acquisition period, a transmitted byte change status is generated; subsequently, the number of bytes corresponding to the transmitted byte change status is converted to the number of bits, and the transmitted bit status corresponding to the unit time interval seconds is determined to generate the transmitted bitrate status. The bitrate in this application can be considered a specific implementation of the transmitted bitrate status. For the transmitted frame rate status, following the same periodic correspondence, a transmitted frame change status is generated based on the change in the cumulative transmitted frame status of the current acquisition period relative to the cumulative transmitted frame status of the previous acquisition period, and then the transmitted frame rate status is generated based on the transmitted frame change status and the periodic time interval. In this application, `framesSent` or `framesEncoded` can be used as a concrete implementation of the cumulative transmitted frame state. `fps`, or frames per second, can be used as a concrete implementation of the transmission frame rate state. For the retransmission bitrate state, a retransmission byte change state is generated based on the change in the cumulative retransmission byte state of the current acquisition period relative to the cumulative retransmission byte state of the previous acquisition period. Then, a retransmission bitrate state is generated based on the retransmission byte change state and the periodic time interval. In this application, `retransmittedBytesSent` and `retransmittedBitrate` can be used as concrete implementations of the cumulative retransmission byte state and the retransmission bitrate state, respectively. Therefore, the cumulative statistical state of media transmission first forms media transmission statistical changes according to the periodic correspondence. These media transmission statistical changes further form a periodic change representation, and the corresponding media transmission change state is generated from each media transmission statistical change in the periodic change representation.

[0167] For the media receive buffer statistics, the jitterBufferDelay and jitterBufferEmittedCount in trackData can be read. trackData represents the media track statistics corresponding to the current media transmission object, jitterBufferDelay represents the cumulative jitter buffer delay status accumulated up to the current acquisition time, and jitterBufferEmittedCount represents the cumulative jitter buffer output status corresponding to the media units output from the jitter buffer up to the current acquisition time. The cumulative jitter buffer delay status and the cumulative jitter buffer output status together constitute the cumulative jitter buffer status and serve as the specific components of the media receive buffer statistics. The buffer delay change status is determined based on the cumulative jitter buffer delay status of the current acquisition period and the cumulative jitter buffer delay status of the previous acquisition period, and the buffer output change status is determined based on the cumulative jitter buffer output status of the current acquisition period and the cumulative jitter buffer output status of the previous acquisition period. The buffer delay change status and the buffer output change status are associated according to the same synchronization source identifier, media type, and period correspondence to form a jitter buffer change representation. Subsequently, based on the correspondence between the buffer delay change state and the buffer output change state, the buffer waiting state corresponding to each output media unit in adjacent acquisition cycles is determined to generate the jitter buffer delay state. The jitterBufferMs in this application can be considered a specific implementation of the jitter buffer delay state. When the buffer output change state indicates that no new media units are output from the jitter buffer between two acquisition cycles, the jitter buffer delay state is not generated based on zero media unit changes. Instead, the jitter buffer cumulative state of the current acquisition cycle is preserved, and the jitter buffer delay state is generated based on the new adjacent acquisition cycle relationship after a valid buffer output change state is subsequently formed.

[0168] For link latency status, `currentRoundTripTime` can be read from the `candidate-pair` type media transmission statistics entry. `candidate-pair` represents the candidate transmission path pair used by the current real-time audio / video communication connection, and `currentRoundTripTime` represents the current round-trip latency status corresponding to the candidate transmission path pair, serving as a specific implementation of the link latency status. `availableOutgoingBitrate` can also be read from the `candidate-pair` type media transmission statistics entry. `availableOutgoingBitrate` represents the available transmission bandwidth status of the current candidate transmission path pair for sending media data. This available transmission bandwidth status can be used as a supplementary media transmission statistics status for the current acquisition period and associated with the corresponding client periodic statistical snapshot. For the client's current network access environment, the network access type can also be read from the `local-candidate` type media transmission statistics entry, and associated with the corresponding client periodic statistical snapshot. The above supplementary media transmission statistics statuses do not change the processing relationship between the synchronization source identifier and media type as the basis for corresponding media transmission objects; the link latency status continues to be included in subsequent media transmission quality indicators.

[0169] After parsing each media transmission statistics entry in StatsReport as described above, the cumulative media transmission statistics, media reception buffer statistics, and link latency status are organized according to the synchronization source identifier and media type to generate a client-side periodic statistical snapshot. Once the client-side periodic statistical snapshot is formed, the server-side statistical mapping provided by the media server is accessed based on the synchronization source identifier in the client-side periodic statistical snapshot. In this application, statsMapIndexedBySsrc can be considered a specific implementation of the server-side statistical mapping, representing server-side statistical information indexed according to SSRC. Server-side statistical information with the same synchronization source identifier in statsMapIndexedBySsrc is read based on the synchronization source identifier in the client-side periodic statistical snapshot, and the server-side statistical information corresponding to the current collection period is organized into a server-side periodic statistical snapshot. The network transmission statistics status in the server-side periodic statistical snapshot can include fractionLost and roundTripTime, where fractionLost represents the server-side packet loss status observed by the server for the corresponding media transmission object, and roundTripTime represents the server-side round-trip latency status obtained by the server for the corresponding media transmission object.

[0170] Taking the current video media transmission object as an example, the server-side statistical information corresponding to the same synchronization source identifier in the server-side statistical mapping is read based on the synchronization source identifier in the client-side periodic statistical snapshot to generate a server-side periodic statistical snapshot. Then, the client-side and server-side periodic statistical snapshots are matched based on the synchronization source identifier, and the media type is used to verify whether the client-side and server-side periodic statistical snapshots correspond to the same video media transmission object. When the synchronization source identifier and media type are consistent, a two-end media matching relationship is generated. Based on the two-end media matching relationship, the network transmission statistical status in the server-side periodic statistical snapshot is associated with the corresponding client-side periodic statistical snapshot to establish a statistical correspondence between the client and the server. Multiple client-server statistical correspondences are organized according to the synchronization source identifier and media type to generate a two-end periodic statistical mapping. Therefore, the client-side and server-side statistical statuses in the two-end periodic statistical mapping both correspond to the same synchronization source identifier and the same media type, allowing subsequent two-end statistical deviation verification to be performed directly within the same media transmission object.

[0171] In a preferred embodiment, after the dual-end periodic statistical mapping is formed, a dual-end statistical deviation verification of the client packet loss status and the server packet loss status is performed for each synchronization source identifier. For example, if the packet loss rate of the client packet loss status corresponding to a certain video media transmission object is 12%, and the packet loss rate of the server packet loss status corresponding to the same synchronization source identifier is 4%, then a dual-end deviation status is generated based on the degree of deviation between the client packet loss status and the server packet loss status. In this example, the deviation value of the dual-end deviation status is 8 percentage points. The preset deviation boundary is configured according to the same statistical caliber for the client packet loss status and the server packet loss status before performing the dual-end statistical deviation verification. For example, the preset deviation boundary can be configured to 5 percentage points. When the dual-end deviation status exceeds the preset deviation boundary, a deviation verification result is generated to indicate that the synchronization source identifier needs to be verified again. Based on the deviation verification result, the synchronization source identifier that needs to be verified again is determined. As needed, the corresponding client statistical status, server statistical status, and statistical correspondence between the client and the server are read from the dual-end periodic statistical mapping to generate a statistical snapshot to be verified. The statistical snapshot pending verification continues into the next collection cycle, so that the next collection cycle can perform a resampling deviation status verification for the same media transmission object.

[0172] Upon entering the next data collection cycle, the new client-side and server-side statistical states are preferentially read based on the synchronization source identifiers in the statistical snapshots to be verified. A resampling deviation state is then generated using the same statistical criteria as the first dual-end statistical deviation verification. For example, if the packet loss rate of the new client-side packet loss state is 11% and the packet loss rate of the new server-side packet loss state is 4%, the resampling deviation state still exceeds the aforementioned preset deviation boundary. The resampling deviation state is then verified according to the preset deviation boundary to generate a re-verification result. Subsequently, the deviation verification result and the re-verification result are associated according to the synchronization source identifier and the data collection sequence to generate a cross-cycle deviation change state. When both the deviation verification result and the re-verification result indicate that the dual-end deviation state continuously exceeds the preset deviation boundary, an abnormal statistical state is determined based on the cross-cycle deviation change state, and the abnormal statistical state is associated with the corresponding synchronization source identifier to generate abnormal deviation location information. Conversely, for example, if the packet loss rate of the new client-side packet loss state drops to 6%, and the packet loss rate of the new server-side packet loss state is 4%, and the resampling deviation state is already within the preset deviation boundary, then the re-verification result shows that the two-end statistical deviation corresponding to the synchronization source identifier has already decreased in subsequent collection cycles. At this time, since the cross-cycle deviation change state does not form an abnormal statistical state that needs to enter the historical deviation information correction process, the pending verification state corresponding to the synchronization source identifier is cancelled, allowing the media transmission object to continue to enter the subsequent media transmission quality analysis according to the normal cycle statistical process. Therefore, the instantaneous two-end deviation state formed in the first collection cycle will not directly enter the historical deviation information correction process as an abnormal statistical state without re-verification.

[0173] For synchronization source identifiers that form an abnormal statistical state after re-verification, the synchronization source identifier to be corrected is determined based on the abnormal deviation location information, and the corresponding historical deviation information is read based on the synchronization source identifier to be corrected. In a specific embodiment, the historical deviation information is maintained according to the synchronization source identifier, and a sliding window method is used to save the historical double-end deviation states corresponding to the most recent multiple acquisition cycles. For example, the deviation history window can save the historical double-end deviation states of the most recent 10 acquisition cycles. For each acquisition cycle in the deviation history window, the client statistical state, server statistical state, and historical double-end deviation state formed by the client statistical state and server statistical state corresponding to the same synchronization source identifier to be corrected are saved, and multiple historical double-end deviation states are organized according to the acquisition time sequence to generate the deviation history window. A continuous deviation feature is generated based on the deviation direction and deviation degree of multiple historical double-end deviation states in the deviation history window, and a deviation calibration state is generated based on the continuous deviation feature.

[0174] For example, if multiple historical two-way deviation states in the deviation history window indicate that the packet loss rate of the client-side packet loss state is consistently about 1 percentage point higher than the packet loss rate of the server-side packet loss state, then the average deviation value of approximately 1 percentage point can be used as a specific implementation of the long-term calibration coefficient. A persistent deviation feature is formed based on this average deviation value, and then a deviation calibration state is generated based on this persistent deviation feature. The long-term calibration coefficient only describes the historical two-way deviation relationship between the client-side statistical state and the server-side statistical state corresponding to the same synchronization source identifier to be calibrated. It is not shared with media transmission objects corresponding to other synchronization source identifiers and continues to maintain a correspondence with the synchronization source identifier to be calibrated.

[0175] For example, in the current data collection period, the packet loss rate of the client packet loss state corresponding to the synchronization source identifier to be corrected suddenly increases to 18%, while the packet loss rate of the server packet loss state in the current server statistics is still 4%. The deviation calibration state formed by the deviation history window indicates that the long-term average deviation of the client packet loss state relative to the server packet loss state is approximately 1 percentage point. At this time, a calibration expectation state is generated based on the current server statistics and deviation calibration state. In this example, the calibration expectation state corresponds to a client packet loss state reference value of approximately 5%. Subsequently, a correction statistical state is generated based on the deviation between the current client packet loss state and the calibration expectation state, and the current client packet loss state is updated in a direction consistent with the calibration expectation state based on the correction statistical state. The calibration expectation state serves only as an intermediate result in generating the correction statistical state based on the current server statistics and deviation calibration state; the corrected client statistical state still maintains the statistical correspondence between the client and server with the server statistical state corresponding to the same synchronization source identifier to be corrected. Therefore, instead of directly replacing the client's statistical status with the server's statistical status, the current server's statistical status and the deviation calibration status corresponding to the same synchronization source identifier to be corrected are used to limit the extent to which the instantaneous deviation in the client's statistical status enters the subsequent media transmission quality analysis.

[0176] After updating the client statistical status corresponding to the synchronization source identifier to be corrected in the dual-end periodic statistical mapping based on the correction statistical status, a calibration period statistical snapshot is generated. The calibration period statistical snapshot maintains the correspondence between the synchronization source identifier, media type, corrected client statistical status, corresponding server statistical status, and media transmission statistical status related to media transmission quality analysis. Simultaneously, the historical dual-end deviation status used to form historical deviation information continues to preserve the actual dual-end deviation status formed between the client statistical status and server statistical status before correction. Therefore, historical deviation information still reflects the change in the actual dual-end observation difference between the client statistical status and server statistical status corresponding to the same synchronization source identifier over the acquisition period, while the calibration period statistical snapshot provides the statistical status for subsequent media transmission quality analysis after dual-end statistical deviation verification and historical deviation information correction. Historical deviation information and calibration period statistical snapshots serve subsequent deviation correction and media transmission quality analysis respectively, and do not replace each other.

[0177] Subsequently, audio and video media transmission objects are distinguished based on the media type in the calibration cycle statistical snapshots. The media transmission statistical states belonging to the same media transmission object in adjacent acquisition cycles are associated according to the synchronization source identifier to generate media cycle-specific statistical slices. Media transmission statistical changes are determined based on the cumulative media transmission statistical states corresponding to adjacent acquisition cycles in the media cycle statistical slices. These changes are then associated with the synchronization source identifier, media type, and acquisition cycle relationship to generate cycle change representations. For each cycle change representation, a transmission bitrate state is generated based on the cumulative transmitted byte state change corresponding to bytesSent, a reception bitrate state based on the cumulative received byte state change corresponding to bytesReceived, a transmission frame rate state based on the cumulative transmitted frame state change corresponding to framesSent or framesEncoded, a reception frame rate state based on the cumulative decoded frame state change corresponding to framesDecoded, a retransmission bitrate state based on the cumulative retransmitted byte state change corresponding to retransmittedBytesSent, a packet loss state based on packetsLost and the corresponding packet statistical states, and a jitter buffer delay state based on the cumulative jitter buffer state. The aforementioned transmit bitrate status, receive bitrate status, transmit frame rate status, receive frame rate status, retransmission bitrate status, packet loss status, and jitter buffer delay status collectively constitute the media transmission change status. Subsequently, the link delay status corresponding to currentRoundTripTime in the candidate-pair type media transmission statistics entry and the transmission direction determined by the media transmission statistics entry type are associated with the media transmission change status to generate media transmission quality indicators.

[0178] For example, in the media transmission quality indicators for a certain video media transmission object corresponding to the sending direction, the round-trip latency value corresponding to the link latency state is 180 milliseconds, and the packet loss rate value corresponding to the packet loss state is 4%. Based on multiple preset latency classification boundaries pre-configured in the preset latency level correspondence, the latency quality level corresponding to 180 milliseconds can be determined; based on multiple preset packet loss classification boundaries pre-configured in the preset packet loss level correspondence, the packet loss quality level corresponding to 4% can be determined. According to a specific classification example in this application, 180 milliseconds falls within the preset latency classification interval corresponding to 100 milliseconds to 200 milliseconds, and 4% falls within the preset packet loss classification interval corresponding to 2% to 5%. Subsequently, according to the preset direction level synthesis rules and the preset quality degradation order, the latency quality level and packet loss quality level of the same transmission direction are verified to generate the network quality level for the corresponding transmission direction. If, in another acquisition period, the round-trip delay value corresponding to the link delay state increases to 600 milliseconds, while the packet loss rate value corresponding to the packet loss state remains at 4%, then the delay quality level corresponding to the link delay state has a higher degree of quality degradation than the packet loss quality level. Based on the preset direction level synthesis rules, the network quality level for the corresponding transmission direction is determined by the delay quality level with the higher degree of quality degradation. The receiving direction uses the same method to generate the corresponding network quality level. The network quality levels for different transmission directions are correlated according to the transmission direction to generate a network quality judgment state.

[0179] When the WebRTC connection status indicates that the real-time audio / video communication connection has been disconnected or is in the process of being re-established, a connection anomaly status is generated based on the WebRTC connection status. The connection anomaly status has a different meaning from the quality level formed by link delay status or packet loss status. A connection anomaly status indicates that the current real-time audio / video communication connection has entered a stage where it can no longer be evaluated as a normal continuous media transmission state. Therefore, when a connection anomaly status is formed, the network quality level for the corresponding transmission direction is updated according to the connection anomaly status, instead of continuing to maintain the original network quality level solely based on the delay quality level and packet loss quality level left over from the disconnection or re-establishment. For example, in this application, level 6 network quality level can be used as the specific network quality level corresponding to the connection anomaly status. The updated sending-direction network quality level and receiving-direction network quality level are then associated according to the transmission direction to generate a network quality judgment status.

[0180] The network quality assessment status is further used to determine the target acquisition interval for the next acquisition cycle. First, the network quality level corresponding to different transmission directions is read based on the network quality assessment status. Then, the current quality level is determined based on the network quality level corresponding to different transmission directions, and an acquisition interval adjustment state is generated based on the current quality level and the corresponding network quality level. In one specific embodiment, 1 second can be configured as the baseline acquisition interval. When the network quality level for different transmission directions corresponds to a stable network quality acquisition interval adjustment state, the current acquisition interval is increased according to the preset correspondence between the quality level and the acquisition interval, forming the target acquisition interval for the next acquisition cycle. For example, when the network quality remains stable for multiple consecutive acquisition cycles, the current acquisition interval can be gradually increased from 1 second, and 2 seconds can be configured as a preset extension boundary. Therefore, it is unnecessary to call RTCPeerConnection.getStats() with the same shorter acquisition interval throughout periods of stable network quality, thereby reducing the frequency of WebRTC statistics interface calls and corresponding statistical parsing and storage operations.

[0181] When the network quality level corresponding to any transmission direction reaches a collection interval adjustment state indicating that the network quality is in a periodic monitoring state, a baseline collection interval is read according to the preset correspondence between quality level and collection interval, and the baseline collection interval is determined as the target collection interval for the next collection cycle. For example, if the baseline collection interval is 1 second, the next collection cycle resumes acquiring new WebRTC periodic statistics according to the target collection interval of 1 second. When the network quality level corresponding to any transmission direction reaches a collection interval adjustment state indicating an abnormal network quality state or a connection anomaly state, the current collection interval is reduced according to the preset correspondence between quality level and collection interval to form a shorter target collection interval. For example, 0.2 seconds can be configured as a preset shortening boundary, so that new WebRTC periodic statistics are acquired according to the sub-second target collection interval during periods of abnormal network quality. The collection sequence of the next collection cycle is determined based on the target collection interval and the collection time point of the current collection cycle. A collection scheduling state is generated based on the collection sequence, and the collection scheduling state is associated with the network quality judgment state that generated the collection scheduling state to generate a network quality assessment result.

[0182] After the network quality assessment results are generated, media quality callback information can be generated based on the synchronization source identifier, media type, and transmission direction in the media transmission quality indicators, as well as the network quality status of the corresponding transmission direction in the network quality judgment status. Simultaneously, quality conclusion callback information is generated based on the network quality judgment status in the network quality assessment results. The media quality callback information and the quality conclusion callback information are then associated based on the synchronization source identifier and media type to generate the network quality callback result. The `onNetworkQuality` method in this application can serve as a specific implementation of the network quality callback interface, outputting the network quality callback result to the application layer through this interface.

[0183] For synchronization source identifiers that still exhibit an abnormal statistical state after deviation verification and re-verification, a dual-end statistical inconsistency state can be generated based on the abnormal statistical state in the abnormal deviation location information. This dual-end statistical inconsistency state is then associated with the corresponding synchronization source identifier to generate dual-end abnormal callback information. Simultaneously, quality callback information is generated based on the network quality assessment results. The dual-end abnormal callback information is then associated with the quality callback information based on the synchronization source identifier to generate an abnormal network quality callback result. The abnormal network quality callback result can be output to the application layer through the same network quality callback interface as the actual network quality callback result. Thus, the application layer can obtain the current media transmission object and the network quality status corresponding to different transmission directions from the network quality callback result. It can also obtain whether the corresponding synchronization source identifier exhibits a dual-end statistical inconsistency state confirmed through cross-cycle re-verification from the abnormal network quality callback result. This ensures that changes in media transmission quality and the continuous statistical deviation between the client's and server's statistical states each have corresponding output results.

[0184] Therefore, in the above example of real-time audio and video communication in online classrooms, the WebRTC periodic statistics are specifically implemented as the client statistical snapshot of the previous acquisition period, the client statistics of the current acquisition period, the periodic time interval, and the periodic correspondence established by the acquisition timing; the synchronization source identifier is specifically implemented as SSRC; the client periodic statistical snapshot is specifically implemented as the cumulative statistical status of media transmission, the statistical status of media reception buffer, and the link delay status organized according to the synchronization source identifier and media type; the server-side statistics are specifically implemented as the network transmission statistical status such as fractionLost and roundTripTime stored according to the SSRC index in the server-side statistical mapping; the server-side periodic statistical snapshot is specifically implemented as the server-side statistical information corresponding to the synchronization source identifier of the client periodic statistical snapshot in the current acquisition period; the dual-end periodic statistical mapping is specifically implemented as the client-server statistical correspondence between the client periodic statistical snapshot and the server periodic statistical snapshot under the same synchronization source identifier and the same media type; historical deviation information. Specifically, this is implemented as follows: historical double-end deviation status formed by the same synchronization source identifier to be corrected in multiple acquisition cycles; deviation history window is specifically implemented as the most recent historical double-end deviation status organized according to the acquisition time sequence; deviation calibration status is specifically implemented as the long-term calibration coefficient formed based on the continuous deviation characteristics in the deviation history window; correction statistics status is specifically implemented as the client statistics status update result formed based on the deviation calibration status, the current server statistics status, and the current client statistics status; periodic change characterization is specifically implemented as the media transmission statistics change in adjacent acquisition cycles corresponding to the same synchronization source identifier and media type; media transmission quality indicators are specifically implemented as the media transmission quality status formed by the sending bit rate status, receiving bit rate status, sending frame rate status, receiving frame rate status, retransmission bit rate status, packet loss status, jitter buffer delay status, link delay status, and transmission direction; network quality judgment status is specifically implemented as the network quality level corresponding to different transmission directions; acquisition scheduling status is specifically implemented as the acquisition time sequence of the next acquisition cycle formed according to the target acquisition interval. The aforementioned lower-level implementations are seamlessly connected according to the aforementioned technical processing relationships, so that client-side statistical collection, server-side statistical information fusion, dual-end statistical deviation verification, resampling deviation status verification, historical deviation information correction, media transmission quality analysis of adjacent collection cycles, network quality judgment, and collection scheduling of the next collection cycle can all be implemented in the corresponding WebRTC statistical content and collection sequence.

[0185] Figures 2-5 For an exemplary description, please refer to the above. Figure 1 This will not be elaborated upon here.

Claims

1. A network quality assessment method, characterized in that, include: Step S1: Obtain the WebRTC periodic statistics information of the client, obtain the corresponding server-side statistics information according to the synchronization source identifier in the WebRTC periodic statistics information, establish the statistical correspondence between the client and the server based on the synchronization source identifier, and generate a dual-end periodic statistics mapping. Step S2: Verify the two-end statistical deviation according to the two-end periodic statistical mapping, determine the abnormal statistical state, generate the correction statistical state according to the historical deviation information corresponding to the abnormal statistical state, update the two-end periodic statistical mapping according to the correction statistical state, and generate a calibration periodic statistical snapshot. Step S3: Determine the media transmission changes in adjacent acquisition cycles based on the calibration cycle statistical snapshot, generate a cycle change characterization, generate a media transmission quality index based on the cycle change characterization, and generate a network quality judgment status based on the media transmission quality index. Step S4: Determine the target acquisition interval for the next acquisition cycle based on the network quality judgment status, generate an acquisition scheduling status based on the target acquisition interval, associate the acquisition scheduling status with the network quality judgment status, and generate a network quality assessment result.

2. The network quality assessment method according to claim 1, characterized in that, Step S1 includes: Step S11: Obtain a client statistics snapshot of the previous collection period, call the WebRTC statistics interface to obtain client statistics information of the current collection period, establish a period correspondence relationship based on the collection timing relationship between the previous collection period and the current collection period, and generate WebRTC period statistics information. Step S12: Parse the synchronization source identifier and media type from the WebRTC periodic statistics information. The synchronization source identifier and media type are used to distinguish media transmission objects. Organize the corresponding media transmission statistics status according to the synchronization source identifier and media type, and generate a client periodic statistics snapshot. Step S13: Obtain the corresponding server-side statistical information based on the synchronization source identifier in the client-side periodic statistical snapshot; match the client-side periodic statistical snapshot with the server-side statistical information based on the synchronization source identifier; verify whether the matched client-side periodic statistical snapshot and the server-side statistical information correspond to the same media transmission object based on the media type; establish a statistical correspondence between the client and the server; and generate a dual-end periodic statistical mapping based on the statistical correspondence between the client and the server.

3. The network quality assessment method according to claim 2, characterized in that, Step S12 includes: Step S121: Based on the media transmission statistics entries in the WebRTC periodic statistics information, determine the synchronization source identifier and media type corresponding to each media transmission statistics entry, and generate a media entry identifier mapping; Step S122: Based on the media entry identifier mapping, read the cumulative media transmission statistics status corresponding to the adjacent acquisition period from the WebRTC periodic statistics information, organize the cumulative media transmission statistics status according to the synchronization source identifier and media type, and generate a media transmission statistics slice; Step S123: Based on the WebRTC periodic statistics information, read the media receive buffer statistics status and link latency status corresponding to the media transmission statistics slice, associate the media receive buffer statistics status and link latency status with the media transmission statistics slice, and generate a client periodic statistics snapshot.

4. The network quality assessment method according to claim 3, characterized in that, Step S13 includes: Step S131: Obtain the corresponding server-side periodic statistical snapshot based on the synchronization source identifier in the client-side periodic statistical snapshot; Step S132: Match the client periodic statistical snapshot and the server periodic statistical snapshot according to the synchronization source identifier, and verify whether the matched client periodic statistical snapshot and the server periodic statistical snapshot correspond to the same media transmission object according to the media type, and generate a dual-end media matching relationship; Step S133: Based on the dual-end media matching relationship, associate the network transmission statistics status in the server-side periodic statistical snapshot with the corresponding client-side periodic statistical snapshot, establish a statistical correspondence between the client and the server, and generate a dual-end periodic statistical mapping based on the statistical correspondence between the client and the server.

5. The network quality assessment method according to claim 1, characterized in that, Step S2 includes: Step S21: Based on the synchronization source identifier in the dual-end periodic statistical mapping, read the client statistical status and the corresponding server statistical status, and generate a dual-end deviation status based on the degree of deviation between the client statistical status and the server statistical status. Step S22: Verify the double-end deviation state according to the preset deviation boundary and generate a deviation verification result; Step S23: Determine the abnormal statistical status and its corresponding synchronization source identifier based on the deviation verification result, associate the abnormal statistical status with its corresponding synchronization source identifier, and generate abnormal deviation location information. Step S24: Obtain the corresponding historical deviation information based on the abnormal deviation location information, generate a correction statistical state based on the historical deviation information, update the abnormal statistical state in the dual-end periodic statistical mapping based on the correction statistical state, and generate a calibration periodic statistical snapshot.

6. The network quality assessment method according to claim 5, characterized in that, Step S23 includes: Step S231: Determine the synchronization source identifier that needs to be re-verified based on the deviation verification result, read the corresponding dual-end statistical status from the dual-end periodic statistical mapping based on the synchronization source identifier that needs to be re-verified, and generate a statistical snapshot to be verified. Step S232: Based on the statistical snapshot to be verified, obtain the corresponding dual-end statistical status in the subsequent collection cycle, and generate the resampling deviation status based on the dual-end statistical status of the subsequent collection cycle. Step S233: Verify the resampling deviation state according to the preset deviation boundary, and generate a re-verification result; Step S234: Determine the cross-cycle deviation change status of the corresponding synchronization source identifier based on the deviation verification result and the re-verification result, determine the abnormal statistical status based on the cross-cycle deviation change status, and generate abnormal deviation location information.

7. The network quality assessment method according to claim 6, characterized in that, Step S24 includes: Step S241: Determine the identifier of the synchronization source to be corrected based on the abnormal deviation location information, and obtain the corresponding historical deviation information based on the identifier of the synchronization source to be corrected; Step S242: Determine the historical double-end deviation status corresponding to multiple collection cycles from the historical deviation information according to the collection time sequence, generate a deviation history window, determine the continuous deviation characteristics of the client statistical status relative to the server statistical status according to the deviation history window, and generate a deviation calibration status according to the continuous deviation characteristics. Step S243: Generate a correction statistics status based on the deviation calibration status and the current server statistics status; Step S244: Update the corresponding client statistical status in the dual-end periodic statistical mapping according to the calibration statistical status, and maintain the correspondence between the synchronization source identifier and the media type during the update, and generate a calibration periodic statistical snapshot.

8. The network quality assessment method according to claim 3, characterized in that, Step S3 includes: Step S31: Distinguish the media transmission statistics status according to the media type in the calibration cycle statistical snapshot, and associate the media transmission statistics status of the same media transmission object in adjacent acquisition cycles according to the synchronization source identifier to generate media cycle statistical slices. Step S32: Determine the media transmission statistical changes in adjacent acquisition cycles based on the media cycle statistical slices, and generate a cycle change characterization. Step S33: Generate a media transmission change state based on the periodic change characterization and the corresponding acquisition period relationship, associate the corresponding link delay state and transmission direction with the media transmission change state, and generate a media transmission quality index. Step S34: Determine the quality index status of the corresponding transmission direction based on the transmission direction in the media transmission quality index, determine the network quality status of the corresponding transmission direction based on the quality index status, and generate a network quality judgment status.

9. The network quality assessment method according to claim 8, characterized in that, The media transmission change state in step S33 includes a jitter buffer delay state, and the generation of the jitter buffer delay state includes: Step S331: Obtain the jitter buffer cumulative state corresponding to adjacent acquisition cycles based on the periodic change characterization, and generate jitter buffer cycle slices; Step S332: Determine the buffer delay change state and buffer output change state between adjacent acquisition cycles based on the jitter buffer cycle slice, and associate the buffer delay change state and buffer output change state to generate a jitter buffer change characterization. Step S333: Generate a jitter buffer delay state based on the correspondence between the buffer delay change state and the buffer output change state in the jitter buffer change representation, and associate the jitter buffer delay state with the periodic change representation to generate the media transmission quality index.

10. The network quality assessment method according to claim 8, characterized in that, Step S34 includes: Step S341: Determine the media transmission quality index corresponding to different transmission directions according to the transmission direction in the media transmission quality index; Step S342: Based on the link delay status in the media transmission quality indicators corresponding to different transmission directions, generate the corresponding delay quality level according to the preset delay level correspondence. Step S343: Based on the packet loss status in the media transmission quality indicators corresponding to different transmission directions, generate the corresponding packet loss quality level according to the preset packet loss level correspondence. Step S344: Verify the delay quality level and packet loss quality level corresponding to the same transmission direction according to the preset direction level synthesis rules, generate the network quality level of the corresponding transmission direction, and generate the network quality judgment status according to the network quality level of different transmission directions.

11. The network quality assessment method according to claim 10, characterized in that, The preset latency level correspondence is configured to determine the latency quality level based on the position of the link latency status relative to multiple preset latency classification boundaries. The preset packet loss level correspondence is configured to determine the packet loss quality level based on the position of the packet loss status relative to multiple preset packet loss classification boundaries. According to the preset direction level synthesis rule, the latency quality level and packet loss quality level of the same transmission direction are verified according to the preset quality degradation order to generate the network quality level of the corresponding transmission direction. The WebRTC connection status is obtained, the connection anomaly status is determined based on the WebRTC connection status, the network quality level of the corresponding transmission direction is updated based on the connection anomaly status, and a network quality judgment status is generated.

12. A network quality assessment device, characterized in that, include: The dual-end statistical mapping module is used to obtain the WebRTC periodic statistical information of the client, obtain the corresponding server-side statistical information according to the synchronization source identifier in the WebRTC periodic statistical information, establish the statistical correspondence between the client and the server based on the synchronization source identifier, and generate a dual-end periodic statistical mapping. The deviation calibration module is used to verify the two-end statistical deviation according to the two-end periodic statistical mapping, determine the abnormal statistical state, generate the correction statistical state according to the historical deviation information corresponding to the abnormal statistical state, update the two-end periodic statistical mapping according to the correction statistical state, and generate a calibration periodic statistical snapshot. The quality assessment module is used to determine the media transmission changes in adjacent acquisition cycles based on the calibration cycle statistical snapshot, generate a cycle change characterization, generate a media transmission quality index based on the cycle change characterization, and generate a network quality assessment status based on the media transmission quality index. The data acquisition and scheduling module is used to determine the target acquisition interval for the next acquisition cycle based on the network quality assessment status, generate an acquisition scheduling status based on the target acquisition interval, associate the acquisition scheduling status with the network quality assessment status, and generate a network quality assessment result.

13. A network quality assessment system, characterized in that, It includes a client device and a media server, wherein the client device is configured with WebRTCSDK and establishes a real-time audio and video communication connection with the media server; The media server is used to provide corresponding server-side statistical information according to the synchronization source identifier; The WebRTCSDK is used to periodically obtain WebRTC periodic statistics information of the client device, obtain server-side statistics information based on the synchronization source identifier in the WebRTC periodic statistics information, and establish a statistical correspondence between the client and the server based on the synchronization source identifier to generate a dual-end periodic statistics mapping. The WebRTCSDK is also used to verify the two-end statistical deviation according to the two-end periodic statistical mapping to determine the abnormal statistical state, generate the correction statistical state according to the historical deviation information corresponding to the abnormal statistical state, and update the two-end periodic statistical mapping according to the correction statistical state to generate a calibration periodic statistical snapshot. The WebRTCSDK is also used to determine the media transmission changes in adjacent acquisition cycles based on the calibration cycle statistical snapshot, to generate a cycle change characterization, to generate a media transmission quality index based on the cycle change characterization, to generate a network quality judgment status based on the media transmission quality index, to determine the target acquisition interval for the next acquisition cycle based on the network quality judgment status, to generate an acquisition scheduling status based on the target acquisition interval, and to associate the acquisition scheduling status with the network quality judgment status to generate a network quality evaluation result and output it to the application layer of the client device.