Connection prediction method, device, apparatus, storage medium and program product

CN116962209BActive Publication Date: 2026-08-28TENCENT CLOUD COMPUTING (BEIJING) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310589290.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-24
Publication Date
2026-08-28
Estimated Expiration
2043-05-24

AI Technical Summary

Technical Problem

[0004]上述过程虽然能够借助模拟的仿真行为尽可能地接近使用对象的真实使用感知,但受限于仿真环境的局限性,仿真测试的手段通常较为单一,且交互行为的测试过程中并未充分考虑服务器端的运行情况,因此无法与服务端端形成联动预警效应,降低了交互成功率的预测成功概率,进而容易导致交互失败的情况发生

Benefits of technology

[0020]在第一设备向第二设备发送连接请求的情况下,获取第一设备在第一时间段内生成的连接检测数据以及第二设备在第一时间段的日志数据,从而确定第一设备向第二设备发送连接请求的请求发送成功率,以及第二设备接收连接请求的请求接收成功率,综合请求发送成功率和请求接收成功率分析得到第一设备和第二设备之间的请求成功率,进而通过连接预测模型对请求成功率进行预测分析,得到在第二时间段内第一设备与第二设备建立连接的连接成功概率。避免对第一设备或者第二设备进行单独分析的局限性,通过对两个设备的综合分析提高连接成功概率的预测准确率,进而有利于根据连接成功概率更加及时地对设备之间的连接方式进行调整,以提高连接请求的发送成功率及接收成功率。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116962209B_ABST
    Figure CN116962209B_ABST
Patent Text Reader

Abstract

The application discloses a connection prediction method and device, equipment, a storage medium and a program product, and relates to the technical field of computers. The method comprises the following steps: in the case that a first device sends a connection request to a second device, acquiring connection detection data generated by the first device in a first time period, and acquiring log data of the second device in the first time period; determining a request sending success rate and a request receiving success rate based on the connection detection data and the log data; fusing the request sending success rate and the request receiving success rate to obtain a request success rate; and performing prediction analysis on the request success rate by using a connection prediction model to obtain a connection success probability in a second time period. In the above manner, the limitation of separate analysis of the first device or the second device is avoided, the prediction accuracy of the connection success probability is improved through comprehensive analysis of the two devices, and the application can be applied to various scenes such as cloud technology, artificial intelligence and intelligent transportation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a connection prediction method, apparatus, device, storage medium, and program product. Background Technology

[0002] In the Internet era, in order to ensure the quality and reliability of various applications running on the terminal, it is usually necessary to conduct a testing process before developing and putting the application into use. That is, to verify the matching between the actual running results and the expected running results of the application, and then to debug the application in a targeted manner.

[0003] In related technologies, when testing the interaction behavior between the terminal and the server, the terminal-side simulation testing method is usually adopted. By comprehensively considering factors such as network type, operator, and region, the user behavior is simulated more realistically, the success rate of interaction between the terminal and the server is analyzed, and then the application is debugged in a targeted manner based on the success rate of interaction.

[0004] While the above process can closely approximate the actual user experience through simulated behavior, it is limited by the simulation environment. The simulation testing methods are usually relatively simple, and the server-side operation is not fully considered during the interactive behavior testing process. Therefore, it is impossible to form a linkage and early warning effect with the server, which reduces the probability of predicting the success rate of the interaction and makes it easy for the interaction to fail. Summary of the Invention

[0005] This application provides a connection prediction method, apparatus, device, storage medium, and program product, which can avoid the limitations of analyzing the first or second device separately. By comprehensively analyzing both devices, the prediction accuracy of the connection success probability is improved. The technical solution is as follows.

[0006] On the one hand, a connection prediction method is provided, the method comprising:

[0007] When the first device sends a connection request to the second device, the connection detection data generated by the first device within a first time period is obtained, and the log data of the second device within the first time period is obtained. The connection detection data includes connection establishment events of the first device within the first time period, and the log data is used to characterize the operation of the second device within the first time period.

[0008] Based on the connection detection data and the log data, the success rate of the first device sending the connection request to the second device is determined, and the success rate of the second device receiving the connection request is determined.

[0009] The request sending success rate and the request receiving success rate are combined to obtain the request success rate between the first device and the second device;

[0010] The connection prediction model, obtained through pre-training, is used to predict and analyze the success rate of the request, thereby obtaining the connection success probability of the first device and the second device establishing a connection within a second time period. The second time period is after the first time period, and the connection prediction model is a model trained using the connection detection data and the log data.

[0011] On the other hand, a connection prediction device is provided, the device comprising:

[0012] The acquisition module is used to acquire connection detection data generated by the first device within a first time period and log data of the second device within the first time period when the first device sends a connection request to the second device. The connection detection data includes connection establishment events of the first device within the first time period, and the log data is used to characterize the operation of the second device within the first time period.

[0013] The determination module is used to determine, based on the connection detection data and the log data, the request sending success rate of the first device sending the connection request to the second device, and the request receiving success rate of the second device receiving the connection request;

[0014] The fusion module is used to fuse the request sending success rate and the request receiving success rate to obtain the request success rate between the first device and the second device;

[0015] The prediction module is used to predict and analyze the success rate of the request using a pre-trained connection prediction model to obtain the connection success probability of the first device and the second device establishing a connection within a second time period, wherein the second time period is after the first time period, and the connection prediction model is a model trained using the connection detection data and the log data.

[0016] On the other hand, a computer device is provided, the computer device including a processor and a memory, the memory storing at least one instruction, at least one program, code set or instruction set, the at least one instruction, the at least one program, the code set or instruction set being loaded and executed by the processor to implement any of the connection prediction methods described in the embodiments of this application above.

[0017] On the other hand, a computer-readable storage medium is provided, wherein at least one instruction, at least one program, code set, or instruction set is stored therein, wherein the at least one instruction, the at least one program, the code set, or the instruction set is loaded and executed by a processor to implement the connection prediction method as described in any of the embodiments of this application above.

[0018] On the other hand, a computer program product or computer program is provided, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform any of the connection prediction methods described in the above embodiments.

[0019] The beneficial effects of the technical solutions provided in this application include at least the following:

[0020] When a first device sends a connection request to a second device, the system acquires connection detection data generated by the first device within a first time period and log data from the second device within the same time period. This allows the determination of the success rate of the first device sending the connection request to the second device and the success rate of the second device receiving the connection request. By combining these success rates, the system obtains the overall success rate of the connection between the first and second devices. Furthermore, a connection prediction model is used to predict and analyze this success rate, yielding the probability of a successful connection between the first and second devices within the second time period. This approach avoids the limitations of analyzing either the first or second device individually. By comprehensively analyzing both devices, the system improves the accuracy of predicting the connection success rate. This allows for more timely adjustments to the connection methods between devices based on the connection success rate, thereby improving both the sending and receiving success rates of connection requests. Attached Figure Description

[0021] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0022] Figure 1 This is a schematic diagram of an implementation environment provided by an exemplary embodiment of this application;

[0023] Figure 2 This is a flowchart of a connection prediction method provided in an exemplary embodiment of this application;

[0024] Figure 3This is a flowchart of a connection prediction method provided in another exemplary embodiment of this application;

[0025] Figure 4 This is a flowchart of a connection prediction method provided in another exemplary embodiment of this application;

[0026] Figure 5 This is a flowchart of a connection prediction method provided in yet another exemplary embodiment of this application;

[0027] Figure 6 This is a flowchart illustrating the overall solution provided in an exemplary embodiment of this application;

[0028] Figure 7 This is a structural block diagram of a connection prediction device provided in an exemplary embodiment of this application;

[0029] Figure 8 This is a structural block diagram of a connection prediction device provided in an exemplary embodiment of this application;

[0030] Figure 9 This is a structural block diagram of a server provided in an exemplary embodiment of this application. Detailed Implementation

[0031] To make the objectives, technical solutions, and advantages of this application clearer, the embodiments of this application will be described in further detail below with reference to the accompanying drawings.

[0032] First, a brief introduction to the terms used in the embodiments of this application will be given.

[0033] Artificial Intelligence (AI) is the theory, methods, technology, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results. In other words, AI is a comprehensive technology within computer science that attempts to understand the essence of intelligence and produce a new kind of intelligent machine that can react in a way similar to human intelligence. AI studies the design principles and implementation methods of various intelligent machines, enabling them to possess the functions of perception, reasoning, and decision-making.

[0034] Artificial intelligence (AI) is a comprehensive discipline encompassing a wide range of fields, including both hardware and software technologies. Fundamental AI technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing, operating / interactive systems, and mechatronics. AI software technologies primarily include computer vision, speech processing, natural language processing, and machine learning / deep learning.

[0035] Machine Learning (ML) is a multidisciplinary field involving probability theory, statistics, approximation theory, convex analysis, and algorithm complexity theory. It specifically studies how computers can simulate or implement human learning behavior to acquire new knowledge or skills and reorganize existing knowledge structures to continuously improve their performance. Machine learning is the core of artificial intelligence and the fundamental way to endow computers with intelligence; its applications span all areas of artificial intelligence. Machine learning and deep learning typically include techniques such as artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and instruction-based learning.

[0036] In related technologies, testing the interaction behavior between terminals and servers typically employs terminal-side simulation testing methods. By comprehensively considering factors such as network type, carrier, and region, this method realistically simulates the user's behavior, analyzes the success rate of interaction between the terminal and server, and then uses the success rate to perform targeted debugging of the application. While this process can closely approximate the user's actual experience through simulated behavior, it is limited by the constraints of the simulation environment. Simulation testing methods are usually relatively simple, and the server-side operation is not fully considered during the interaction behavior testing process. Therefore, it cannot create a coordinated early warning effect with the server, reducing the probability of predicting the success rate of interaction and making it prone to interaction failures.

[0037] This application provides a connection prediction method that avoids the limitations of analyzing a first or second device separately. By comprehensively analyzing both devices, the prediction accuracy of the connection success probability is improved. Applications include at least one of several connection prediction scenarios, such as device detection scenarios and application runtime prediction scenarios. It is worth noting that the above application scenarios are merely illustrative examples, and the connection prediction method provided in this embodiment can also be applied to other scenarios; this application does not limit its application to these scenarios.

[0038] It should be noted that all information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.), and signals involved in this application have been authorized by the user or fully authorized by all parties, and the collection, use, and processing of related data must comply with the relevant laws, regulations, and standards of the relevant regions. For example, the connection detection data, log data, etc. involved in this application were obtained with full authorization.

[0039] Secondly, the implementation environment involved in the embodiments of this application will be described. The task execution method provided in the embodiments of this application is implemented by a first device and a second device through data interaction. Optionally, taking the first device as a terminal and the second device as a business server as an example, the connection prediction method is executed by a data acquisition server that detects data between the terminal and the business server.

[0040] This is illustrative; please refer to it. Figure 1 The first device is implemented as a terminal 110, and the second device is implemented as a business server 120. The terminal 110 and the business server 120 are connected through a communication network 130, and the data acquisition server 140 is used to perform data detection and connection prediction processes on the data interaction process between the terminal 110 and the business server 120.

