Log data processing method and related equipment
By transmitting multimedia communication data on a long connection between the client and the multimedia server, and transmitting the encapsulated log data using the second long connection, the problem of delay and omission of client log data upload is solved, real-time monitoring of the multimedia communication process is realized.
Patent Information
- Application Number
- CN202411539373.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-30
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2044-10-30
AI Technical Summary
When the client transmits multimedia communication data through a long connection, it is difficult to upload the log data generated locally by the client to the server in a timely and omission-free manner without affecting the communication quality.
By establishing a first long connection between the client and the multimedia server, and obtaining network status information and local log data, encapsulate it to form multimedia log data, and transmit it to the log server through the second long connection. If the second long connection is disconnected, the log data that has not been uploaded successfully is stored in the local log file and uploaded on reconnection.
It realizes that the client's log data is uploaded to the log server in a timely and omission-free manner without affecting the communication quality of multimedia communication data, ensuring the integrity and real-time nature of the log data.
Smart Images

Figure CN119697006A_ABST
Abstract
Description
Background Art
[0002] With the continuous improvement of network bandwidth and speed, more and more multimedia communication and data communication applications have emerged, especially the emergence of various real-time multimedia communication and data communication applications (such as audio / video communication applications or live broadcast applications), which greatly shortens the distance between people and provides users with a more convenient and efficient communication experience.
[0003] For real-time multimedia communication data communication applications, accurately obtaining the log data of the client during the real-time multimedia communication data transmission process helps application developers to effectively monitor the running status of the real-time multimedia communication data communication application, discover problems in time and take measures to solve them, so as to improve the stability of the application and user experience.
[0004] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute the prior art known to ordinary technicians in the field. Summary of the invention
[0005] The present disclosure provides a log data processing method and related equipment to solve the technical problem that when a client transmits multimedia communication data through a long connection, it is difficult to upload the log data generated locally by the client to the server in a timely and complete manner without affecting the communication quality of the multimedia communication data.
[0006] Other features and advantages of the present disclosure will become apparent from the following detailed description, or may be learned in part by the practice of the present disclosure.
[0007] According to one aspect of the present disclosure, a log data processing method is provided, which is applied to a client, and includes: transmitting multimedia communication data with a multimedia server through a first long connection, and obtaining network status information of the first long connection and local log data of the client; encapsulating the network status information and the local log data to obtain multimedia log data, wherein the multimedia log data carries associated information of the multimedia communication data; transmitting the multimedia log data to a log server through a second long connection; in response to disconnection of the second long connection, storing the multimedia log data in one or more local log files of the client; in response to reconnection of the second long connection, uploading the one or more local log files to the log server through the reconnected second long connection.
[0008] According to another aspect of the present disclosure, a log data processing method is also provided, which is applied to a log server, comprising: receiving multimedia log data sent by a client through a second long connection, wherein the multimedia log data is obtained by the client encapsulating network status information of a first long connection and local log data of the client, the first long connection is used for the client to transmit multimedia communication data with a multimedia server, and the multimedia log data carries association information of the multimedia communication data; receiving a reconnection request sent by the client, and reconnecting the second long connection if the token information of the client does not exceed the token expiration time; in response to the reconnection of the second long connection, receiving one or more local log files uploaded by the client through the reconnected second long connection, wherein the one or more local log files store the multimedia log data generated by the client during the disconnection of the second long connection, and the file size of each local log file does not exceed a preset file size threshold.
[0009] According to another aspect of the present disclosure, a client is also provided, which includes: a first long connection data transmission module, which is used to transmit multimedia communication data with a multimedia server through a first long connection, and obtain network status information of the first long connection and local log data of the client; a data processing module, which is used to encapsulate the network status information and the local log data to obtain multimedia log data, wherein the multimedia log data carries associated information of the multimedia communication data; a second long connection data transmission module, which is used to transmit the multimedia log data to a log server through a second long connection; a log file local storage module, which is used to store the multimedia log data in one or more local log files of the client in response to the disconnection of the second long connection, wherein the file size of each local log file does not exceed a preset file size threshold; a log file upload module, which is used to upload the one or more local log files to the log server through the reconnected second long connection in response to the reconnection of the second long connection.
[0010] According to another aspect of the present disclosure, a server is also provided, which includes: a log data receiving module, used to receive multimedia log data sent by a client through a second long connection, wherein the multimedia log data is obtained by the client encapsulating the network status information of the first long connection and the local log data of the client, the first long connection is used for the client to transmit multimedia communication data with a multimedia server, and the multimedia log data carries associated information of the multimedia communication data; a network connection reconnection module, used to receive a reconnection request sent by the client, and reconnect the second long connection if the token information of the client does not exceed the token expiration time; a log file receiving module, used to respond to the reconnection of the second long connection, and receive one or more local log files uploaded by the client through the reconnected second long connection, wherein the one or more local log files store the multimedia log data generated by the client during the disconnection of the second long connection, and the file size of each local log file does not exceed a preset file size threshold.
[0011] According to another aspect of the present disclosure, an electronic device is also provided, which includes: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute any one of the log data processing methods described above by executing the executable instructions.
[0012] According to another aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the log data processing method described in any one of the above is implemented.
[0013] According to another aspect of the present disclosure, a computer program product is further provided, the computer program product comprising: a computer program or instructions, wherein when the computer program or instructions are executed by a processor, any one of the log data processing methods described above is implemented.
[0014] The log data processing method and related devices provided in the embodiments of the present disclosure obtain network status information of the first long connection and local log data of the client during the process of transmitting multimedia communication data between the client and the multimedia server through the first long connection, encapsulate the network status information of the first long connection and the local log data of the client, obtain multimedia log data carrying multimedia communication data-related information, and transmit the obtained multimedia log data to the log data server through the second long connection. Since the multimedia log data and the multimedia communication data are transmitted through different long connections, the disconnection of the long connection for transmitting the multimedia communication data will not affect the transmission of the multimedia log data.
[0015] Furthermore, considering that the second long connection for transmitting multimedia log data may also be disconnected, the multimedia log data that cannot be transmitted after the second long connection is disconnected is stored in the client's local log file, and after the second long connection is reconnected, the local log file is uploaded to the log server, which can ensure that the multimedia log data is uploaded to the log server without omission.
[0016] Through the solution provided by the embodiment of the present disclosure, the network status information and local log data of the client during the process of transmitting multimedia communication data through a long connection can be uploaded to the log server in a timely and complete manner, so that the log server can monitor the multimedia communication process of the client based on the received data.
[0017] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the specification are used to explain the principles of the present disclosure. Obviously, the accompanying drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without creative work.
[0019] Figure 1 A schematic diagram of an application system architecture in an embodiment of the present disclosure is shown;
[0020] Figure 2 A flow chart of a log data processing method applied to a client side in an embodiment of the present disclosure is shown;
[0021] Figure 3 A flow chart of packaging network status information and local log data in an embodiment of the present disclosure is shown;
[0022] Figure 4 A flow chart of a method for determining a file size threshold of a local log file in an embodiment of the present disclosure is shown;
[0023] Figure 5 A flow chart of a method for reconnecting a persistent connection request in an embodiment of the present disclosure is shown;
[0024] Figure 6 A flow chart of a method for uploading a local log file in an embodiment of the present disclosure is shown;
[0025] Figure 7 A flow chart of another method for uploading a local log file in an embodiment of the present disclosure is shown;
[0026] Figure 8A flow chart of a log data processing method applied to a server side in an embodiment of the present disclosure is shown;
[0027] Fig. 9 A flowchart of a multimedia log data parsing method according to an embodiment of the present disclosure is shown;
[0028] Fig.10 A flow chart of a method for verifying token information in an embodiment of the present disclosure is shown;
[0029] Fig.11 A flow chart of a method for receiving a local log file in an embodiment of the present disclosure is shown;
[0030] Fig.12 A flowchart showing a client uploading tracking log data through a persistent connection in an embodiment of the present disclosure is shown;
[0031] Fig.13 A flowchart showing a method in which a client uploads WebRTC project tracking log data through a WebSocket connection in an embodiment of the present disclosure is shown;
[0032] Fig.14 A schematic diagram showing the internal components of a client in an embodiment of the present disclosure is shown;
[0033] Fig.15 A schematic diagram of the internal components of a log server in an embodiment of the present disclosure is shown;
[0034] Fig.16 A structural block diagram of an electronic device in an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0035] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that the disclosure will be more comprehensive and complete and to fully convey the concepts of the example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
[0036] In addition, the accompanying drawings are only schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the figures represent the same or similar parts, and their repeated description will be omitted. Some of the block diagrams shown in the accompanying drawings are functional entities and do not necessarily correspond to physically or logically independent entities. These functional entities can be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor devices and / or microcontroller devices.
[0037] For ease of understanding, before introducing the embodiments of the present disclosure, several terms involved in the embodiments of the present disclosure are first explained as follows:
[0038] Persistent connection: A network connection established between a client and a server that can remain connected for a longer period of time (token expiration time). Once a persistent connection is established, the client and server can send messages to each other at any time without having to reestablish the connection.
[0039] Tracking: Code is implanted at specific process nodes and operation nodes in an application (usually a mobile application or a web application) to record user behavior data or application status. This data is usually output in the form of logs to facilitate subsequent analysis and optimization.
[0040] WebSocket: A network communication protocol that provides a channel for full-duplex communication over a single TCP connection.
[0041] WebRTC: Web Real-Time Communication is an open source technology that allows web pages or applications to transmit real-time multimedia communication data (such as audio and video) through direct point-to-point communication. It does not require the installation of any additional plug-ins or software and can work directly in the browser.
[0042] As introduced in the background technology section of this application, in the process of transmitting multimedia communication data between the client and the multimedia server through a long connection, in order to analyze the running status or user behavior data of the multimedia service application on the client, the client needs to upload its local log data during the multimedia communication data transmission process to the log server for analysis.
[0043] If log data is uploaded in real time through a long connection established between the client and the server, some log data may not be uploaded to the server during the period when the long connection is disconnected; if the client's log data is stored in a log file and then uploaded, the upload of the log file may affect the communication quality of the client's transmission of multimedia communication data.
[0044] In order to upload the log data generated by the client in the process of multimedia communication data transmission to the server in a timely and complete manner without affecting the communication quality of the client multimedia communication data, the present disclosure provides a log data processing method and related equipment in the embodiment, after successfully establishing a network connection (such as a long connection) between the client and the server, the log data generated by the client in the process of multimedia communication data transmission is uploaded to the server in a timely manner through the network connection, and when the network connection is disconnected, the log data that has not been successfully uploaded is stored in a local log file, so that when the network connection is successfully reconnected, the local log file is uploaded to the server again, which can avoid the problem of partial log data not being successfully uploaded due to the disconnection of the network connection. Furthermore, the file size of the local log file is determined according to the communication quality requirement information, which can ensure that the uploading of the local log file will not affect the communication quality of the multimedia communication data.
[0045] In order to better understand a log data processing method and related devices provided in an embodiment of the present disclosure, the application environment of the embodiment of the present disclosure is first described below.
[0046] Figure 1 A schematic diagram of an exemplary application system architecture to which the log data processing method in the embodiment of the present disclosure can be applied is shown as follows: Figure 1 As shown, the system architecture includes: a client 101 , a network 102 , a multimedia server 103 and a log server 104 .
[0047] Among them, the medium providing the communication link between the client 101 and the multimedia server 103, and between the client 101 and the log server 104 can be a wired network or a wireless network. Optionally, the wireless network or wired network here uses standard communication technology and / or protocol. The network is usually the Internet, but it can also be any network, including but not limited to any combination of a local area network (LAN), a metropolitan area network (MAN), a wide area network (WAN), a mobile, wired or wireless network, a private network or a virtual private network). In some embodiments, the data exchanged through the network is represented by the technology and / or format including Hyper Text Mark-up Language (HTML), Extensible Markup Language (XML), etc. In addition, conventional encryption technologies such as Secure Socket Layer (SSL), Transport Layer Security (TLS), Virtual Private Network (VPN), Internet Protocol Security (IPSec) etc. can be used to encrypt all or some links. In other embodiments, customized and / or dedicated data communication technologies may be used to replace or supplement the above-mentioned data communication technologies.
[0048] The client 101 in the embodiment of the present disclosure may be any terminal device, including but not limited to: a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, a wearable device, an augmented reality device, a virtual reality device, etc.
[0049] The multimedia server 103 in the embodiment of the present disclosure refers to a server that provides multimedia services; the log server 104 refers to a server that provides log analysis services. Whether it is a multimedia server or a log server, it can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), as well as big data and artificial intelligence platforms.
[0050] In some embodiments, Figure 1The multimedia server 103 shown may be a server for providing real-time multimedia communication services (such as audio / video conferencing, live broadcasting, etc.); Figure 1 The client 101 shown is installed with a client corresponding to the multimedia server 103 and providing local multimedia communication services. The client may be an application client or a web client.
[0051] Those skilled in the art will know that Figure 1 The number of the client 101, network 102, multimedia server 103 and log server 104 is only for illustration, and any number of clients, networks, multimedia servers and log servers may be provided according to actual needs. The embodiments of the present disclosure are not limited to this.
[0052] Figure 2 A flow chart of a log data processing method applied to a client side in an embodiment of the present disclosure is shown. In principle, Figure 2 The method shown can be performed by any electronic device with computing processing capabilities. In some embodiments, Figure 2 The log data processing method shown can be executed by the client 101 of the above system architecture; in other embodiments, Figure 2 The log data processing method shown can be implemented by the client 101, multimedia server 103 and log server 104 in the above system architecture in an interactive manner.
[0053] like Figure 2 As shown, the log data processing method applied to the client side provided in the embodiment of the present disclosure includes the following steps:
[0054] S202: Transmit multimedia communication data with a multimedia server via a first persistent connection, and obtain network status information of the first persistent connection and local log data of the client.
[0055] It should be noted that the multimedia server in the embodiment of the present disclosure can be any server that provides multimedia communication services; the client in the embodiment of the present disclosure can be a client corresponding to the multimedia server for providing local multimedia services, and the client can be a native application client that directly accesses the server (such as Tencent video conferencing software client), or it can be a mini-program client embedded in other applications (such as WeChat, Alipay, etc.), or it can be a Web application client that accesses the server through a web page (such as Baidu Browser, Google Chrome, etc.).
[0056] In the embodiments of the present disclosure, the multimedia communication data may be the communication data transmitted between the client and the multimedia server when the user uses various multimedia communication services provided by the multimedia server through the client. In some embodiments, the multimedia data communication data in the embodiments of the present disclosure may be real-time or streaming multimedia communication data transmitted through a long connection, such as communication data of multimedia services such as audio / video online conferences and live video broadcasts.
[0057] In the embodiments of the present disclosure, a long connection refers to a network connection established between a client and a server that remains connected for a relatively long period of time (e.g., a period during which the client's token information has not expired), and is applicable to real-time or streaming multimedia communication data transmission scenarios. The first long connection mentioned above refers to a long connection established between a client and a multimedia server, and is used to transmit multimedia communication data between the client and the multimedia server.
[0058] Exemplarily, the network status data in S202 above may be any data that can reflect the network status when the first long connection transmits multimedia communication data, including but not limited to data such as network speed and bandwidth. The local log data in S202 above may be any log data generated by the client during the multimedia communication data transmission process, including but not limited to log data for recording user behavior data and / or application operation data. In some embodiments, it may be embedded point log data collected by embedded point code implanted in the multimedia client application system.
[0059] S204, encapsulating the network status information and the local log data to obtain multimedia log data, wherein the multimedia log data carries associated information of the multimedia communication data.
[0060] It should be noted that, in order to facilitate monitoring of the transmission of multimedia communication data transmitted by the client through the first long connection, the client is required to upload the local log data generated during the multimedia communication data transmission process to the log server. If the local log data is transmitted through the long connection for transmitting the multimedia communication data, on the one hand, the uploading of the local log data may affect the transmission quality of the multimedia communication data. On the other hand, when the long connection is disconnected and reconnected due to factors such as the network environment or device performance, the local log data during the long connection disconnection may not be uploaded to the log server, resulting in the problem of missing log data. The log data processing method provided in the embodiment of the present disclosure transmits the network status information of the first long connection and the local log data generated by the client through the second long connection, and can upload the log data of the client during the multimedia communication data transmission process to the log server without affecting the quality of the multimedia communication data transmission.
[0061] Taking into account that multimedia communication data and multimedia log data are transmitted through different long connections, after collecting the network status information of the first long connection and the local log data of the client, it is necessary to encapsulate the network status information of the first long connection and the local log data of the client so that the encapsulated multimedia log data carries the associated information of the multimedia communication data, thereby realizing the associated analysis of the multimedia log data and the multimedia communication data.
[0062] In specific implementation, the encapsulation of network status information and local log data may be performed in real time, according to a preset period, or triggered by abnormal network status and / or abnormal multimedia communication data transmission. The present disclosure does not impose specific restrictions on this.
[0063] S206: Transmit the multimedia log data to the log server through the second long connection.
[0064] It should be noted that the second long connection in the embodiment of the present disclosure refers to a long connection created between the client and the log server, which is used for the client to upload multimedia log data to the log server. In specific implementation, the second long connection and the first long connection can use the same communication protocol, or different communication protocols, and the expiration time of the token information corresponding to the second long connection and the first long connection can be the same or different. In order to ensure that the network status information of the first long connection and the local log data generated by the client during the transmission of multimedia communication data by the first long connection are all uploaded to the log server, the expiration time of the token information corresponding to the second long connection can be configured to be greater than the expiration time of the token information corresponding to the first long connection, so that the time period during which the second long connection remains connected is greater than the time period during which the first long connection remains connected.
[0065] S208: In response to the disconnection of the second long connection, the multimedia log data is stored in one or more local log files of the client.
[0066] It should be noted that the local log file in the embodiment of the present disclosure refers to a file created locally on the client for storing log data that the client has not successfully transmitted to the log server due to the disconnection of the second long connection. The first long connection and the second long connection in the embodiment of the present disclosure are both on the same client. Therefore, if the local log file transmitted on the second long connection is too large, it may affect the transmission quality of the multimedia communication data on the first long connection.
[0067] In the embodiment of the present disclosure, local log data is stored in one or more local log files. By limiting the file size of the local log files, it is possible to avoid the local log files transmitted by the second long connection being too large and affecting the transmission quality of the multimedia communication data transmitted by the first long connection.
[0068] In specific implementation, the file size threshold of the local log file may be preconfigured, or the file size threshold of the local log file may be adaptively adjusted according to network status information and / or multimedia communication quality requirement information.
[0069] It should be noted that the local log file in the embodiment of the present disclosure may be a local log file of the client, or a log file on other local devices connected to the client.
[0070] S210 , in response to the reconnection of the second long connection, uploading one or more local log files to the log server through the reconnected second long connection.
[0071] Furthermore, considering that the second long connection for transmitting log data may also be disconnected and reconnected due to factors such as network environment or device performance, the log data processing method provided in the embodiment of the present invention stores the multimedia log data in the local log file of the client when it is detected that the second long connection is disconnected, and uploads the local log file of the client to the log server after the second long connection is reconnected, thereby ensuring that all multimedia log data on the client is uploaded to the log server.
[0072] Exemplarily, when uploading local log files, the client may upload them one by one, or may upload multiple local log files each time, or may upload all local log files to the log server at one time.
[0073] As can be seen from the above, the log data processing method provided in the embodiment of the present disclosure obtains the network status information of the first long connection and the local log data of the client during the process of transmitting multimedia communication data with the multimedia server through the first long connection, encapsulates the network status information of the first long connection and the local log data of the client, obtains the multimedia log data carrying the multimedia communication data related information, and transmits it to the log data server through the second long connection. Since the multimedia log data and the multimedia communication data are transmitted through different long connections, the disconnection of the long connection for transmitting the multimedia communication data will not affect the transmission of the multimedia log data. Furthermore, the multimedia log data that cannot be transmitted after the second long connection is disconnected is stored in the local log file of the client, and after the second long connection is reconnected, the local log file is uploaded to the log server, which can ensure that the multimedia log data is uploaded to the log server without omission.
[0074] Through the log data processing method provided by the embodiment of the present disclosure, the network status information and local log data of the client during the process of transmitting multimedia communication data through a long connection can be uploaded to the log server in a timely and complete manner, so that the log server can monitor the multimedia communication process of the client based on the received data.
[0075] In one embodiment, when the multimedia communication data transmitted by the client is real-time or streaming multimedia communication data based on a Web application, the first long connection between the client and the multimedia server in the embodiment of the present disclosure can be a WebSocket connection, and the second long connection between the client and the log server can also be a WebSocket connection. The WebSocket connection supports full-duplex communication between the client and the server, and once the connection is established, the connection state can be maintained until the client or server closes the connection, reducing the overhead of frequently establishing and closing connections.
[0076] In some embodiments, when the client transmits multimedia communication data to the multimedia server through the first long connection, the client may use a preset multimedia communication data packet encapsulation method to encapsulate the multimedia communication data to obtain one or more multimedia communication data packets, and send them to the multimedia server through the first long connection, wherein each multimedia communication data packet contains: an encapsulation sequence number and timestamp information. In the process of transmitting multiple multimedia communication data packets through the first long connection, Figure 3 The process shown encapsulates the network status information and local log data to obtain the encapsulated multimedia log data, such as Figure 3 As shown, specifically including:
[0077] S302, obtaining network status information and timestamp information of local log data;
[0078] S304, determining a multimedia communication data packet from the multimedia communication data according to the network status information and the timestamp information of the local log data, and obtaining an encapsulation sequence number of the multimedia communication data packet;
[0079] S306, encapsulate the network status information, the local log data and the encapsulation sequence number of the multimedia communication data packet, and make the encapsulated multimedia log data carry the encapsulation sequence number of the multimedia communication data packet.
[0080] It should be noted that the collection of network status information and / or local log data has its corresponding timestamp information; when a multimedia communication packet is sent, there will also be corresponding timestamp information, and the encapsulation serial number in the multimedia data packet is used to identify each multimedia communication data packet. Therefore, when the network status information and local log data are encapsulated, the encapsulation serial number of the corresponding multimedia communication data packet can be obtained according to the timestamp information of the network status information and the local log data, and the network status information, local log data and the encapsulation serial number of the corresponding multimedia communication data packet are encapsulated together to obtain the multimedia log data, so that the log server can quickly match the corresponding multimedia communication data packet according to the encapsulation serial number contained in the multimedia log data.
[0081] For example, when the client transmits multimedia data packet 1 (timestamp 1), multimedia data packet 2 (timestamp 2), multimedia data packet 3 (timestamp 3), multimedia data packet 4 (timestamp 4) and multimedia data packet 5 (timestamp 5) through the first long connection, assuming that the multimedia log data to be encapsulated is the network status information of the long connection in the first time period and the local log data generated by the client in the first time period, if the first time period contains timestamp 1, timestamp 2 and timestamp 3, the encapsulation serial numbers of the multimedia data packet, multimedia data packet 2 and multimedia data packet 3 can be encapsulated together with the network status information of the long connection in the first time period and the local log data generated by the client in the first time period as the first multimedia log data packet.
[0082] It should be noted that in the embodiments of the present disclosure, one multimedia log data packet may correspond to one or more multimedia communication data packets. During the specific implementation, it may be adjusted according to the actual situation, and the present disclosure does not impose specific limits on this.
[0083] In the embodiment of the present disclosure, the file size threshold of the local log file can be a pre-configured threshold, which can be a threshold configured by the user (such as 100K), or a threshold that is adaptively updated according to dynamic changes in multimedia communication data transmission bandwidth demand information and / or network status information of the first long connection.
[0084] Figure 4 A flow chart of a method for determining a file size threshold of a local log file in an embodiment of the present disclosure is shown as follows: Figure 4 As shown, the log data processing method provided in the embodiment of the present disclosure can determine the file size threshold of the local log file through the following steps:
[0085] S402: Configure a file size threshold of a local log file according to the transmission bandwidth requirement information of the first long connection, wherein the size of the file size threshold is negatively correlated with the transmission bandwidth requirement information of the first long connection.
[0086] It should be noted that the above-mentioned transmission bandwidth requirement information is used to characterize the transmission bandwidth (related to the quality of multimedia communication) that the client expects to achieve when transmitting multimedia communication data through the first long connection. In specific implementation, the transmission bandwidth requirement information of the first long connection can be obtained, and then the file size threshold of the local log file can be configured according to the transmission bandwidth requirement information of the first long connection. In some embodiments, the transmission bandwidth requirement information in the embodiments of the present disclosure includes but is not limited to any one or more of the following: the data type, quantity, occupied bandwidth (amount of data transmitted per unit time) of multimedia communication data, and other information. The larger the local log file, the larger the transmission bandwidth of the second long connection. When the transmission bandwidth of the client is fixed, the transmission bandwidth of the first long connection will be smaller. Therefore, when determining the file size threshold of the local log file, it can be determined based on the transmission bandwidth requirement information of the first long connection.
[0087] For example, assuming that the total transmission bandwidth of the client is 1M; if the transmission bandwidth requirement of the first long connection is 900K, the file size threshold of the local log file can be configured as 100K. If the transmission bandwidth requirement of the first long connection is 800K, the file size threshold of the local log file can be configured as 200K.
[0088] For another example, for an online video conference, when the multimedia communication data transmitted by the client is video data, since the transmission of video data occupies a large bandwidth, a smaller file size threshold (such as 100K) can be configured to prevent the upload of local log files from affecting the transmission quality of video data; and when the multimedia communication data transmitted by the client is audio data, since the transmission of audio data occupies a small bandwidth, a larger file size threshold (such as 200K) can be configured.
[0089] Furthermore, considering that the network state of the first persistent connection is constantly changing, in some embodiments, after executing S402, the embodiment of the present disclosure may also update the file size threshold of the local log file through the following steps:
[0090] S404: Update the file size threshold according to the network status information of the first long connection, wherein the network status information at least includes: network transmission bandwidth, and the size of the file size threshold is positively correlated with the size of the network transmission bandwidth.
[0091] It should be noted that the above network status information is used to characterize the network status of the client when transmitting multimedia communication data through the first long connection, including but not limited to any one or more of the following: network bandwidth, network transmission rate, etc.
[0092] In the disclosed embodiment, the file size threshold of the local log file is determined according to the transmission bandwidth requirement information of the client transmitting multimedia communication data, which can meet the transmission of multimedia communication data in different demand scenarios. The file size threshold is updated according to the network status information, which can achieve the purpose of adaptively adjusting the file threshold.
[0093] Figure 5 A flow chart of a method for reconnecting a persistent connection request in an embodiment of the present disclosure is shown. Figure 5 As shown, the log data processing method provided in the embodiment of the present disclosure can also request the reconnection of the network connection through the following steps:
[0094] S502, sending a token verification request to the log server according to a preset token verification time interval, wherein the token verification request carries the token information of the client;
[0095] S504, receiving the token verification result returned by the log server based on the token verification request;
[0096] S506: When the token verification result indicates that the token information of the client has not exceeded the token expiration time, a reconnection request is sent to the log server according to a preset reconnection time interval, wherein the reconnection time interval is less than the token verification time interval.
[0097] It should be noted that the token information in the embodiment of the present disclosure is the information used by the server (log server or multimedia server) to verify the identity of the client. When the network connection between the client and the server is a long connection, the expiration time of the token information is usually set to a longer duration. If the token information is verified every time the network is disconnected and reconnected, it will cause unnecessary network resource overhead. Therefore, in the embodiment of the present disclosure, the preset reconnection time interval for configuring the network reconnection request is less than the preset verification time interval for verifying the token information, which can reduce the network resource overhead caused by frequent verification of the token information. In one embodiment, the verification time interval of the token information (i.e., the preset verification time interval) can be configured to be 10 minutes; and the reconnection time interval for initiating the network reconnection request (i.e., the preset reconnection time interval) is 2 seconds.
[0098] In some embodiments, Figure 5 As shown, after receiving the token verification result returned by the server based on the token verification request, the log data processing method provided in the embodiment of the present disclosure can also upload the local log file through the following steps:
[0099] S508: When the token verification result indicates that the token information of the client exceeds the token expiration time, close the second long connection.
[0100] It should be noted here that Figure 5The steps of the long connection request reconnection method shown can be applied to reconnection of the first long connection between the client and the log server, and can also be applied to reconnection of the first long connection between the client and the multimedia server.
[0101] In some embodiments, Figure 6 As shown, after closing the second long connection, the log data processing method provided in the embodiment of the present disclosure can also upload the local log file through the following steps:
[0102] S602, if there is a local log file that has not been uploaded locally on the client, generate a log upload failure prompt message, wherein the log upload failure prompt message is used to prompt the client that there is log data that has failed to be uploaded;
[0103] S604: In response to the log upload operation performed by the user based on the log upload failure prompt information, the local log file stored locally on the client is uploaded to the log server through other communication methods.
[0104] It should be noted that in the disclosed embodiment, the local log data and local log files of the client are uploaded to the log server through the second long connection, and the token information of the client exceeds the token expiration time, and the second long connection between the client and the log server will be closed. If the second connection between the client and the log server is disconnected within a period of time before the token expiration time is about to end, it may cause a part of the local log data that has not been successfully uploaded to the client. In order to avoid the loss of this part of the log data, in the disclosed embodiment, in response to the long connection re-established between the client and the log server, when there is a local log file that has not been uploaded locally on the client, the local log file stored locally on the client is uploaded to the log server through the long connection established by the pet think you. In specific implementation, when the client and the log server establish a second long connection each time, it automatically detects whether the client has a local log file stored locally. If so, the local log file is uploaded, which can avoid the problem of log data loss caused by the closure of the second long connection.
[0105] In some embodiments, other communication methods may be uploading through other communication methods such as text messages, emails, etc., or uploading through a long connection that is reestablished next time. This disclosure does not specifically limit this.
[0106] In some embodiments, the local log files of the client can be stored in a local log folder created locally by the client. Figure 7 As shown, the log data processing method provided in the embodiment of the present disclosure can upload the local log file of the client to the server through the following steps:
[0107] S702, in response to the reconnection of the second long connection, periodically traverse the local log folder;
[0108] S704, when there are multiple local log files that have not been uploaded in the local log folder, sort the multiple local log files according to the generation time of each local log file;
[0109] S706, according to the sorting result, the unuploaded log files in the local log folder are uploaded to the log server in sequence through the reconnected second long connection;
[0110] S708, delete the successfully uploaded local log files in the local log folder.
[0111] In the above embodiment, the local log files storing the local log data of the client are placed in a local log folder of the client. The local log files in the folder can be uploaded to the log server in sequence by periodically traversing the folder. After the local log file is successfully uploaded to the server, the successfully uploaded local log file is deleted from the local log folder in time, which can avoid the local log file from occupying the client storage space.
[0112] In some embodiments, after uploading each local log file, the client can monitor whether it has received a response message returned by the log server through the second long connection, and upload the next local log file after confirming that the previous local log file has been successfully uploaded. In this way, it is possible to avoid accidentally deleting a local log file that has not been successfully uploaded.
[0113] Based on the same inventive concept, the present disclosure also provides a Figure 8 The log data processing method shown in the figure is applied to the server side. In principle, Figure 8 The method shown can be performed by any electronic device with computing processing capabilities. In some embodiments, Figure 8 The log data processing method shown can be executed by the log server 104 of the above system architecture; in other embodiments, Figure 8 The log data processing method shown can be implemented by the log server 104 and the client 101 in the above system architecture in an interactive manner.
[0114] like Figure 8 As shown, the log data processing method applied to the server side provided in the embodiment of the present disclosure includes the following steps:
[0115] S802, receiving multimedia log data sent by the client through the second long connection, wherein the multimedia log data is obtained by the client encapsulating the network status information of the first long connection and the local log data of the client, the first long connection is used for the client to transmit multimedia communication data with the multimedia server, and the multimedia log data carries the associated information of the multimedia communication data;
[0116] S804, receiving a reconnection request sent by the client, and reconnecting the second long connection when the token information of the client does not exceed the token expiration time;
[0117] S806, in response to the reconnection of the second long connection, receiving one or more local log files uploaded by the client through the reconnected second long connection, wherein the one or more local log files store multimedia log data generated by the client during the period when the second long connection is disconnected, and the file size of each local log file does not exceed a preset file size threshold.
[0118] In one embodiment of the present disclosure, the associated information of the multimedia communication data is an encapsulation sequence number generated when the multimedia communication data is encapsulated into a multimedia communication data packet; in this embodiment, Fig. 9 As shown, the log data processing method provided in the embodiment of the present disclosure may also include the following steps:
[0119] S902, decapsulating the multimedia log data to obtain the encapsulation sequence number of the multimedia communication data packet, the network status information of the first long connection, and the local log data of the client;
[0120] S904: Associating the network status information of the first long connection and the local log data of the client with the corresponding multimedia communication data packet according to the encapsulation sequence number of the decapsulated multimedia communication data packet.
[0121] In a specific implementation, when the log server receives the multimedia log data uploaded by the client through the second long connection, the multimedia log data can be decapsulated to obtain the encapsulation serial number of the multimedia communication data packet, the network status information of the first long connection, and the local log data of the client; the network status information of the first long connection and the local log data of the client can be associated with the multimedia communication data packet transmitted by the first long connection through the encapsulation serial number of the multimedia communication data packet.
[0122] In some embodiments, the above-mentioned client is also used to: use a preset multimedia communication data packet encapsulation method to encapsulate the multimedia communication data, obtain one or more encapsulated multimedia communication data packets, and send them to the multimedia server through the first long connection, obtain the network status information of the first long connection and the local log data of the client, wherein each multimedia communication data packet contains: encapsulation serial number and timestamp information.
[0123] In some embodiments, the above-mentioned client is also used to encapsulate the network status information and local log data through the following steps to obtain multimedia log data: obtain the timestamp information of the network status information and the local log data; determine the multimedia communication data packet from the multimedia communication data according to the timestamp information of the network status information and the local log data, and obtain the encapsulation serial number of the multimedia communication data packet; encapsulate the network status information, local log data and the encapsulation serial number of the multimedia communication data packet, and make the encapsulated multimedia log data carry the encapsulation serial number of the multimedia communication data packet.
[0124] In some embodiments, the client is also used to determine the file size threshold of the local log file through the following steps: configuring the file size threshold of the local log file according to the transmission bandwidth requirement information of the first long connection, wherein the size of the file size threshold is negatively correlated with the transmission bandwidth requirement information of the first long connection; updating the file size threshold according to the network status information of the first long connection, wherein the network status information includes at least: network transmission bandwidth, and the size of the file size threshold is positively correlated with the size of the network transmission bandwidth.
[0125] In some embodiments, Fig.10 As shown, the log data processing method provided in the embodiment of the present disclosure can also verify the token information through the following steps:
[0126] S1002, receiving a token verification request sent by a client according to a preset verification time interval, wherein the token verification request carries the token information of the client;
[0127] S1004, according to the token verification request, verify whether the token information of the client exceeds the token expiration time;
[0128] S1006, returning a token verification result to the client, wherein, when the token verification result indicates that the token information of the client has not exceeded the token expiration time, the client is further used to send a reconnection request to the log server according to a preset reconnection time interval, wherein the reconnection time interval is less than the token verification time interval. The reconnection request is used to request to establish a second long connection between the client and the log server.
[0129] In some embodiments, Fig.11As shown, the log data processing method provided in the embodiment of the present disclosure can also receive the local log file uploaded by the client through the following steps:
[0130] S1102, when the token verification result indicates that the token information of the client exceeds the token expiration time, closing the second long connection;
[0131] S1106, receiving a local log file uploaded by the client through other communication methods, wherein the client is used to: generate a log upload failure prompt message when the second long connection is closed and there are local log files that have not been uploaded locally on the client, wherein the log upload failure prompt message is used to prompt the client that there is log data that has failed to be uploaded; in response to the log upload operation performed by the user based on the log upload failure prompt message, upload the local log file stored locally on the client to the log server through other communication methods.
[0132] In some embodiments, the local log file of the client is stored in a local log folder created locally by the client; the above-mentioned client is also used to: respond to the reconnection of the second long connection, regularly traverse the local log folder; when there are multiple local log files that have not been uploaded in the local log folder, sort the multiple local log files according to the generation time of each local log file, and according to the sorting result, upload the log files that have not been uploaded in the local log folder to the log server in sequence through the reconnected second long connection, and delete the local log files that have been successfully uploaded in the local log folder.
[0133] The following takes the example of a client uploading tracking data to a server through a persistent connection to describe in detail the log data processing method provided in the embodiment of the present disclosure:
[0134] Fig.12 A flowchart of a client uploading tracking log data through a long connection in an embodiment of the present disclosure is shown. Fig.12 As shown, specifically including:
[0135] S1202: Establish a long connection.
[0136] In a specific implementation, the client obtains the address information of the server (such as domain name address information) to establish a persistent connection with the server.
[0137] S1204: The client uploads the tracking log data to the server in real time through a persistent connection.
[0138] S1206, the client stores the tracking log data that failed to be uploaded into the tracking log file.
[0139] S1208, the client periodically checks the tracking log file.
[0140] In specific implementation, the tracking log files storing the tracking log data can be placed in a folder, and the folder can be traversed every 20 seconds to check whether there are any tracking log files that have not been uploaded.
[0141] S1210: The client uploads the tracking log file to the server through a long connection.
[0142] S1212, the client deletes the uploaded tracking log file.
[0143] S1214, send a token verification request.
[0144] In specific implementation, during the network reconnection process, a token verification request can be sent every preset verification time interval (such as 10 minutes). When the long connection between the client and the server is a WebSocket connection, the client can verify the token information by sending an HTTP request. If the token information expires, the agreed error code is returned.
[0145] S1216, the client requests the network connection to be reconnected.
[0146] In specific implementation, a network connection reconnection request may be sent once every preset reconnection time interval (eg, 2 seconds).
[0147] S1218, close the long connection.
[0148] In the specific implementation, in order to avoid the situation where some tracking log data of the client has not been uploaded to the server after the long connection is closed, the client can check whether there is a tracking log file locally when the client and the server establish a long connection next time. If so, upload the tracking log file that has not been uploaded.
[0149] Take the client's local log data as the embedded log data of the WebRTC project (WebRTC real-time multimedia communication data transmission) as an example. Fig.10 A flowchart of a client uploading WebRTC project tracking log data through a WebSocket connection in an embodiment of the present disclosure is shown. Fig.13 As shown, specifically including:
[0150] S1302, WebRTC project initialization.
[0151] S1304: The client establishes a long connection with the log server.
[0152] S1306, connection successful.
[0153] S1308, real-time long transmission of embedded point log data through long connection.
[0154] S1310, record the tracking log data into a local log file.
[0155] S1312: If the embedded log data exceeds the file size threshold of the local log file, it is recorded in a new local log file.
[0156] S1314, upload the local log file through a long connection.
[0157] S1316, check whether the client has any local log files that have not been uploaded.
[0158] S1318: The long connection is disconnected due to network reasons or token information expiration.
[0159] S1320, long connection failed.
[0160] S1322, verify token information.
[0161] S1324, request reconnection (reconnection is requested every 2 seconds).
[0162] S1326, Reconnection failed.
[0163] S1328, check whether the token verification exceeds 13 minutes.
[0164] S1330, join / create a room for video calling.
[0165] S1332, exit / destroy the room used for video calling.
[0166] S1334, WebRTC project deinitialization.
[0167] S1336: The long connection between the client and the log server is disconnected.
[0168] The WebRTC project needs to support users to reconnect calls in environments such as weak networks, network jitters, and network switching. However, the WebRTC reconnection process is complex and prone to exceptions, so uploading log data is very important. To avoid the inability to upload log data to the server during the reconnection process, the disclosed embodiment increases local log storage, and the file size of each local log file does not exceed 100K. After the network connection is completed, the local log folder is traversed, and the embedded log files are checked every 20 seconds. Each time, the data of a embedded log file is taken out for upload, and the corresponding embedded log file is deleted after the upload is completed. The traversal continues until all the embedded log files in the upload folder are traversed and uploaded. The embedded log files that failed to upload are not deleted.
[0169] Applying the log data processing method provided in the embodiments of the present disclosure to the WebRTC project can achieve but is not limited to the following technical effects: ① Avoiding the upload of local log data of the client from affecting the communication quality of the WebRTC project (multimedia data transmission). ② Avoiding the loss of part of the local log data of the client due to network disconnection and reconnection. ③ Using WebSocket to upload local log data in real time to achieve timely analysis of local log data of the client. ④ The local log data that failed to upload is stored in the local log file of the client in a timely manner, and it is checked and uploaded regularly to ensure that all local log data on the client is uploaded to the server without omission. ⑤ Before saving the local log data to the local log file, check the file size of the local log file to ensure that the size of each local log file does not exceed the preset file size threshold (such as 100K), which can reduce the network pressure caused by uploading local log files and reduce the impact on the quality of multimedia communication data communication (such as audio / video calls). ⑥ Upload locally stored log files through WebSocket without unnecessary overhead.
[0170] Based on the same inventive concept, the present disclosure also provides a client, as described in the following embodiments. Since the principle of solving the problem in the client embodiment is similar to that in the above method embodiment, the implementation of the client embodiment can refer to the implementation of the above method embodiment, and the repeated parts will not be repeated.
[0171] Fig.14 A schematic diagram of the internal components of a client in an embodiment of the present disclosure is shown as follows: Fig.14 As shown, the client includes: a first long connection data transmission module 141 , a data processing module 142 , a second long connection data transmission module 143 , a log file local storage module 144 and a log file upload module 145 .
[0172] Among them, the first long connection data transmission module 141 is used to transmit multimedia communication data with the multimedia server through the first long connection, and obtain the network status information of the first long connection and the local log data of the client; the data processing module 142 is used to encapsulate the network status information and the local log data to obtain the multimedia log data, wherein the multimedia log data carries the associated information of the multimedia communication data; the second long connection data transmission module 143 is used to transmit the multimedia log data to the log server through the second long connection; the log file local storage module 144 is used to store the multimedia log data in one or more local log files of the client in response to the disconnection of the second long connection; the log file upload module 145 is used to upload one or more local log files to the log server through the reconnected second long connection in response to the reconnection of the second long connection.
[0173] In some embodiments, the first long connection data transmission module 141 is also used to: encapsulate multimedia communication data using a preset multimedia communication data packet encapsulation method, obtain one or more encapsulated multimedia communication data packets, and send them to the multimedia server through the first long connection to obtain the network status information of the first long connection and the local log data of the client, wherein each multimedia communication data packet contains: an encapsulation serial number and timestamp information; the data processing module is also used to: obtain the timestamp information of the network status information and the local log data; determine the multimedia communication data packet from the multimedia communication data according to the timestamp information of the network status information and the local log data, and obtain the encapsulation serial number of the multimedia communication data packet; encapsulate the network status information, local log data and the encapsulation serial number of the multimedia communication data packet, and make the encapsulated multimedia log data carry the encapsulation serial number of the multimedia communication data packet.
[0174] In some embodiments, the log file local storage module 144 is further used to configure a file size threshold of the local log file according to the transmission bandwidth requirement information of the first long connection, wherein the size of the file size threshold is negatively correlated with the transmission bandwidth requirement information of the first long connection.
[0175] In some embodiments, the above-mentioned log file local storage module 144 is also used to: update the file size threshold according to the network status information of the first long connection, wherein the network status information at least includes: network transmission bandwidth, and the size of the file size threshold is positively correlated with the size of the network transmission bandwidth.
[0176] In some embodiments, the client provided in the embodiments of the present disclosure also includes: a first network connection module 146, which is used to: send a token verification request to the log server at a preset token verification time interval, wherein the token verification request carries the token information of the client; receive the token verification result returned by the log server based on the token verification request; when the token verification result indicates that the token information of the client has not exceeded the token expiration time, send a reconnection request to the log server at a preset reconnection time interval, wherein the reconnection time interval is less than the token verification time interval.
[0177] In some embodiments, the first network connection module 146 is further configured to close the second long connection when the token verification result indicates that the token information of the client exceeds the token expiration time.
[0178] In some embodiments, the above-mentioned log file upload module 145 is also used to: check whether there is a local log file stored locally on the client; if there is a local log file locally on the client, generate a log upload failure prompt message, wherein the log upload failure prompt message is used to prompt the client that there is log data that failed to be uploaded; in response to the log upload operation performed by the user based on the log upload failure prompt message, upload the local log file stored locally on the client to the log server via other communication methods.
[0179] In some embodiments, the local log file of the client is stored in a local log folder created locally by the client; the above-mentioned log file upload module 145 is also used to: respond to the reconnection of the second long connection, regularly traverse the local log folder; when there are multiple local log files that have not been uploaded in the local log folder, sort the multiple local log files according to the generation time of each local log file, and according to the sorting result, upload the log files that have not been uploaded in the local log folder to the log server in sequence through the reconnected second long connection, and delete the local log files that have been successfully uploaded in the local log folder.
[0180] In some embodiments, when the multimedia communication data transmitted by the client is multimedia communication data based on a Web application, the long connection between the client and the multimedia server is a WebSocket connection. Optionally, the long connection between the client and the log server can also be a WebSocket connection.
[0181] It should be noted that the examples and application scenarios implemented by the modules in the above client embodiment are the same as those of the corresponding steps in the method embodiment, but are not limited to the contents disclosed in the above method embodiment. It should be noted that the above modules as part of the client can be executed in a computer system such as a set of computer executable instructions.
[0182] Based on the same inventive concept, the present disclosure also provides a log server, as described in the following embodiments. Since the principle of solving the problem in the log server embodiment is similar to that in the above method embodiment, the implementation of the log server embodiment can refer to the implementation of the above method embodiment, and the repeated parts will not be repeated.
[0183] Fig.15 A schematic diagram of the internal components of a log server in an embodiment of the present disclosure is shown as follows: Fig.15 As shown, the log server includes: a log data receiving module 151 , a second network connection module 152 and a log file receiving module 153 .
[0184] Among them, the log data receiving module 151 is used to receive multimedia log data sent by the client through the second long connection, wherein the multimedia log data is obtained by the client encapsulating the network status information of the first long connection and the local log data of the client, the first long connection is used for the client to transmit multimedia communication data with the multimedia server, and the multimedia log data carries the associated information of the multimedia communication data; the second network connection module 152 is used to receive the reconnection request sent by the client, and reconnect the second long connection when the token information of the client does not exceed the token expiration time; the log file receiving module 153 is used to respond to the reconnection of the second long connection, and receive one or more local log files uploaded by the client through the reconnected second long connection, wherein the one or more local log files store the multimedia log data generated by the client during the disconnection of the second long connection, and the file size of each local log file does not exceed the preset file size threshold.
[0185] In one embodiment of the present disclosure, the associated information of the above-mentioned multimedia communication data is the encapsulation serial number generated when the multimedia communication data is encapsulated into a multimedia communication data packet; in this embodiment, the log server provided in the embodiment of the present disclosure also includes: a log data analysis module 154, which is used to: decapsulate the multimedia log data to obtain the encapsulation serial number of the multimedia communication data packet, the network status information of the first long connection, and the local log data of the client; according to the encapsulation serial number of the decapsulated multimedia communication data packet, the network status information of the first long connection and the local log data of the client are associated with the corresponding multimedia communication data packet.
[0186] In some embodiments, the log server provided in the embodiments of the present disclosure also includes: a token verification module 155, which is used to: receive a token verification request sent by the client at a preset verification time interval, wherein the token verification request carries the client's token information; verify whether the client's token information exceeds the token expiration time according to the token verification request; return the token verification result to the client, wherein, when the token verification result indicates that the client's token information does not exceed the token expiration time, the above-mentioned client is also used to send a reconnection request to the log server at a preset reconnection time interval, wherein the reconnection time interval is less than the token verification time interval. The reconnection request is used to request to establish a second long connection between the client and the log server.
[0187] In some embodiments, the second network connection module 152 is also used to: close the second long connection when the token verification result indicates that the token information of the client exceeds the token expiration time; the log file receiving module 153 is also used to: receive local log files uploaded by the client through other communication methods, wherein the client is used to: after closing the second long connection, check whether there are local log files stored locally on the client; if there are local log files locally on the client, generate a log upload failure prompt message, wherein the log upload failure prompt message is used to prompt the client that there is log data that failed to be uploaded; in response to the log upload operation performed by the user based on the log upload failure prompt message, upload the local log file stored locally on the client to the log server through other communication methods.
[0188] It should be noted that the examples and application scenarios implemented by the modules in the above server embodiment are the same as those of the corresponding steps in the method embodiment, but are not limited to the contents disclosed in the above method embodiment. It should be noted that the above modules as part of the server can be executed in a computer system such as a set of computer executable instructions.
[0189] Those skilled in the art will appreciate that various aspects of the present disclosure may be specifically implemented in the following forms, namely: a complete hardware implementation, a complete software implementation (including firmware, microcode, etc.), or an implementation that combines hardware and software aspects, which may be collectively referred to herein as a "circuit," "module," or "system."
[0190] Based on the same inventive concept, an electronic device is also provided in an embodiment of the present disclosure, the electronic device comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to execute any of the above log data processing methods by executing the executable instructions. Since the principle of solving the problem in the electronic device embodiment is similar to that in the above method embodiment, the implementation of the electronic device embodiment can refer to the implementation of the above method embodiment, and the repeated parts will not be repeated.
[0191] Refer to the following Fig.16 1600 according to this embodiment of the present disclosure is described. Fig.16 The electronic device 1600 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0192] like Fig.16 As shown, the electronic device 1600 is in the form of a general computing device. The components of the electronic device 1600 may include but are not limited to: at least one processing unit 1610, at least one storage unit 1620, and a bus 1630 connecting different system components (including the storage unit 1620 and the processing unit 1610).
[0193] The storage unit stores program codes, which can be executed by the processing unit 1610, so that the processing unit 1610 executes the steps described in the above “exemplary method” section of this specification according to various exemplary embodiments of the present disclosure.
[0194] In some embodiments, when the electronic device 1600 is a device on the client side, the processing unit 1610 can execute the following steps of the above method embodiment: in response to a successful network connection between the client and the server, uploading log data to the server through the network connection, wherein the log data is generated by the client during the multimedia communication data transmission process; in response to the network connection being disconnected, storing the log data that was not successfully uploaded by the client in the local log file of the client, wherein the file size of the local log file is related to the communication quality requirement information of the multimedia communication data; in response to the network connection being successfully reconnected, uploading the local log file to the server through the reconnected network connection.
[0195] In some embodiments, when the electronic device 1600 is a device on the server side, the processing unit 1610 can execute the following steps of the above method embodiment: in response to a successful network connection between the server and the client, receiving log data uploaded by the client through the network connection, wherein the log data is generated by the client during the multimedia communication data transmission process; in response to the network connection being successfully reconnected, receiving a local log file uploaded by the client through the successfully reconnected network connection, wherein the local log file stores the log data that was not successfully uploaded by the client, and the file size of the local log file is related to the communication quality requirement information of the multimedia communication data.
[0196] The storage unit 1620 may include a readable medium in the form of a volatile storage unit, such as a random access storage unit (RAM) 16201 and / or a cache storage unit 16202 , and may further include a read-only storage unit (ROM) 16203 .
[0197] The storage unit 1620 may also include a program / utility 16204 having a set (at least one) of program modules 16205, such program modules 16205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0198] Bus 1630 may represent one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
[0199] The electronic device 1600 may also communicate with one or more external devices 1640 (e.g., keyboards, pointing devices, Bluetooth devices, etc.), may also communicate with one or more devices that enable a user to interact with the electronic device 1600, and / or communicate with any device that enables the electronic device 1600 to communicate with one or more other computing devices (e.g., routers, modems, etc.). Such communication may be performed via an input / output (I / O) interface 1650. Furthermore, the electronic device 1600 may also communicate with one or more networks (e.g., local area networks (LANs), wide area networks (WANs), and / or public networks, such as the Internet) via a network adapter 1660. As shown, the network adapter 1660 communicates with other modules of the electronic device 1600 via a bus 1630. It should be understood that, although not shown in the figure, other hardware and / or software modules may be used in conjunction with the electronic device 1600, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0200] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the implementation of the present disclosure.
[0201] Based on the same inventive concept, a computer-readable storage medium is also provided in the embodiment of the present disclosure, on which a computer program is stored, and when the computer program is executed by a processor, any of the above-mentioned log data processing methods is implemented. Since the principle of solving the problem in the embodiment of the computer-readable storage medium is similar to that in the above-mentioned method embodiment, the implementation of the embodiment of the computer-readable storage medium can refer to the implementation of the above-mentioned method embodiment, and the repeated parts will not be repeated.
[0202] More specific examples of computer-readable storage media in the present disclosure may include, but are not limited to, an electrical connection having one or more conductors, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0203] In the present disclosure, a computer readable storage medium may include a data signal propagated in baseband or as part of a carrier wave, wherein a readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A readable signal medium may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0204] Alternatively, the program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the foregoing.
[0205] In a specific implementation, the program code for performing the operations of the present disclosure may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., using an Internet service provider to connect through the Internet).
[0206] Based on the same inventive concept, a computer program product is also provided in the embodiments of the present disclosure, including a computer program product, including: a computer program or an instruction, wherein when the computer program or the instruction is executed by a processor, the log data processing method of any one of the above method embodiments is implemented. Since the principle of solving the problem in the computer program product embodiment is similar to that in the above method embodiment, the implementation of the computer program product embodiment can refer to the implementation of the above method embodiment, and the repeated parts will not be repeated.
[0207] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be embodied.
[0208] In addition, although the steps of the method in the present disclosure are described in a specific order in the drawings, this does not require or imply that the steps must be performed in this specific order, or that all the steps shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps, etc.
[0209] Through the description of the above implementation, it is easy for those skilled in the art to understand that the example implementation described here can be implemented by software, or by software combined with necessary hardware. Therefore, the technical solution according to the implementation of the present disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, including several instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the implementation of the present disclosure.
[0210] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the appended claims.
Claims
1. A log data processing method, characterized in that: Applied to the client, including: Transmitting multimedia communication data with a multimedia server through a first persistent connection, and obtaining network status information of the first persistent connection and local log data of the client; Encapsulating the network status information and the local log data to obtain multimedia log data, wherein the multimedia log data carries associated information of the multimedia communication data; Transmitting the multimedia log data to the log server through a second long connection; In response to the disconnection of the second long connection, storing the multimedia log data in one or more local log files of the client; In response to the reconnection of the second persistent connection, the one or more local log files are uploaded to the log server through the reconnected second persistent connection.
2. The method according to claim 1, characterized in that: The encapsulating the network status information and the local log data to obtain multimedia log data includes: Obtaining the network status information and the timestamp information of the local log data; Determine a multimedia communication data packet from the multimedia communication data according to the network status information and the timestamp information of the local log data, and obtain an encapsulation sequence number of the multimedia communication data packet; The network status information, the local log data and the encapsulation sequence number of the multimedia communication data packet are encapsulated, and the encapsulated multimedia log data carries the encapsulation sequence number of the multimedia communication data packet.
3. The method according to claim 1, characterized in that Before storing the multimedia log data in one or more local log files of the client in response to disconnection of the second long connection, the method further includes: According to the transmission bandwidth requirement information of the first long connection, a file size threshold of the local log file is configured, wherein the size of the file size threshold is negatively correlated with the transmission bandwidth requirement information of the first long connection.
4. The method according to claim 3, characterized in that After configuring the file size threshold of the local log file according to the transmission bandwidth requirement information of the first long connection, the method further includes: The file size threshold is updated according to the network status information of the first long connection, wherein the network status information at least includes: network transmission bandwidth, and the size of the file size threshold is positively correlated with the size of the network transmission bandwidth.
5. The method according to claim 1, characterized in that: In response to the reconnection of the second persistent connection, before uploading the one or more local log files to the log server through the reconnected second persistent connection, the method further includes: Sending a token verification request to the log server at a preset token verification time interval, wherein the token verification request carries the token information of the client; Receiving a token verification result returned by the log server based on the token verification request; When the token verification result indicates that the token information of the client has not exceeded the token expiration time, a reconnection request is sent to the log server according to a preset reconnection time interval, wherein the reconnection time interval is less than the token verification time interval.
6. The method according to claim 5, characterized in that After receiving the token verification result returned by the log server based on the token verification request, the method further includes: If the token verification result indicates that the token information of the client exceeds the token expiration time, closing the second long connection; In the case where there is a local log file that has not been uploaded locally on the client, generating log upload failure prompt information, wherein the log upload failure prompt information is used to prompt the client that there is log data that has failed to be uploaded; In response to the log upload operation performed by the user based on the log upload failure prompt information, the local log file stored locally on the client is uploaded to the log server through other communication methods.
7. The method according to claim 1, characterized in that The local log files of the client are stored in a local log folder created locally by the client; In response to the reconnection of the second persistent connection, uploading the one or more local log files to the log server through the reconnected second persistent connection includes: In response to the reconnection of the second long connection, periodically traversing the local log folder; When there are multiple local log files that have not been uploaded in the local log folder, sort the multiple local log files according to the generation time of each local log file; According to the sorting result, the unuploaded log files in the local log folder are uploaded to the log server in sequence through the reconnected second long connection; Delete the successfully uploaded local log files in the local log folder.
8. A log data processing method, characterized in that: Applicable to log servers, including: receiving multimedia log data sent by the client through the second long connection, wherein the multimedia log data is obtained by the client encapsulating the network status information of the first long connection and the local log data of the client, the first long connection is used for the client to transmit multimedia communication data with the multimedia server, and the multimedia log data carries the associated information of the multimedia communication data; receiving a reconnection request sent by the client, and reconnecting the second persistent connection if the token information of the client does not exceed the token expiration time; In response to the reconnection of the second long connection, one or more local log files uploaded by the client are received through the reconnected second long connection, wherein the one or more local log files store multimedia log data generated by the client during the period when the second long connection is disconnected.
9. The method according to claim 8, characterized in that The associated information of the multimedia communication data is an encapsulation sequence number generated when the multimedia communication data is encapsulated into a multimedia communication data packet; the method further comprises: Decapsulating the multimedia log data to obtain an encapsulation sequence number of the multimedia communication data packet, network status information of the first long connection, and local log data of the client; According to the encapsulation sequence number of the decapsulated multimedia communication data packet, the network status information of the first long connection and the local log data of the client are associated with the corresponding multimedia communication data packet.
10. A client, characterized in that: include: A first long connection data transmission module, used to transmit multimedia communication data with the multimedia server through the first long connection, and obtain network status information of the first long connection and local log data of the client; A data processing module, used for encapsulating the network status information and the local log data to obtain multimedia log data, wherein the multimedia log data carries associated information of the multimedia communication data; A second long connection data transmission module, used for transmitting the multimedia log data to the log server through the second long connection; A log file local storage module, configured to store the multimedia log data in one or more local log files of the client in response to the disconnection of the second long connection; A log file uploading module is used to upload the one or more local log files to the log server through the reconnected second long connection in response to the reconnection of the second long connection.
11. A log server, characterized in that: include: a log data receiving module, configured to receive multimedia log data sent by a client through a second long connection, wherein the multimedia log data is obtained by the client encapsulating network status information of the first long connection and local log data of the client, the first long connection is used for the client to transmit multimedia communication data with a multimedia server, and the multimedia log data carries associated information of the multimedia communication data; A network connection reconnection module, configured to receive a reconnection request sent by the client, and reconnect the second long connection if the token information of the client does not exceed the token expiration time; A log file receiving module is used to receive one or more local log files uploaded by the client through the reconnected second long connection in response to the reconnection of the second long connection, wherein the one or more local log files store multimedia log data generated by the client during the disconnection of the second long connection.
12. An electronic device, characterized in that: include: processor; as well as A memory, configured to store executable instructions of the processor; The processor is configured to execute the log data processing method according to any one of claims 1 to 9 by executing the executable instructions.
13. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the log data processing method according to any one of claims 1 to 9 is implemented.
14. A computer program product comprising: A computer program or instruction, characterized in that when the computer program or instruction is executed by a processor, it implements the log data processing method described in any one of claims 1 to 9.
Citation Information
Patent Citations
Transformer substation on-line monitoring system based on IEC61850
CN104362757A
Unified service traffic-limiting fusing platform and method thereof
CN111787073A
Heterogeneous host-oriented network management and control system
CN115333915A
AU6368396A