The invention provides a processing method, device, electronic device and storage medium of network acceleration service, the method includes: creating a test thread through the test code injected into the client, the test thread is used to test the acceleration service used by the client to access the background server, and providing the background service through the test thread and the acceleration service used by the client The speed server located in the same network environment sends the detection packet to make the speed server return the corresponding response packet when receiving the detection packet; determines the network delay information of the acceleration service according to the sending time of the detection packet and the return time of the response packet; determines the network packet loss rate of the acceleration service according to the sending number of the detection packet and the receiving number of the response packet; and determines the network packet loss rate of the acceleration service according to the acceleration service At least one of the network delay information and the network packet loss rate determines the performance of the acceleration service. The invention can accurately measure the acceleration performance of different acceleration services to the client access background server.
【技术实现步骤摘要】
网络加速服务的处理方法及装置
本专利技术涉及通信和区块链技术,尤其涉及一种网络加速服务的处理方法、装置、电子设备及存储介质。
技术介绍
人工智能(AI,ArtificialIntelligence)是利用数字计算机或者数字计算机控制的机器模拟、延伸和扩展人的智能,感知环境、获取知识并使用知识获得最佳结果的理论、方法和技术及应用系统。换句话说,人工智能是计算机科学的一个综合技术,它企图了解智能的实质,并生产出一种新的能以人类智能相似的方式做出反应的智能机器。人工智能也就是研究各种智能机器的设计原理与实现方法,使机器具有感知、推理与决策的功能。随着网络信息化的不断加快,人工智能用于提升网络用户的体验已成为重要应用领域。由于网络中客户端与后台服务器之间的路由路径的稳定性(例如路由器隔离或路由器故障),导致客户端与服务器(特别是跨地域(例如跨国)服务器)的数据传输出现不稳定(例如速度太低或中断)的情况。因此客户端会通过加速服务来访问后台服务器,以获得理想的访问速度。相关技术中无法准确衡量不同加速服务对客户端访问后台服务器进行加速的性能,进而导致无法对客户端使用的加速服务进行智能化管理。
技术实现思路
本专利技术实施例提供一种网络加速服务的处理方法、装置、电子设备及存储介质,能够准确衡量不同加速服务对客户端访问后台服务器进行加速的性能。本专利技术实施例的技术方案是这样实现的:本专利技术实施例提供一种网络加速服务的处理方法,包括:通过在客户端中注入的测试代码,在所述客户端中创建测试线程 ...
【技术保护点】
1.一种网络加速服务的处理方法,其特征在于,所述方法包括:/n通过在客户端中注入的测试代码,在所述客户端中创建测试线程,所述测试线程用于测试所述客户端访问后台服务器所使用的加速服务;/n通过所述测试线程、并经由所述客户端所使用的加速服务,向与所述后台服务器位于相同网络环境的测速服务器发送探测包,以使/n所述测速服务器在接收到所述探测包时返回对应的应答包;/n根据所述探测包发送时间和所述应答包返回时间,确定所述加速服务的网络延迟信息;/n根据所述探测包的发送数量和所述应答包的接收数量,确定所述加速服务的网络丢包率;/n根据所述加速服务的网络延迟信息和网络丢包率至少之一确定所述加速服务的性能。/n
【技术特征摘要】
1.一种网络加速服务的处理方法,其特征在于,所述方法包括:
通过在客户端中注入的测试代码,在所述客户端中创建测试线程,所述测试线程用于测试所述客户端访问后台服务器所使用的加速服务;
通过所述测试线程、并经由所述客户端所使用的加速服务,向与所述后台服务器位于相同网络环境的测速服务器发送探测包,以使
所述测速服务器在接收到所述探测包时返回对应的应答包;
根据所述探测包发送时间和所述应答包返回时间,确定所述加速服务的网络延迟信息;
根据所述探测包的发送数量和所述应答包的接收数量,确定所述加速服务的网络丢包率;
根据所述加速服务的网络延迟信息和网络丢包率至少之一确定所述加速服务的性能。
2.根据权利要求1所述的方法,其特征在于,所述通过在客户端中注入的测试代码,在所述客户端中创建测试线程,包括:
在所述客户端的主进程中注入包括测试代码的消息钩子,以使
所述消息钩子中的测试代码被所述主进程执行时,创建所述位于所述客户端中的所述测试线程。
3.根据权利要求1所述的方法,其特征在于,所述向与所述后台服务器位于相同网络环境的测速服务器发送探测包,包括:
通过读取所述客户端中的共享内存,获取所述后台服务器所处的区域的信息,并获取相同区域的测速服务器的网络地址和端口;
其中,所述后台服务器与所述测速服务器处于所述相同区域的同一服务器机房,或处于所述相同区域的相同网络配置的不同服务器机房;
以所述测速服务器的网络地址为目的地址,以所述测速服务器的端口为目的端口封装探测包,并通过网络接口发送所述探测包。
4.根据权利要求3所述的方法,其特征在于,所述以所述测速服务器的网络地址为目的地址,以所述测速服务器的端口为目的端口封装探测包,包括:
在基于用户数据报协议的封装结构的头部中,将所述测速服务器的网络地址填充为目的地址,并将所述测速服务器的端口填充为目的端口;
基于所述封装结构生成探测包;
所述通过网络接口发送所述探测包,包括:
通过网络接口以固定频率发送多个的所述探测包。
5.根据权利要求1所述的方法,其特征在于,所述方法还包括:
基于私有的所述用户数据报协议的封装结构,在所述封装结构中生成仅能被所述测试服务器识别的...
【专利技术属性】
技术研发人员:张雄,
申请(专利权)人:腾讯科技深圳有限公司,
类型:发明
国别省市:广东;44
还没有人留言评论。发表了对其他浏览者有用的留言会获得科技券。