[0041] In some embodiments, multiple applications are installed on terminal 110. Based on the operation of one of the applications by the user controlling terminal 110, a connection request corresponding to that application is generated and sent to the service server 120 that supports the application. For example, application A is installed on terminal 110. Based on the triggering operation of application A by the user controlling terminal 110, terminal 110 sends the generated connection request corresponding to application A to service server 120.

[0042] Optionally, when terminal 110 sends a connection request to service server 120, a data acquisition server 140, which detects the data interaction process between terminal 110 and service server 120, acquires connection detection data generated by terminal 110 within a first time period, and acquires log data from service server 120 within the first time period. The connection detection data includes connection establishment events of the first device within the first time period, which represent events related to the sending of the connection request within terminal 110, including the detected result data. The log data characterizes the operation of service server 120 within the first time period; for example, service server 120 records various procedural events and generates multiple log data items.

[0043] Optionally, the data acquisition server 140 determines the success rate of the connection request sent by the terminal 110 to the business server 120, and the success rate of the connection request received by the business server 120, based on the connection detection data and log data.

[0044] In some embodiments, the acquisition server 140 fuses the request sending success rate and the request receiving success rate to obtain the request success rate between the terminal 110 and the service server 120; then, the acquisition server 140 uses a pre-trained connection prediction model to predict and analyze the request success rate, obtaining the connection success probability of the terminal 110 and the service server 120 establishing a connection within a second time period. The second time period is after the first time period, and the connection prediction model is a model trained using connection detection data and log data.

[0045] Indicatively, after the data collection server 140 obtains the connection success probability, it sends the connection success probability to the terminal 110, so that the terminal 110 can inform the user whether the terminal 110 and the business server can establish a connection in the second time period after the first time period; or, when the data collection server 140 determines that the connection success probability is less than the probability threshold, it sends a connection warning message to the terminal 110, so that the terminal 110 and the business server may not be able to connect successfully in the second time period after the first time period, etc. The embodiments of this application do not limit this.

[0046] In some embodiments, after receiving a connection request, the service server 120 sends a feedback result to the terminal 110 to indicate that the terminal 110 has successfully sent the connection request to the service server 120; or, if the service server 120 does not receive a connection request within a preset time period, it sends a feedback result to the terminal 110 to indicate that the terminal 110 has not sent or effectively sent a connection request to the service server 120.

[0047] It is worth noting that the aforementioned terminals include, but are not limited to, mobile terminals such as mobile phones, tablets, portable laptops, smart voice interaction devices, smart home appliances, and in-vehicle terminals, as well as desktop computers; the aforementioned servers can be independent physical servers, server clusters or distributed systems composed of multiple physical servers, or cloud servers that provide basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDN), and big data and artificial intelligence platforms.

[0048] Cloud technology refers to a hosting technology that unifies hardware, applications, networks, and other resources within a wide area network (WAN) or local area network (LAN) to achieve data computation, storage, processing, and sharing. Based on the cloud computing business model, cloud technology encompasses network technology, information technology, integration technology, management platform technology, and application technology. It can form resource pools, providing flexible and convenient on-demand access.

[0049] In some embodiments, the server described above can also be implemented as a node in a blockchain system.

[0050] Based on the above introduction to terminology and application scenarios, the connection prediction method provided in this application will be explained, taking the application of this method to a data acquisition server as an example. Figure 2 As shown, the method includes the following steps 210 to 240.

[0051] Step 210: When the first device sends a connection request to the second device, obtain the connection detection data generated by the first device within the first time period, and obtain the log data of the second device within the first time period.

[0052] In illustrative purposes, the first device may be implemented as at least one of a terminal and a server; the second device may also be implemented as at least one of a terminal and a server.

[0053] In some embodiments, the data interaction process between the first device and the second device is detected by a data acquisition server. Illustratively, the first device is implemented as a terminal, and the second device is implemented as a service server communicating with the terminal; the data interaction process between the terminal and the service server is detected by the data acquisition server.

[0054] A connection request is a request sent by the first device to the second device to establish a communication connection. Illustratively, after the communication connection is established, data transmission and other processes can occur between the first and second devices.

[0055] Optionally, the connection request is a request generated by the first device based on the operation of the first device by the user object; or, the connection request is a request automatically generated by the first device after a preset condition is met, etc.

[0056] To illustrate, based on the acquisition server's detection of the first and second devices, the acquisition server can determine the connection request sending process between the first and second devices.

[0057] In some embodiments, when the acquisition server detects that the first device sends a connection request to the second device, the acquisition server obtains the connection detection data generated by the first device within a first time period.

[0058] The connection detection data includes connection establishment events of the first device within a first time period. These connection establishment events represent events related to the sending of connection requests within the first device.

[0059] Optionally, the connection establishment event is an event established through data tracking. The connection detection data is determined based on the location of the data tracking points, which is the corresponding location where the data is generated. Typically, it is implemented as the location related to the connection request being sent.

[0060] Data tracking is a common data collection method. It involves embedding relevant code at corresponding locations where data is generated (e.g., a webpage, an interface) to collect data, and then reporting statistical data through data collection tools to understand the corresponding usage. These corresponding locations where data is generated can be called tracking points. For example, taking a webpage as an example, the corresponding usage data includes at least one of the following: the number of times the webpage is accessed, the number of people accessing the webpage within a certain time period, the dwell time of different users on the webpage, and the number of likes on the webpage.

[0061] Optionally, an application A is installed on the first device. Some interface functions in application A are related to the connection request sending process (e.g., the connection request sending process is realized by triggering control 1 in the interface). That is, it is necessary to acquire data for the interface function in application A, process the interface by data tracking, and collect the corresponding result data as connection detection data when data needs to be acquired.

[0062] As an illustration, when the business server detects that the first device sends a connection request to the second device, the business server obtains the connection detection data within the first time period through the embedded points on the first device.

[0063] The first time period is a certain period of time after the first device sends a connection request to the second device. For example, if the first device sends the connection request to the second device at time 'a', the first time period is the period from time 'a' to time 'b'; or, if the first device sends the connection request to the second device at time 'a', the first time period is the period from time 'a+1' to time 'b'.

[0064] For example, by using data tracking to process control 1 in the interface, the connection request is sent by triggering control 1 at time a, and the number of times and duration of triggering control 1 are obtained after time a as connection detection data, thus realizing the process of obtaining connection detection data in the first time period.

[0065] In some embodiments, when the acquisition server detects that the first device sends a connection request to the second device, the acquisition server will also obtain the log data of the second device in the first time period.

[0066] The log data is used to characterize the operation of the second device during the first time period.

[0067] As an illustration, in addition to detecting the data interaction between the first and second devices, the data acquisition server also detects the operating status of the first and second devices.

[0068] Optionally, the second device generates log data during operation. This log data records almost all of the second device's actions during operation, such as: understanding the account information operating the second device, the operation time, etc. For example, log data can be used for device error correction, performance optimization, feedback on erroneous operations, and determining if the device has been attacked.

[0069] As an illustration, when the first device sends a connection request to the second device, the data collection server will obtain not only the connection detection data generated by the first device within the first time period, but also the log data of the second device within the first time period.

[0070] In some embodiments, the first device is implemented as a single device, or the first device is implemented as multiple devices. Illustratively, the first device is implemented as multiple terminals, each with an application A installed. The second device is implemented as a business server corresponding to application A, used to perform computational tasks related to application A.

[0071] Step 220: Based on the connection detection data and log data, determine the success rate of the first device sending a connection request to the second device, and determine the success rate of the second device receiving the connection request.

[0072] As an illustration, after obtaining connection detection data and log data, the data acquisition server analyzes the success rate of connection requests sent from the first device to the second device.

[0073] Optionally, if the first device is implemented as a single entity, when determining the success rate of the connection request sent by the first device to the second device, the number of connection requests M sent by the first device to the second device is determined based on the connection detection data, and the number of successful connection requests N sent by the first device to the second device is also determined. Therefore, N / M is used as the success rate of the connection request sent by the first device to the second device. For example, the connection detection data includes the number of connection requests M and the number of successful requests N.

[0074] Alternatively, if there are multiple first devices, when determining the success rate of the first device sending a connection request to the second device, the total number of connection requests M sent by the multiple first devices to the second device is determined, as well as the number of successful connection requests N jointly counted by the multiple first devices to the second device, and N / M is used as the success rate of the first device sending a connection request to the second device.

[0075] In some embodiments, the acquisition server determines not only the success rate of the first device sending a connection request to the second device, but also the success rate of the second device receiving the connection request.

[0076] Optionally, if the first device is implemented as one, when determining the success rate of the second device receiving connection requests, the number of connection requests M sent by the first device to the second device is determined, and the number of connection requests successfully received by the second device L is determined, so that L / M is used as the success rate of the second device receiving connection requests.

[0077] Alternatively, if there are multiple first devices, when determining the success rate of the second device receiving connection requests, the number of connection requests M sent by the multiple first devices to the second device is determined, and the number of connection requests L successfully received by the second device from the multiple first devices is determined, so that L / M is used as the success rate of the second device receiving connection requests.

[0078] Step 230: Combine the request sending success rate and the request receiving success rate to obtain the request success rate between the first device and the second device.

[0079] Optionally, the request sending success rate and the request receiving success rate are weighted and summed, and the weighted fusion operation is used as the fusion operation described above, so as to obtain the request success rate between the first device and the second device.

[0080] For illustration, if the preset weight ratio is 7:3 for request sending success rate and request receiving success rate, then when merging the request sending success rate and request receiving success rate, the request sending success rate is multiplied by 0.7, the request receiving success rate is multiplied by 0.3, and the adjusted success rates are added together to obtain the request success rate.

[0081] Optionally, the success rate is obtained by summing the success rate of sending the request and the success rate of receiving the request. If the sum of the success rates is not greater than a preset success rate threshold, the sum of the success rates is used as the request success rate; if the sum of the success rates is greater than the preset success rate threshold, the sum of the preset success rate threshold is used as the request success rate, and so on.

[0082] It is worth noting that the above are merely illustrative examples, and the embodiments of this application are not limited thereto.

[0083] Step 240: The connection success rate is predicted and analyzed using the pre-trained connection prediction model to obtain the connection success probability of the first device and the second device establishing a connection in the second time period.

[0084] The connection prediction model is a model trained using connection detection data and log data, used to predict connection success rates in future time periods based on historical request success rates.

[0085] For illustration, the connection prediction model is trained using a portion of the connection detection data and a portion of the log data in the first time period; or, the connection prediction model is trained using all the connection detection data and all the log data in the first time period, etc.

[0086] Optionally, the connection prediction model is trained using connection detection data and log data within a first time period. Since the connection detection data and log data belong to the first device and the second device respectively, the connection prediction model can effectively predict the data interaction between the first device and the second device.

[0087] To illustrate, after obtaining the request success rate after analyzing the first time period, the connection prediction model is used to analyze the request success rate under the first time period, thereby obtaining the connection success probability of the first device and the second device establishing a connection in the second time period.

[0088] The second time period is after the first time period. That is, when the first device sends a connection request to the second device, the success rate of the request is first determined by the connection detection data and log data obtained in the first time period. Then, the success rate of the request is used to predict and analyze the second time period after the first time period to obtain the probability of successful connection between the first device and the second device in the second time period.

[0089] For example, at time a, the first device sends a connection request to the second device, obtains connection detection data and log data from time a to time a+1, thereby obtaining the request success rate from time a to time a+1, and then uses this request success rate to predict and analyze the connection success probability from time a+1 to time a+2.

[0090] In an optional embodiment, after training a connection prediction model using connection detection data and log data during the first time period, the connection prediction model can not only predict and analyze the request success rate during the first time period, but also predict and analyze the request success rate during time periods after the first time period.

[0091] Indicatively, the trained connectivity prediction model is associated with the first device and the second device. A valid time period is pre-defined, which represents the time period during which the connectivity prediction model is used for predictive analysis. It is usually implemented as the time period after the start time corresponding to the first time period, and the valid time period includes the aforementioned second time period.

[0092] For example, the first time period is from time a to time a+1, and the effective time period is from time a to time a+5. After training a connection prediction model using connection detection data and log data from time a to time a+1, the connection prediction model can predict and analyze the request success rate from time a to time a+1, and also predict and analyze the request success rate from time a+1 to time a+2, etc.; or, the connection prediction model can predict and analyze the request success rate from time a to time a+2, and also predict and analyze the request success rate from time a+1 to time a+4, etc. That is, the division of time periods can be fixed or random.

[0093] It is worth noting that the above are merely illustrative examples, and the embodiments of this application are not limited thereto.

[0094] In summary, when the first device sends a connection request to the second device, the connection detection data generated by the first device within a first time period and the log data of the second device within the same time period are obtained. This allows for the determination of the success rate of the connection request sent by the first device to the second device, and the success rate of the connection request received by the second device. By combining these success rates, the overall success rate of the connection between the first and second devices is obtained. Furthermore, a connection prediction model is used to predict and analyze this success rate, yielding the probability of a successful connection between the first and second devices within the second time period. This approach avoids the limitations of analyzing either the first or second device individually, improving the accuracy of connection success probability prediction through comprehensive analysis of both devices.

[0095] In an optional embodiment, the log data includes multiple log generation timestamps, which indicate the timestamps when different logs were generated. When using a connection prediction model to predict and analyze request success rates to obtain the connection success probability, the connection prediction model analyzes the request success rates under the log generation timestamps to obtain the connection success probability. (Illustrative example, such as...) Figure 3 As shown above, Figure 2 Step 240 shown can also be implemented as steps 310 to 360.

[0096] Step 310: When the first device sends a connection request to the second device, obtain the connection detection data generated by the first device within the first time period, and obtain the log data of the second device within the first time period.

[0097] The connection detection data includes connection establishment events of the first device within a first time period, and log data is used to characterize the operation of the second device within the first time period.

[0098] In an optional embodiment, in addition to sending a connection request to the second device, the first device also sends connection detection data to the acquisition server, which is used to detect the data interaction between the first device, the second device, and the first device and the second device.

[0099] As an illustration, the first device sends connection detection data to the acquisition server at the same time as sending a connection request to the second device; or, the first device sends connection detection data to the acquisition server within a preset time period after sending the connection request to the second device, etc.

[0100] For example: The first device has an application A installed. The software development kit (SDK) corresponding to application A has multiple preset tracking points. Application A in the first device generates and detects connections through the SDK tracking points and sends the connection detection data to the collection server.

[0101] Optionally, the first device may also determine connection detection data based on the connection request generation process before sending a connection request to the second device, and send the connection detection data to the acquisition server.

[0102] For example, application A in the first device has a preset tracking point a. Tracking point a is used to detect the number of times the functional control is triggered. When the number of times the functional control is triggered reaches a preset threshold (e.g., 100 times), the first device automatically generates a connection request and sends it to the second device. Before sending the connection request to the second device, the trigger data collected at tracking point a is sent to the second device as connection detection data, etc.

[0103] In some embodiments, the acquisition server writes connection detection data to a distributed messaging system (Kafka) via a file acquisition component (filebeat).

[0104] In an optional embodiment, in addition to receiving connection detection data sent by the first device, the data acquisition server also receives log data sent by the second device. That is, the second device sends log data to the data acquisition server.

[0105] To illustrate, the data acquisition server obtains the log data (engine x, Nginx logs) sent by the second device and sends the log data to Kafka through the Filebeat component.

[0106] Step 320: Based on the connection detection data and log data, determine the success rate of the first device sending a connection request to the second device, and determine the success rate of the second device receiving the connection request.

[0107] The request sending success rate represents the probability that the first device successfully sends a connection request to the second device; the request receiving success rate represents the probability that the second device successfully receives the connection request sent by the first device.

[0108] In an optional embodiment, based on connection detection data and log data, the number of times the first device successfully sent a connection request to the second device within a first time period is counted, and the number of times the second device successfully received a connection request within the first time period is also counted.

[0109] Optionally, the number of times the first device successfully sent a connection request to the second device within the first time period can be counted based on the connection detection data.

[0110] For illustrative purposes, the connection detection data corresponds to the first device, including the sending status of connection requests from the first device to the second device. The sending status is illustrated by showing the number of times the request was sent, successful sending status, and failed sending status.

[0111] The number of successful request transmissions is data collected by the first device, representing the number of times the first device successfully sent connection requests to the second device. For example, if the first device records 78 successful request transmissions, it means that the first device has successfully sent 78 connection requests to the second device.

[0112] Optionally, the number of times the second device successfully received connection requests within the first time period can be counted based on log data.

[0113] For illustrative purposes, the log data corresponds to the second device, including the reception status of the connection request sent by the first device to the second device. The reception status is illustrated as successful reception, failed reception, etc. For example, if the second device receives a connection request from the first device, it is considered a successful reception; if the second device does not receive a connection request from the first device within a preset time period, it is considered a failed reception, etc.

[0114] The number of successful request receptions is data collected by the second device, indicating the number of times the second device successfully received connection requests sent by the first device. For example, if the second device records 63 successful request receptions, it means that the second device has successfully received 63 connection requests sent by the first device.

[0115] In some embodiments, there may be a difference between the number of successful request transmissions and the number of successful request receptions based on statistical differences between the first device and the second device.

[0116] For illustrative purposes, the number of successfully sent requests counted by the first device is greater than the number of successfully received requests counted by the second device; or, the number of successfully sent requests counted by the first device is less than the number of successfully received requests counted by the second device.

[0117] Optionally, the number of successful request transmissions counted by the first device may be equal to the number of successful request receptions counted by the second device. The above is merely an illustrative example, and the embodiments of this application do not limit this.

[0118] In an optional embodiment, the request sending success rate is determined based on the number of successful request sending, and the request receiving success rate is determined based on the number of successful request receiving.

[0119] For illustrative purposes, after determining the number of times a request was successfully sent, the request sending success rate corresponding to the first device is determined.

[0120] Optionally, based on the connection detection data, the number of times the first device sends a connection request to the second device within the first time period is counted.

[0121] To illustrate, based on connection detection data, the number of connection requests sent from the first device to the second device within the first time period is counted; the ratio of the number of successful request transmissions to the total number of requests sent is taken as the request transmission success rate.

[0122] For example: if based on connection detection data, it is determined that the first device sent 100 connection requests to the second device within the first time period, and 78 of the requests were successfully sent, then the request success rate is 78%.

[0123] For illustrative purposes, the ratio of the number of successful request receptions to the number of request transmissions is used as the request reception success rate.

[0124] For example: if the first device sends 100 connection requests to the second device within the first time period, and the requests are successfully received 63 times, then the request reception success rate is 63%.

[0125] In an optional embodiment, the number of connection request receptions detected by the second device within a first time period is counted based on log data; the quotient of the number of successful request receptions and the total number of request receptions is taken as the total number of request receptions.

[0126] To illustrate, within the first time period, the first device sends connection requests to the second device 100 times, the second device detects connection requests 90 times, and takes 90 as the number of requests received. The number of successful requests received is 63, so the success rate of request reception is 63 / 90.

[0127] It is worth noting that the above are merely illustrative examples, and the embodiments of this application are not limited thereto.

[0128] Step 330: Combine the request sending success rate and the request receiving success rate to obtain the request success rate between the first device and the second device.

[0129] To illustrate, after obtaining the request sending success rate and the request receiving success rate, the two success rates are combined to obtain the overall request success rate. In other words, the request success rate is a probability determined by comprehensively considering the data from both devices.

[0130] In an optional embodiment, the third weight corresponding to the first device and the fourth weight corresponding to the second device are obtained.

[0131] The third weight is used to adjust the success rate of request sending, and the fourth weight is used to adjust the success rate of request receiving.

[0132] For illustrative purposes, the third and fourth weights are pre-set weight values.

[0133] Optionally, the sum of the values ​​of the third and fourth weights is 1. For example, the third weight is implemented as 0.7 and the fourth weight as 0.3; or, the third weight is implemented as 0.8 and the fourth weight as 0.2; or, the third weight is implemented as 0.85 and the fourth weight as 0.15, etc.

[0134] Optionally, the sum of the values ​​of the third and fourth weights is not equal to 1. For example, the third weight is implemented as 0.7 and the fourth weight as 0.2; or, the third weight is implemented as 0.6 and the fourth weight as 0.35, etc.

[0135] In an optional embodiment, the request sending success rate and the request receiving success rate are weighted and summed using a third weight and a fourth weight to obtain the request success rate between the first device and the second device.

[0136] To illustrate, let's take a third weight of 0.7 and a fourth weight of 0.3 as an example.

[0137] Optionally, the request sending success rate can be adjusted using a third weight to obtain the first adjustment result.

[0138] To illustrate, based on the above process, the request transmission success rate corresponding to the first device is determined to be 78%. The first adjustment result is obtained by adjusting the request transmission success rate of 78% with a third weight of 0.7. For example, if the product of the third weight 0.7 and the request transmission success rate of 78% is used as the first adjustment result, then the first adjustment result is 0.546.

[0139] Optionally, the request reception success rate can be adjusted using a fourth weight to obtain a second adjustment result.

[0140] To illustrate, based on the above process, the request reception success rate of the second device is determined to be 63%. The second adjustment result is obtained by adjusting the request reception success rate of 63% with a fourth weight of 0.3. For example, if the product of the fourth weight 0.3 and the request reception success rate of 63% is used as the second adjustment result, then the second adjustment result is 0.189.

[0141] In some embodiments, the first adjustment result and the second adjustment result are summed to obtain the request success rate.

[0142] Indicatively, after obtaining the first adjustment result and the second adjustment result, the sum of the first adjustment result and the second adjustment result is determined, thereby obtaining the request success rate based on the request sending success rate and the request receiving success rate, realizing the weighted fusion process of the request sending success rate and the request receiving success rate.

[0143] For example, the first adjustment result for the first device is 0.546, the second adjustment result for the second device is 0.189, and the success rate of the request after summing the first and second adjustment results is 0.735.

[0144] The request success rate is a comprehensive success rate data that takes into account both the first and second devices, avoiding the limitations of considering only the first or second device, and thus improving the comprehensiveness of the success rate analysis.

[0145] Furthermore, the third and fourth weights represent the proportions of request sending success rate and request receiving success rate in determining the request success rate. If the third weight is greater than the fourth weight, it means that the proportion of request sending success rate is greater than that of request receiving success rate in determining the request success rate, that is, it emphasizes the role of the first device in the request success rate.

[0146] If the fourth weight is greater than the third weight, it means that in the process of determining the success rate of a request, the proportion of the success rate of receiving the request is greater than the proportion of the success rate of sending the request, that is, it emphasizes the role of the second device in the success rate of the request.

[0147] If the third weight is equal to the fourth weight, it means that in the process of determining the success rate of a request, the weight of the success rate of sending the request is the same as the weight of the success rate of receiving the request. That is, the first device and the second device play the same role in the success rate of the request.

[0148] As an illustration, when considering the role of the first device in the request success rate, the third weight is set to be greater than the fourth weight; when considering the role of the second device in the request success rate, the third weight is set to be less than the fourth weight, and so on.

[0149] It is worth noting that the above are merely illustrative examples, and the embodiments of this application are not limited thereto.

[0150] Step 340: Determine the request timestamp corresponding to the request success rate.

[0151] The request timestamp is the time within the first time period.

[0152] For illustrative purposes, after determining the request success rate within the first time period, the start time of the first time period can be used as the request timestamp corresponding to the request success rate; or, the end time of the first time period can be used as the request timestamp corresponding to the request success rate; or, the middle time of the first time period can be used as the request timestamp; or, any time within the first time period can be used as the request timestamp, etc.

[0153] For example: the first time period is the period from time 'a' to time 'a+1', and the success rate of requests in the first time period is 0.735. Time 'a' is used as the request timestamp corresponding to the success rate; or, time 'a+1' is used as the request timestamp corresponding to the success rate; or, time 'a+0.5' is used as the request timestamp corresponding to the success rate; or, time 'a+0.2' is used as the request timestamp corresponding to the success rate, etc.

[0154] In some embodiments, the first time period includes multiple moments, with different moments representing different timestamps.

[0155] Optionally, the first time period is a time period of a certain duration. The first time period can be divided into multiple sub-time periods through a time period division process.

[0156] To illustrate, if the first time period is divided into equal parts, then the multiple sub-time periods within the first time period will have the same duration; if the first time period is divided into random parts, then the multiple sub-time periods within the first time period may have the same duration or may have different durations.

[0157] For example, if the first time period is 1 hour, it can be divided into 60 sub-time periods by dividing it into equal parts of 1 minute each.

[0158] When determining the request success rate, the request success rate for each sub-time period within the first time period is determined. For example, for the first sub-time period among multiple sub-time periods, the request sending success rate and request receiving success rate for that sub-time period are determined. The request sending success rate and request receiving success rate for the first sub-time period are then weighted and combined to obtain the overall request success rate for that sub-time period. Here, the first sub-time period can be any one of the multiple sub-time periods.

[0159] For illustrative purposes, when determining the corresponding request timestamp from the request success rates corresponding to multiple sub-time periods, the start time of the sub-time period can be used as the request timestamp; or, the end time of the sub-time period can be used as the request timestamp; or, the middle time of the sub-time period can be used as the request timestamp; or, any time within the sub-time period can be used as the request timestamp, etc.

[0160] Step 350: Determine the log generation timestamp corresponding to the request timestamp from multiple log generation timestamps as the connection prediction timestamp.

[0161] As an illustration, in addition to determining the request timestamp, the log generation timestamp corresponding to the request timestamp is determined from multiple log generation timestamps. For example, if the request timestamp is determined to be time 'a', and time 'a' is a time within the first time period, then the log generation timestamp corresponding to the request timestamp can be determined from multiple log generation timestamps, and this log generation timestamp can be used as the connection prediction timestamp.

[0162] Step 360: By comprehensively analyzing the connection prediction timestamp and request success rate through the connection prediction model, the connection success probability of the first device and the second device establishing a connection within the second time period is obtained.

[0163] Among them, the connection prediction model is a model pre-trained using connection detection data and log data.

[0164] In an optional embodiment, the connection prediction timestamp and the request success rate are bound together as key-value pairs based on the correspondence between the connection prediction timestamp and the request timestamp to obtain time series features.

[0165] Among them, time series features are used to characterize the request success rate under the connection prediction timestamp.

[0166] To illustrate, when a request success rate is determined based on a first time period, a continuous prediction timestamp is identified within that first time period. This continuous prediction timestamp is then bound to the request success rate in a key-value pair format; that is, the continuous prediction timestamps and the request success rate are stored as a key / value pair. Based on this binding process, a time series feature consisting of a key and a value is determined.

[0167] To illustrate, when the request success rate corresponding to multiple sub-time periods is determined based on the first time period, the continuous prediction timestamps corresponding to the multiple sub-time periods are determined from the first time period. Based on the correspondence between the request success rate and the continuous prediction timestamps, the continuous prediction timestamps and the corresponding request success rates are bound in the form of key / value pairs. Thus, the time series features composed of multiple key-value pairs are determined based on the binding process.

[0168] In an optional embodiment, the time series features are analyzed using a connection prediction model to obtain the probability of a successful connection between the first device and the second device within a second time period.

[0169] In a schematic way, after obtaining the time series features, the time series features are used as input to the connection prediction model. The connection prediction model analyzes the time series features to predict the second time period after the first time period, thereby determining the probability of successful connection between the first device and the second device in the second time period.

[0170] Optionally, when the time series feature includes a key value, the time series feature can analyze the key value using information learned during pre-training to obtain the probability of successful connection; when the time series feature includes multiple key values, in addition to analyzing the multiple key values ​​using information learned during pre-training, the time series feature can also analyze the changes between multiple key values ​​within the first time period to obtain the probability of successful connection, etc.

[0171] In an optional embodiment, the time series features are analyzed by a connection prediction model to obtain a connection success probability of the first device and the second device establishing a connection during a second time period.

[0172] Indicatively, the first time period is the period between time a and time a+1; the second time period is the period between time a+1 and time a+2. By analyzing the time series characteristics through the connection prediction model, the connection success probability corresponding to the second time period between time a+1 and time a+2 is obtained. This connection success probability represents the probability that the first device and the second device will successfully establish a connection within the second time period.

[0173] In an optional embodiment, the time series features are analyzed using a connection prediction model to obtain multiple connection success probabilities between the first device and the second device during a second time period.

[0174] Indicatively, the first time period is from time 'a' to time 'a+1'; the second time period is from time 'a+1' to time 'a+2'. By analyzing the time series characteristics using a connectivity prediction model, multiple connection success probabilities are obtained within the second time period (a+1 to a+2). These probabilities correspond to multiple timestamps (times) within the second time period. For example, the multiple connection success probabilities include connection success probability 1, connection success probability 2, and connection success probability 3. Connection success probability 1 corresponds to time 'a+1.3', connection success probability 2 corresponds to time 'a+1.6', connection success probability 3 corresponds to time 'a+1.9', and so on. These multiple connection success probabilities represent the probability that the first device and the second device successfully establish a connection at their respective times within the second time period.

[0175] It is worth noting that the above are merely illustrative examples, and the embodiments of this application are not limited thereto.

[0176] In summary, by analyzing both the request sending success rate and the request receiving success rate, the request success rate between the first and second devices is obtained. Then, a connection prediction model is used to predict and analyze the request success rate, yielding the probability of a successful connection between the first and second devices within the second time period. This avoids the limitations of analyzing either the first or second device separately; by comprehensively analyzing both devices, the accuracy of predicting the connection success probability is improved.

[0177] In an optional embodiment, a connection prediction model trained using connection detection data and log data is used to more specifically predict the connection status between the first and second devices. (Illustrative example, such as...) Figure 4 As shown, the training process of the above-mentioned connection prediction model can be implemented as follows: steps 410 to 450.

[0178] Step 410: Obtain candidate prediction models.

[0179] The candidate prediction model is used to train the connection prediction model.

[0180] This is illustrative; the candidate prediction model is a pre-built model with certain prediction capabilities. This is also illustrative; a time series prediction (Prophet) model is used as the candidate prediction model.

[0181] Optionally, the candidate prediction model is a decomposable time series model, mainly composed of trend parameters, seasonality parameters, and holiday parameters, and the candidate prediction model is set as a regression model, that is, the candidate prediction model is trained by regression.

[0182] Among them, the trend parameter is a parameter set to prevent the candidate prediction model from overfitting; the seasonal parameter is a parameter used to limit the periodic content (e.g., a period of days); and the holiday parameter is an intervention parameter used to characterize holidays and other set dates.

[0183] Step 420: Determine the first connection detection data and the first log data corresponding to the first sub-time period within the first time period from the connection detection data and log data.

[0184] Here, a sub-time period is obtained by dividing the first time period into multiple sub-time periods. For illustration, dividing the first time period into multiple sub-time periods results in the first sub-time period itself, where the first sub-time period is any one of these sub-time periods.

[0185] To illustrate this, let's take an example and analyze any one of the first sub-time periods within the first time period.

[0186] After obtaining the connection detection data and log data for the first time period, determine the first connection detection data and first log data corresponding to the first sub-time period.

[0187] The first connection detection data is used to characterize the result data obtained from the detection based on the connection request within the first sub-time period; the first log data is used to characterize the operation of the second device within the first sub-time period.

[0188] Step 430: Based on the first connection detection data and the first log data, obtain the first request success rate in the first sub-time period.

[0189] Optionally, the request success rate in the first sub-time period within the first time period can be obtained as the first request success rate, following the method used in steps 220 to 230 above.

[0190] Indicatively, based on the first connection detection data and the first log data, the first request sending success rate of the first device sending a connection request to the second device in the first sub-time period is determined, and the first request receiving success rate of the second device receiving a connection request in the first sub-time period is also determined; the first request sending success rate and the first request receiving success rate are fused to obtain the first request success rate of the first device and the second device in the first sub-time period.

[0191] Step 440: Input the first request success rate into the candidate prediction model to predict the connection prediction success probability corresponding to the second sub-time period within the first time period.

[0192] To illustrate, the success rate of the first request corresponding to the first sub-time period is input into the candidate prediction model. Based on the prediction function of the candidate prediction model itself, the success probability of establishing a connection between the first device and the second device in the second sub-time period is predicted, and the connection prediction success probability corresponding to the second sub-time period is obtained.

[0193] The second sub-time period is located after the first sub-time period in the time dimension. For example, the first time period is the time period from time a to time a+1; the first sub-time period under the first time period is the time period from time a to time a+0.2; the second sub-time period is the time period within the first time period and located after the first sub-time period, such as the time period from time a+0.2 to time a+0.4, etc.

[0194] Step 450: Train the candidate prediction model based on the connection prediction success probability until the connection prediction model is obtained.

[0195] In an optional embodiment, the success probability of the request for the first device and the second device in the second sub-time period is obtained.

[0196] The success probability of a request is used to characterize the probability that the first device and the second device will successfully establish a connection within the second sub-time period.

[0197] In illustrative terms, in addition to predicting the connection success probability corresponding to the second sub-time period, based on the fact that the second sub-time period is a sub-time period within the first time period, the request success probability of the first device and the second device corresponding to the second sub-time period is obtained. This request success probability is the actual determined success probability.

[0198] Optionally, the second connection detection data and the second log data corresponding to the second sub-time period are determined from the connection detection data and the log data; based on the second connection detection data and the second log data, the success probability of the request for the first device and the second device corresponding to the second sub-time period is obtained.

[0199] Indicatively, based on the second connection detection data and the second log data, the request sending sub-success rate of the first device sending a connection request to the second device during the second sub-time period is determined, as well as the request receiving sub-success rate of the second device receiving a connection request during the second sub-time period is determined; the request sending sub-success rate and the request receiving sub-success rate are fused to obtain the request success rate of the first device and the second device during the second sub-time period.

[0200] In an optional embodiment, a probability loss value is determined based on the difference between the probability of a successful request and the probability of a predicted successful connection.

[0201] As an illustration, after obtaining the probability of a successful request and the predicted probability of a successful connection, the difference between the two probabilities is calculated, and this difference is used as the probability loss value. For example, if the obtained probability of a successful request is 0.8 and the predicted probability of a successful connection is 0.67, then the probability loss value is 0.13 (or -0.13); or, if the obtained probability of a successful request is 0.46 and the predicted probability of a successful connection is 0.67, then the probability loss value is -0.21 (or 0.21), and so on.

[0202] In other words, the probability of a successful request may be greater than or less than the probability of a successful connection. The purpose of calculating the probability loss value is to minimize the difference between the probability of a successful connection and the probability of a successful request, so that the predicted probability of a successful connection can be closer to the obtained probability of a successful request.

[0203] In an optional embodiment, the candidate prediction model is trained with a probability loss value until a connection prediction model is obtained.

[0204] To illustrate, after calculating the probability loss value between the probability of successful connection prediction and the probability of successful request, the candidate prediction model is trained using the probability loss value until the model training conditions are met, and then the connection prediction model is obtained.

[0205] Optionally, the model training conditions are implemented as model convergence conditions. For example, in response to the probability loss value no longer changing, the model training conditions are considered met, and the candidate prediction model corresponding to the current probability loss value is used as the connection prediction model; or, in response to the change in the probability loss value being less than a preset change range, the model training conditions are considered met, and the candidate prediction model corresponding to the current probability loss value is used as the connection prediction model, etc.

[0206] It is worth noting that the above are merely illustrative examples, and the embodiments of this application are not limited thereto.

[0207] In summary, by analyzing both the request sending success rate and the request receiving success rate, the request success rate between the first and second devices is obtained. Then, a connection prediction model is used to predict and analyze the request success rate, yielding the probability of a successful connection between the first and second devices within the second time period. This avoids the limitations of analyzing either the first or second device separately; by comprehensively analyzing both devices, the accuracy of predicting the connection success probability is improved.

[0208] In this embodiment, the training of a candidate prediction model to obtain a connection prediction model is described. The candidate prediction model, with certain predictive capabilities, predicts the success rate of a first request corresponding to a first sub-time period within a first time period, thus obtaining the connection prediction success probability for a second sub-time period within the first time period. Since the second sub-time period falls within the first time period, the request success probability under the second sub-time period can be determined. Furthermore, the connection prediction success probability and the request success probability are combined to obtain a probability loss value. This probability loss value can effectively reflect the interaction between the first and second devices in sending and receiving connection requests. Training the candidate prediction model with this probability loss value improves its robustness and enhances its analytical performance for the first and second devices. This allows the trained connection prediction model to more effectively predict the connection status between the first and second devices, improving the accuracy of connection success probability prediction.

[0209] In an optional embodiment, the first device corresponds to multiple first request success probabilities, and the second device corresponds to multiple second request success probabilities. An upper and lower threshold between the first and second devices are determined using these multiple first and second request success probabilities. The upper and lower thresholds are used to limit the warning triggering conditions for connection success probabilities. (Illustrative example, such as...) Figure 5 As shown, the process of obtaining the upper and lower thresholds based on connection detection data and log data can be implemented as follows: steps 510 to 550. Then, the process of conditionally judging the connection success probability based on the upper and lower thresholds can be implemented as follows: step 560.

[0210] Step 510: Divide the first time period into multiple sub-time periods.

[0211] In illustrative terms, the first time period is a time period of a certain duration. It can be divided into multiple sub-time periods through a time period division process.

[0212] Step 520: Obtain the transmission success rate of the first device in multiple sub-time periods, and obtain the reception success rate of the second device in multiple sub-time periods.

[0213] The sending success rate represents the probability that the first device successfully sends a connection request to the second device within a sub-time period; the receiving success rate represents the probability that the second device successfully receives the connection request sent by the first device within a sub-time period.

[0214] As an illustration, the transmission success rate is determined based on connection detection data. For example, the connection detection data may include the transmission success rate; or, the connection detection data may include the number of transmissions and the number of successful transmissions, thereby determining the transmission success rate.

[0215] This is illustrative; the reception success rate is determined based on log data. For example, the log data may include the reception success rate; or, the reception success rate may be determined based on both connection detection data and log data. For example, the connection detection data may include the number of sends, and the log data may include the number of receives, thus determining the reception success rate, etc.

[0216] Optionally, after determining multiple sub-time periods within the first time period, each sub-time period can be used as the object of analysis.

[0217] To illustrate, the success rate of the first device in a given sub-time period is determined based on the number of connection requests sent and the number of successful connection requests sent within that sub-time period. For example, by using the number of successful connection requests sent as the divisor and the number of connection requests sent as the dividend, the success rate of the first device in that sub-time period can be obtained. This results in multiple success rates for the first device in different sub-time periods.

[0218] To illustrate, the reception success rate of the second device within a given sub-time period is determined based on the number of connection requests sent by the first device and the number of connection requests successfully received by the second device. For example, by using the number of successful connection requests received by the second device as the divisor and the number of connection requests sent by the first device as the dividend, the reception success rate of the second device within that sub-time period is obtained. This results in multiple reception success rates for the second device across multiple sub-time periods.

[0219] Step 530: Sort the multiple transmission success rates corresponding to the first device numerically to obtain the first probability sequence.

[0220] To illustrate, after obtaining multiple transmission success rates corresponding to the first device, the multiple transmission success rates are numerically sorted.

[0221] Optionally, the multiple transmission success rates can be numerically sorted in ascending order; or, the multiple transmission success rates can be numerically sorted in descending order. A first probability sequence corresponding to the multiple transmission success rates is obtained based on the numerical sorting.

[0222] Step 540: Sort the multiple reception success rates corresponding to the second device numerically to obtain the second probability sequence.

[0223] To illustrate, after obtaining multiple reception success rates corresponding to the second device, the multiple reception success rates are numerically sorted.

[0224] Optionally, the multiple reception success rates are numerically sorted in ascending order; or, they are numerically sorted in descending order. A second probability sequence corresponding to the multiple reception success rates is obtained based on the numerical sorting.

[0225] Step 550: Determine the upper and lower thresholds of the connection success probability based on the first and second probability sequences.

[0226] Indicatively, the first probability sequence corresponds to the first device, and the second probability sequence corresponds to the second device. Combining the first and second probability sequences yields a threshold upper limit and a threshold lower limit that have more global analytical characteristics.

[0227] Among them, the upper threshold and the lower threshold are used to characterize the triggering conditions for triggering an alert based on the probability of a successful connection. The upper threshold is the upper limit condition for triggering an alert based on the probability of a successful connection, and the lower threshold is the lower limit condition for triggering an alert based on the probability of a successful connection.

[0228] In an optional embodiment, a first transmission success rate at a first quantile and a second transmission success rate at a second quantile in a first probability sequence are determined.

[0229] Quantiles are used to represent points that divide a sequence based on probability. The first quantile and the second quantile are different numbers. The median is the quartile, also known as the half quantile.

[0230] Optionally, the first quantile is a quarter quantile and the second quantile is a third quantile; or, the first quantile is a fifth quantile and the second quantile is a third quantile; or, the first quantile is a half quantile and the second quantile is a second quantile, etc.

[0231] It is worth noting that the values ​​of the first and second quantiles mentioned above are merely illustrative examples, and the embodiments of this application do not limit them.

[0232] In some embodiments, the first quantile is the quarter quantile and the second quantile is the third quantile, as an example for illustration.

[0233] Schematic, the first probability sequence includes multiple transmission success rates arranged in numerical order. The transmission success rate located at the quartile of the first probability sequence is determined and used as the first transmission success rate; the transmission success rate located at the 3 / 4 quartile of the first probability sequence is determined and used as the second transmission success rate.

[0234] For example, if the first probability sequence includes four transmission success rates arranged in numerical order, and the first probability sequence is 0.51, 0.55, 0.67, and 0.78, then the first transmission success rate located at the quarter quantile of the first probability sequence is 0.51, and the second transmission success rate located at the third quarter quantile of the first probability sequence is 0.67.

[0235] Optionally, when there are multiple transmission success rates at the first quantile, any one of them is selected as the first transmission success rate; and / or, when there are multiple transmission success rates at the second quantile, any one of them is selected as the second transmission success rate.

[0236] Alternatively, when there are multiple transmission success rates at the first quantile, the average of these multiple transmission success rates shall be taken as the first transmission success rate; and / or, when there are multiple transmission success rates at the second quantile, the average of these multiple transmission success rates shall be taken as the second transmission success rate.

[0237] In an optional embodiment, a first reception success rate at the first quantile and a second reception success rate at the second quantile are determined in the second probability sequence.

[0238] Here, the first quantile and the second quantile are the quantiles used to divide the first probability sequence. Optionally, the explanation may take the first quantile as the quarter quantile and the second quantile as the third quartile.

[0239] Schematic, the second probability sequence includes multiple reception success rates arranged in numerical order. The reception success rate located at the quartile of the second probability sequence is determined and used as the first reception success rate; the reception success rate located at the 3 / 4 quartile of the second probability sequence is determined and used as the second reception success rate.

[0240] For example, if the second probability sequence includes four transmission success rates arranged in numerical order, and the second probability sequence is 0.44, 0.5, 0.56, and 0.71, then the first transmission success rate located at the quartile of the second probability sequence is 0.44, and the second transmission success rate located at the 3 / 4 quartile of the second probability sequence is 0.56.

[0241] Optionally, when there are multiple reception success rates at the first quantile, any one of them may be selected as the first reception success rate; and / or, when there are multiple reception success rates at the second quantile, any one of them may be selected as the second reception success rate.

[0242] Optionally, when there are multiple reception success rates at the first quantile, the average of the multiple reception success rates is taken as the first reception success rate; and / or, when there are multiple reception success rates at the second quantile, the average of the multiple reception success rates is taken as the second reception success rate.

[0243] It is worth noting that the above-described method of randomly determining the first transmission success rate, the second transmission success rate, the first reception success rate, and the second reception success rate is merely an illustrative example. In application, these methods can be used in any combination of pairs, and this application does not limit them.

[0244] In an optional embodiment, a first upper limit threshold and a first lower limit threshold corresponding to the first probability sequence are obtained based on the first transmission success rate and the second transmission success rate.

[0245] In illustrative terms, after obtaining the first transmission success rate and the second transmission success rate, the first transmission success rate and the second transmission success rate are adjusted with preset parameters to obtain the first upper limit threshold and the first lower limit threshold corresponding to the first probability sequence.

[0246] Optionally, the formula for obtaining the first upper limit threshold is shown in Formula 1 below.

[0247] Formula 1:

[0248] L1 UL =Q3 + (Q3 - Q1) * 1.5

[0249] Among them, L1 UL L1 represents the first upper limit threshold; Q3 represents the first probability sequence; Q1 represents the first transmission success rate; 1.5 represents the preset parameter.

[0250] Optionally, the formula for obtaining the first lower threshold is shown in Formula 2 below.

[0251] Formula 2:

[0252] L1 LL =Q3 - (Q3 - Q1) * 1.5

[0253] Among them, L1 LL This represents the first lower threshold.

[0254] In an optional embodiment, a second upper limit threshold and a second lower limit threshold corresponding to the second probability sequence are obtained based on the first reception success rate and the second reception success rate.

[0255] In illustrative terms, after obtaining the first reception success rate and the second reception success rate, the first reception success rate and the second reception success rate are adjusted with preset parameters to obtain the second upper limit threshold and the second lower limit threshold corresponding to the second probability sequence.

[0256] Optionally, the formula for obtaining the second upper limit threshold is shown in Formula 3 below.

[0257] Formula 3:

[0258] L2 UL =Q3 + (Q3 - Q1) * 1.5

[0259] Among them, L2 UL This indicates the second upper limit threshold.

[0260] Optionally, the formula for obtaining the second lower limit threshold is shown in Formula 4 below.

[0261] Formula 4:

[0262] L2 LL =Q3 - (Q3 - Q1) * 1.5

[0263] Among them, L2 LL This represents the second lower threshold.

[0264] It is worth noting that Formulas 1 to 4 above are merely illustrative examples, and the preset parameter 1.5 is an adjustable parameter. For example, the preset parameter can be adjusted to values ​​such as 1.8 or 0.9 as needed. This application embodiment does not limit this.

[0265] In an optional embodiment, the upper threshold and lower threshold of the connection success probability are determined based on a first upper threshold, a first lower threshold, a second upper threshold, and a second lower threshold.

[0266] Indicatively, after obtaining the first upper limit threshold and the first lower limit threshold corresponding to the first probability sequence, and the second upper limit threshold and the second lower limit threshold corresponding to the second probability sequence, the upper limit threshold of the connection success probability is determined by combining the first upper limit threshold and the second upper limit threshold; the lower limit threshold of the connection success probability is determined by combining the first lower limit threshold and the second lower limit threshold.

[0267] In some embodiments, a first weight and a second weight are obtained.

[0268] The first weight and the second weight are used to determine the upper and lower thresholds for the probability of a successful connection.

[0269] Optionally, the first upper limit threshold is adjusted with a first weight to obtain a first upper limit candidate threshold; the second upper limit threshold is adjusted with a second weight to obtain a second upper limit candidate threshold; and the upper limit threshold is obtained based on the first upper limit candidate threshold and the second upper limit threshold.

[0270] Indicatively, the sum of the first upper limit candidate threshold and the second upper limit threshold is used as the upper limit of the threshold.

[0271] Optionally, the first lower limit threshold is adjusted with a first weight to obtain a first lower limit candidate threshold; the second lower limit threshold is adjusted with a second weight to obtain a second lower limit candidate threshold; and the lower limit is obtained based on the first lower limit candidate threshold and the second lower limit threshold.

[0272] Indicatively, the sum of the first upper limit candidate threshold and the second upper limit threshold is used as the upper limit of the threshold.

[0273] Optionally, an example is given with a first weight of 0.7 and a second weight of 0.3. Using formulas one through four above, the first upper limit threshold is determined as L1. UL The first lower threshold is denoted as L1. LL The second upper limit threshold is represented as L2. UL The second lower threshold is represented as L2. LL .

[0274] The process of obtaining the upper limit of the threshold through the first and second weights is illustrated in Formula 5 below.

[0275] Formula 5:

[0276] L UL =0.7*L1 UL +0.3*L2 UL

[0277] Among them, L UL This is represented as the upper limit of the threshold.

[0278] The process of obtaining the lower limit of the threshold through the first weight and the second weight is illustrated in Formula 6 below.

[0279] Formula Six:

[0280] L LL =0.7*L1 LL +0.3*L2 LL

[0281] Among them, L LL This is represented as the lower limit of the threshold.

[0282] In an optional embodiment, the first weight and the third weight are the same value, and the second weight and the fourth weight are the same value; or, the weight ratio of the first weight and the second weight is the same as the ratio of the third weight and the fourth weight.

[0283] It is worth noting that the above are merely illustrative examples, and the embodiments of this application are not limited thereto.

[0284] In an optional embodiment, the first probability sequence and the second probability sequence are sequences determined based on a first time period. Therefore, the first probability sequence corresponds to the first time period, and the second probability sequence also corresponds to the first time period. The first time period corresponds to the upper threshold and the lower threshold determined by the first probability sequence and the second probability threshold.

[0285] Optionally, based on the correspondence between the first time period and the upper and lower thresholds, the correspondence between the first time period and the upper and lower thresholds is stored in key-value form. For example, if the first time period is implemented as time a to time a+1, the corresponding upper threshold is 0.89, and the corresponding lower threshold is 0.31, then time a to time a+1 is used as the key, and 0.89-0.31 is used as the value for storage.

[0286] Step 560: In response to the connection success probability not being between the upper and lower threshold limits, a connection warning message is generated.

[0287] To illustrate, after predicting the request success rate using a connection prediction model, the connection success probability is obtained. The connection success probability is then compared with the upper and lower thresholds to determine whether the connection success probability for the second time period falls between the upper and lower thresholds.

[0288] Optionally, when the connection success probability is between the upper and lower threshold limits, prediction continues for the time period after the second time period; when the connection success probability is not between the upper and lower threshold limits, a connection warning message is generated.

[0289] Among them, the connection warning message is used to indicate that the connection between the first device and the second device failed during the second time period.

[0290] As an example, the data acquisition server sends the generated connection warning message to the first device to indicate that the first device may fail to send a connection request in the second time period.

[0291] In some embodiments, the predicted success probabilities of multiple connections within a second time period are obtained.

[0292] As an illustration, the second time period is a duration with multiple moments. When obtaining the connection success probability, the connection success probability corresponding to each of the multiple moments is obtained.

[0293] In some embodiments, a connection warning message is generated in response to a preset number of connection success probabilities not falling between the upper and lower threshold limits.

[0294] As an illustration, a connection warning message is generated when the success probability of each of the multiple connection success probabilities is not between the upper and lower limits of the threshold.

[0295] For example, a preset number is set in advance. When the success probability of a preset number of connections is not between the upper and lower thresholds among multiple success probabilities, a connection warning message is generated. When the success probability of a preset number of connections is not between the upper and lower thresholds among multiple success probabilities, prediction is continued for the time period after the second time period.

[0296] By considering a preset number of successful connection probabilities, the system can avoid accidental prediction errors that could lead to incorrect connection warning messages, thus greatly improving the accuracy of connection warning message generation.

[0297] In an optional embodiment, as time progresses, the first time period changes, and correspondingly, the upper and lower thresholds determined based on the first time period may also change. Optionally, based on the changes in the first time period and the changes in the first and second probability sequences within the first time period, the upper and lower thresholds are adjusted in real time, so that the upper and lower thresholds better conform to the communication interaction process between the first and second devices.

[0298] It is worth noting that the above are merely illustrative examples, and the embodiments of this application are not limited thereto.

[0299] In summary, by analyzing both the request sending success rate and the request receiving success rate, the request success rate between the first and second devices is obtained. Then, a connection prediction model is used to predict and analyze the request success rate, yielding the probability of a successful connection between the first and second devices within the second time period. This avoids the limitations of analyzing either the first or second device separately; by comprehensively analyzing both devices, the accuracy of predicting the connection success probability is improved.

[0300] This application describes how to determine the upper and lower threshold limits in real time using a first probability sequence and a second probability sequence corresponding to a first time period. The first probability sequence is obtained by calculating the transmission success rate of the first device in multiple sub-time periods, and the second probability sequence is obtained by calculating the reception success rate of the second device in multiple sub-time periods. The upper and lower threshold limits for the second time period, predicted from the first time period, are then combined by analyzing the numerical order of the first and second probability sequences. This conditional limitation on the connection success probability not only avoids the limitations of fixed thresholds in conventional cases but also avoids the lack of intuitiveness of directly inputting the connection success probability. A more flexible judgment process selectively generates connection warning messages to provide the first device with a more intuitive forecast, improving the warning effect and expanding the application scenarios of the connection prediction method.

[0301] In an optional embodiment, the connection prediction method is referred to as "a real-time early warning method for the performance of large-scale mobile applications." Taking the first device as a terminal and the second device as a business server as an example, the business server communicates with the business (an application) installed on the terminal. A connection prediction method based on terminal-to-business server is proposed. A time-series feature library of timestamps and request success rates between devices is constructed in real time using Spark Streaming. The trend parameters, seasonal parameters, and holiday parameters in the Prophet model are iteratively tuned based on the predicted connection success probability and the actual request success probability to obtain the connection prediction model. Real-time trend prediction is performed using the connection prediction model and compared with the calculated upper and lower thresholds to determine and output connection early warning information.

[0302] Indicative, such as Figure 6 The diagram shown is a schematic of the overall process of the connection prediction method. The connection prediction method can also implement the following stages 610 to 650.

[0303] Phase 610:

[0304] An application (APP) is installed on the terminal. This application can also be called a client. Data tracking is performed in the SDK corresponding to the client. When the terminal sends a connection request to the business server, the terminal sends the connection detection data (application network request data) obtained based on the tracking data to the collection server. The collection server uses the Filebeat component to write the connection detection data to Kafka. At the same time, the Nginx log data of the business server is also sent to Kafka through the Filebeat component.

[0305] Phase 620:

[0306] Spark Streaming is used for cross-topic parallel processing of Kafka data from the terminal and the application server. Specifically, Spark Streaming is used to process connection detection data from the terminal and log data from the application server in parallel across topics.

[0307] In some embodiments, Hypertext Transfer Protocol (HTTP) status codes are used to determine whether the sending and receiving of connection requests were successful. Common HTTP status codes include 200 (indicating a successful request), 301 (indicating that the resource or webpage data has been permanently moved to another Uniform Resource Locator (URL), 404 (indicating that the requested resource or webpage data does not exist), and 500 (indicating an error on the internal server, such as a business server).

[0308] Optionally, the request sending success rate corresponding to the terminal and the request receiving success rate corresponding to the business server are calculated every minute. For illustration, the request success rate is obtained using a terminal:business server ratio of 7:3, that is, by assigning a weight of 0.7 to the request sending success rate corresponding to the terminal and a weight of 0.3 to the request receiving success rate corresponding to the business server.

[0309] In some embodiments, the success rate of requests between the terminal and the server per minute is obtained based on the minute-by-minute segmentation rules.

[0310] As an example, log timestamps are determined based on minute-by-minute division rules, such as using the first moment of each minute as the log timestamp; or, using the last moment of each minute as the log timestamp, etc. The log timestamps and request success rates are stored in a directory (Redis) in key / value pairs for later use. For example, a time-series feature library can be built using log timestamps and request success rates, with each pair of log timestamps and request success rates representing a time-series feature. Optionally, the key expiration time can be set to 7*24 hours.

[0311] Phase 630:

[0312] This example illustrates how data within Kafka (i.e., connection detection data and log data) is written to the Hadoop Distributed File System (HDFS) for distributed storage. Furthermore, a success rate threshold, including an upper and lower limit, is calculated using a data warehouse tool (Hive). Optionally, the success rate threshold calculation using Hive can be implemented offline. For example, after retrieving connection detection data and log data from the previous preset time period each preset time period, and remaining offline during the current preset time period, the upper and lower threshold limits can be obtained using the data from the previous preset time period.

[0313] Optionally, Hive is used to load data into a partitioned table by day and hour. At 00 minutes past each hour, a task to calculate the success rate threshold is initiated. This task reads the connection detection data and log data from the previous hour, extracts the log timestamp to the minute, and calculates the sending success rate for each terminal per minute, using the hour as the first time period and the minute as the sub-time periods within the first time period. This yields the first probability sequence (success rate discrete point sequence) L1. Additionally, the receiving success rate for each service server per minute is calculated, yielding the second probability sequence (success rate discrete point sequence) L2.

[0314] To illustrate, calculate the quartiles Q1 and Q3 of two discrete point sequences, and based on Formulas 1 to 6 above, obtain the upper and lower thresholds (collectively referred to as the success rate thresholds) corresponding to the first time period (hour). Store the hour identifier and the success rate threshold in Redis in key / value format for later use. Optionally, the key expiration time is set to 7*24 hours.

[0315] Phase 640:

[0316] This illustrates the cleaning operations performed on the data generated in stage 620, including zero-padding for default values, removal of illegal values, and other outlier and abnormal value processing operations.

[0317] This example illustrates how the initial Prophet model is set as a candidate prediction model, and the prediction model is set to be logistic regression. Trend parameters are set for the candidate prediction model to prevent overfitting; a seasonal parameter (daily_seasonality) is set, i.e., a daily cycle; and a holiday parameter is set to allow for manual intervention by inputting holiday dates.

[0318] Indicatively, using minutes as the time granularity for prediction, the predicted values ​​within an hourly period following the training date are obtained (connecting the probability of successful prediction). Error analysis is performed on the predicted values ​​by indicating the probability of successful requests to the true values. The model parameters are continuously optimized and adjusted to achieve the minimum prediction error (i.e., prediction error = |(predicted value - true value) / true value|), and the model is iteratively trained to obtain optimal solutions for trend parameters, seasonal parameters, and holiday parameters.

[0319] Phase 650:

[0320] In illustrative terms, the optimal solution for determining the connection prediction model is based on trend parameters, seasonal parameters, and holiday parameters. That is, the prediction model of Prophet is constructed, taking into account the time series dataset generated by the 7*24-hour request success rate and log timestamps in real time during stage 620, and predicting the probability of connection success within the next five minutes with minute as the discrete point granularity.

[0321] Optionally, if the connection success probability within five minutes is continuously outside the upper and lower threshold limits solved in stage 630, a connection warning message is output; otherwise, the threshold is calculated and judged repeatedly.

[0322] In an optional embodiment, the above connection prediction method is applied to the performance detection scenario of an application (APP). Considering that APP performance detection cannot meet the actual needs in a timely manner, the system integrates the corresponding embedded data (connection detection data) on the APP side and the log data corresponding to the business server based on the big data analysis platform to build a time series feature library of application performance. The purpose of application performance anomaly identification and intelligent early warning is achieved through the trained connection prediction model (such as the Prophet time series analysis model).

[0323] It is worth noting that the above are merely illustrative examples, and the embodiments of this application are not limited thereto.

[0324] In summary, by analyzing both the request sending success rate and the request receiving success rate, the request success rate between the first and second devices is obtained. Then, a connection prediction model is used to predict and analyze the request success rate, yielding the probability of a successful connection between the first and second devices within the second time period. This avoids the limitations of analyzing either the first or second device separately; by comprehensively analyzing both devices, the accuracy of predicting the connection success probability is improved.

[0325] In this embodiment, Spark Streaming is used to calculate the request sending success rate of the terminal and the request receiving success rate of the server in real time, solving the timeliness problem of application performance warnings. In addition, Hive offline batch processing is used to calculate the success rate threshold (upper and lower thresholds) and update the thresholds hourly, solving the effectiveness problem of alarm thresholds. Furthermore, the request sending success rate and request receiving success rate are weighted to obtain a time series feature library based on log time and request success rate. The results are input into the connection prediction model, and an alarm strategy is formed based on the predicted connection prediction success rate and success rate threshold, solving the problems of single application performance warning dimensions and inflexible alarm strategies.

[0326] Figure 7 This is a structural block diagram of a connection prediction device provided in an exemplary embodiment of this application, such as... Figure 7 As shown, the device includes the following parts:

[0327] The acquisition module 710 is used to acquire connection detection data generated by the first device within a first time period and log data of the second device within the first time period when the first device sends a connection request to the second device. The connection detection data includes connection establishment events of the first device within the first time period, and the log data is used to characterize the operation of the second device within the first time period.

[0328] The determination module 720 is used to determine, based on the connection detection data and the log data, the request sending success rate of the first device sending the connection request to the second device, and the request receiving success rate of the second device receiving the connection request;

[0329] The fusion module 730 is used to fuse the request sending success rate and the request receiving success rate to obtain the request success rate between the first device and the second device;

[0330] The prediction module 740 is used to predict and analyze the success rate of the request using a pre-trained connection prediction model to obtain the connection success probability of the first device and the second device establishing a connection within a second time period, wherein the second time period is after the first time period, and the connection prediction model is a model trained using the connection detection data and the log data.

[0331] In an optional embodiment, the log data includes multiple log generation timestamps, which are used to indicate the timestamps when different logs were generated;

[0332] The prediction module 740 is further configured to determine the request timestamp corresponding to the request success rate, wherein the request timestamp is a moment within the first time period; determine the log generation timestamp corresponding to the request timestamp from the plurality of log generation timestamps as the connection prediction timestamp; and perform a comprehensive analysis of the connection prediction timestamp and the request success rate through the connection prediction model to obtain the connection success probability of the first device and the second device establishing a connection within the second time period.

[0333] In an optional embodiment, the prediction module 740 is further configured to bind the connection prediction timestamp and the request success rate in the form of key-value pairs based on the correspondence between the connection prediction timestamp and the request timestamp to obtain time series features, wherein the time series features are used to characterize the request success rate under the connection prediction timestamp; and to analyze the time series features through the connection prediction model to obtain the connection success probability of the first device and the second device establishing a connection within the second time period.

[0334] In an optional embodiment, such as Figure 8 As shown, the device further includes:

[0335] Training module 750 is used to acquire candidate prediction models, which are used to train the connection prediction model; determine the first connection detection data and the first log data corresponding to the first sub-time period within the first time period from the connection detection data and the log data; obtain the first request success rate under the first sub-time period based on the first connection detection data and the first log data; input the first request success rate into the candidate prediction model to predict the connection prediction success probability corresponding to the second sub-time period within the first time period, wherein the second sub-time period is located after the first sub-time period in the time dimension; train the candidate prediction model based on the connection prediction success probability until the connection prediction model is obtained.

[0336] In an optional embodiment, the training module 750 is further configured to obtain the request success probabilities of the first device and the second device in the second sub-time period, the request success probabilities being used to characterize the probability of the first device and the second device successfully establishing a connection; determine a probability loss value based on the difference between the request success probabilities and the connection prediction success probabilities; and train the candidate prediction model with the probability loss value until the connection prediction model is obtained.

[0337] In an optional embodiment, such as Figure 8 As shown, the device further includes:

[0338] The threshold determination module 760 is used to divide the first time period into multiple sub-time periods; obtain the transmission success rate of the first device in each of the multiple sub-time periods, and obtain the reception success rate of the second device in each of the multiple sub-time periods, wherein the transmission success rate represents the probability that the first device successfully sends the connection request to the second device within the sub-time period, and the reception success rate represents the probability that the second device successfully receives the connection request sent by the first device within the sub-time period; sort the multiple transmission success rates corresponding to the first device numerically to obtain a first probability sequence; sort the multiple reception success rates corresponding to the second device numerically to obtain a second probability sequence; and determine an upper threshold and a lower threshold for the connection success probability based on the first probability sequence and the second probability sequence, wherein the upper threshold is an upper limit condition for triggering an early warning based on the connection success probability, and the lower threshold is a lower limit condition for triggering an early warning based on the connection success probability.

[0339] In an optional embodiment, the threshold determination module 760 is further configured to: determine a first transmission success rate at a first quantile and a second transmission success rate at a second quantile in the first probability sequence; determine a first reception success rate at the first quantile and a second reception success rate at the second quantile in the second probability sequence; based on the first transmission success rate and the second transmission success rate, obtain a first upper limit threshold and a first lower limit threshold corresponding to the first probability sequence; based on the first reception success rate and the second reception success rate, obtain a second upper limit threshold and a second lower limit threshold corresponding to the second probability sequence; and based on the first upper limit threshold, the first lower limit threshold, the second upper limit threshold, and the second lower limit threshold, determine the upper threshold and the lower threshold of the connection success probability.

[0340] In an optional embodiment, the threshold determination module 760 is further configured to obtain a first weight and a second weight, the first weight and the second weight being used to determine an upper threshold and a lower threshold for the connection success probability; adjust the first upper threshold with the first weight to obtain a first upper threshold candidate; adjust the second upper threshold with the second weight to obtain a second upper threshold candidate; and obtain the upper threshold based on the first upper threshold candidate and the second upper threshold; adjust the first lower threshold with the first weight to obtain a first lower threshold candidate; adjust the second lower threshold with the second weight to obtain a second lower threshold candidate; and obtain the lower threshold based on the first lower threshold candidate and the second lower threshold.

[0341] In an optional embodiment, the prediction module 740 is further configured to generate a connection warning message in response to the connection success probability not being between the upper threshold and the lower threshold, the connection warning message being used to characterize the connection failure between the first device and the second device during the second time period.

[0342] In an optional embodiment, the prediction module 740 is further configured to obtain multiple connection success probabilities predicted during the second time period; and generate the connection warning message in response to a preset number of connection success probabilities not being located between the upper threshold and the lower threshold.

[0343] In summary, by analyzing both the request sending success rate and the request receiving success rate, the request success rate between the first and second devices is obtained. Then, a connection prediction model is used to predict and analyze the request success rate, yielding the probability of a successful connection between the first and second devices within the second time period. This avoids the limitations of analyzing either the first or second device separately; by comprehensively analyzing both devices, the accuracy of predicting the connection success probability is improved.

[0344] It should be noted that the connection prediction device provided in the above embodiments is only an example of the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the connection prediction device and the connection prediction method embodiments provided in the above embodiments belong to the same concept, and the specific implementation process can be found in the method embodiments, which will not be repeated here.

[0345] Figure 9 This illustration shows a schematic diagram of a server provided in an exemplary embodiment of this application. The server 900 includes a Central Processing Unit (CPU) 901, a system memory 904 including Random Access Memory (RAM) 902 and Read Only Memory (ROM) 903, and a system bus 905 connecting the system memory 904 and the CPU 901. The server 900 also includes a mass storage device 906 for storing an operating system 913, application programs 914, and other program modules 915.

[0346] Mass storage device 906 is connected to central processing unit 901 via a mass storage controller (not shown) connected to system bus 905. Mass storage device 906 and its associated computer-readable media provide non-volatile storage for server 900. That is, mass storage device 906 may include computer-readable media (not shown) such as hard disk or compact disc read-only memory (CD-ROM) drives.

[0347] In general, computer-readable media can include computer storage media and communication media. Computer storage media includes volatile and non-volatile, removable and non-removable media implemented using any method or technology for storing information such as computer-readable instructions, data structures, program modules or other data. The system memory 904 and mass storage device 906 described above can be collectively referred to as memory.

[0348] According to various embodiments of this application, server 900 can also be connected to a remote computer on a network, such as the Internet. That is, server 900 can be connected to network 912 via network interface unit 911 connected to system bus 905, or it can also use network interface unit 911 to connect to other types of networks or remote computer systems (not shown).

[0349] The aforementioned memory also includes one or more programs, which are stored in the memory and configured to be executed by the CPU.

[0350] Embodiments of this application also provide a computer device including a processor and a memory, wherein the memory stores at least one instruction, at least one program, code set, or instruction set, and the at least one instruction, at least one program, code set, or instruction set is loaded and executed by the processor to implement the connection prediction method provided in the above-described method embodiments.

[0351] Embodiments of this application also provide a computer-readable storage medium storing at least one instruction, at least one program, code set, or instruction set, wherein the at least one instruction, at least one program, code set, or instruction set is loaded and executed by a processor to implement the connection prediction method provided in the above-described method embodiments.

[0352] Embodiments of this application also provide a computer program product or computer program including computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform any of the connection prediction methods described in the above embodiments.

[0353] The above description is merely an optional embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the protection scope of this application.

Claims

1. A connection prediction method, characterized in that, The method includes: When the first device sends a connection request to the second device, the connection detection data generated by the first device within a first time period is obtained, and the log data of the second device within the first time period is obtained. The connection detection data includes connection establishment events of the first device within the first time period, and the log data is used to characterize the operation of the second device within the first time period. Based on the connection detection data and the log data, the success rate of the first device sending the connection request to the second device is determined, and the success rate of the second device receiving the connection request is determined. The request sending success rate and the request receiving success rate are combined to obtain the request success rate between the first device and the second device; The connection prediction model, obtained through pre-training, is used to predict and analyze the success rate of the request, thereby obtaining the connection success probability of the first device and the second device establishing a connection within a second time period. The second time period is after the first time period, and the connection prediction model is a model trained using the connection detection data and the log data.

2. The method according to claim 1, characterized in that, The log data includes multiple log generation timestamps, which are used to indicate the timestamps when different logs were generated. The connection prediction model, obtained through pre-training, is used to predict and analyze the success rate of the request, obtaining the connection success probability of the first device and the second device establishing a connection within the second time period, including: Determine the request timestamp corresponding to the request success rate, wherein the request timestamp is a moment within the first time period; The log generation timestamp corresponding to the request timestamp is determined from the plurality of log generation timestamps and used as the connection prediction timestamp; By comprehensively analyzing the connection prediction timestamp and the request success rate using the connection prediction model, the connection success probability of the first device and the second device establishing a connection within the second time period is obtained.

3. The method according to claim 2, characterized in that, The step of comprehensively analyzing the connection prediction timestamp and the request success rate through the connection prediction model to obtain the connection success probability of the first device and the second device establishing a connection within the second time period includes: Based on the correspondence between the connection prediction timestamp and the request timestamp, the connection prediction timestamp and the request success rate are bound in the form of key-value pairs to obtain time series features, which are used to characterize the request success rate under the connection prediction timestamp. The connection prediction model is used to analyze the time series features to obtain the connection success probability of the first device and the second device establishing a connection during the second time period.

4. The method according to any one of claims 1 to 3, characterized in that, The method further includes: Obtain candidate prediction models, which are used to train the connection prediction model; The first connection detection data and the first log data corresponding to the first sub-time period within the first time period are determined from the connection detection data and the log data; Based on the first connection detection data and the first log data, the first request success rate in the first sub-time period is obtained; The first request success rate is input into the candidate prediction model to predict the connection prediction success probability corresponding to the second sub-time period within the first time period. The second sub-time period is located after the first sub-time period in the time dimension. The candidate prediction model is trained based on the connection prediction success probability until the connection prediction model is obtained.

5. The method according to claim 4, characterized in that, The step of training the candidate prediction model based on the connection prediction success probability until the connection prediction model is obtained includes: Obtain the request success probability of the first device and the second device in the second sub-time period, wherein the request success probability is used to characterize the probability that the first device and the second device successfully establish a connection; The probability loss value is determined based on the difference between the probability of a successful request and the probability of a predicted successful connection. The candidate prediction model is trained using the probability loss value until the connection prediction model is obtained.

6. The method according to any one of claims 1 to 3, characterized in that, The method further includes: The first time period is divided into multiple sub-time periods; The first device is obtained with a transmission success rate corresponding to each of the multiple sub-time periods, and the second device is obtained with a reception success rate corresponding to each of the multiple sub-time periods. The transmission success rate is used to represent the probability that the first device successfully sends the connection request to the second device within the sub-time period, and the reception success rate is used to represent the probability that the second device successfully receives the connection request sent by the first device within the sub-time period. The first probability sequence is obtained by numerically sorting the multiple transmission success rates corresponding to the first device. The multiple reception success rates corresponding to the second device are numerically sorted to obtain a second probability sequence; Based on the first probability sequence and the second probability sequence, an upper threshold and a lower threshold are determined for the connection success probability. The upper threshold is the upper limit condition for triggering an alert based on the connection success probability, and the lower threshold is the lower limit condition for triggering an alert based on the connection success probability.

7. The method according to claim 6, characterized in that, The step of determining the upper and lower threshold limits for the connection success probability based on the first probability sequence and the second probability sequence includes: Determine the first transmission success rate at the first quantile and the second transmission success rate at the second quantile in the first probability sequence; Determine the first reception success rate at the first quantile and the second reception success rate at the second quantile in the second probability sequence; Based on the first transmission success rate and the second transmission success rate, obtain the first upper limit threshold and the first lower limit threshold corresponding to the first probability sequence; Based on the first reception success rate and the second reception success rate, obtain the second upper limit threshold and the second lower limit threshold corresponding to the second probability sequence; Based on the first upper limit threshold, the first lower limit threshold, the second upper limit threshold, and the second lower limit threshold, the upper limit threshold and the lower limit threshold of the connection success probability are determined.

8. The method according to claim 7, characterized in that, The step of determining the upper threshold and the lower threshold of the connection success probability based on the first upper threshold, the first lower threshold, the second upper threshold, and the second lower threshold includes: Obtain a first weight and a second weight, which are used to determine the upper and lower threshold limits of the connection success probability. The first upper limit threshold is adjusted with the first weight to obtain a first upper limit candidate threshold, and the second upper limit threshold is adjusted with the second weight to obtain a second upper limit candidate threshold. The upper limit threshold is obtained based on the first upper limit candidate threshold and the second upper limit threshold. The first lower limit threshold is adjusted with the first weight to obtain a first lower limit candidate threshold. The second lower limit threshold is adjusted with the second weight to obtain a second lower limit candidate threshold. The lower limit threshold is obtained based on the first lower limit candidate threshold and the second lower limit threshold.

9. The method according to claim 6, characterized in that, After the connection prediction model, obtained through pre-training, predicts and analyzes the success rate of the request to obtain the connection success probability of the first device and the second device establishing a connection within the second time period, the method further includes: In response to the connection success probability not being between the upper and lower threshold limits, a connection warning message is generated, which indicates that the connection between the first device and the second device failed during the second time period.

10. The method according to claim 9, characterized in that, The response to the connection success probability not being between the upper and lower threshold limits generates a connection warning message, including: Obtain the predicted success probabilities of multiple connections within the second time period; In response to a preset number of connection success probabilities not falling between the upper and lower threshold limits, the connection warning message is generated.

11. A connection prediction device, characterized in that, The device includes: The acquisition module is used to acquire connection detection data generated by the first device within a first time period and log data of the second device within the first time period when the first device sends a connection request to the second device. The connection detection data includes connection establishment events of the first device within the first time period, and the log data is used to characterize the operation of the second device within the first time period. The determination module is used to determine, based on the connection detection data and the log data, the request sending success rate of the first device sending the connection request to the second device, and the request receiving success rate of the second device receiving the connection request; The fusion module is used to fuse the request sending success rate and the request receiving success rate to obtain the request success rate between the first device and the second device; The prediction module is used to predict and analyze the success rate of the request using a pre-trained connection prediction model to obtain the connection success probability of the first device and the second device establishing a connection within a second time period, wherein the second time period is after the first time period, and the connection prediction model is a model trained using the connection detection data and the log data.

12. A computer device, characterized in that, The computer device includes a processor and a memory, the memory storing at least one program that is loaded and executed by the processor to implement the connection prediction method as described in any one of claims 1 to 10.

13. A computer-readable storage medium, characterized in that, The storage medium stores at least one program segment, which is loaded and executed by a processor to implement the connection prediction method as described in any one of claims 1 to 10.

14. A computer program product, characterized in that, It includes computer instructions that, when executed by a processor, implement the connection prediction method as described in any one of claims 1 to 10.

Citation Information

Patent Citations

  • Real-time threshold adaptive flow early warning method and device thereof

    CN106411947A

  • Connection relation prediction method and related equipment

    CN114900435A