[go: up one dir, main page]

CN111343326A - Method and related device for acquiring test log - Google Patents

Method and related device for acquiring test log Download PDF

Info

Publication number
CN111343326A
CN111343326A CN202010323417.7A CN202010323417A CN111343326A CN 111343326 A CN111343326 A CN 111343326A CN 202010323417 A CN202010323417 A CN 202010323417A CN 111343326 A CN111343326 A CN 111343326A
Authority
CN
China
Prior art keywords
electronic device
log
transmission link
wireless transmission
test
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202010323417.7A
Other languages
Chinese (zh)
Inventor
彭冬炜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202010323417.7A priority Critical patent/CN111343326A/en
Publication of CN111343326A publication Critical patent/CN111343326A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/24Arrangements for testing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Telephone Function (AREA)

Abstract

本申请实施例公开了一种获取测试日志的方法及相关装置,应用第一电子设备,第一电子设备为搭载有安卓操作系统的电子设备,第一电子设备设置有第一服务,方法包括:根据第一服务与第二电子设备建立无线传输链路;通过无线传输链路接收第二电子设备发送的日志配置信息;根据日志配置信息执行目标测试任务,得到测试日志;通过无线传输链路向第二电子设备发送测试日志。可见,实施本申请实施例有利于提升针对电子设备的测试效率。

Figure 202010323417

The embodiment of the present application discloses a method for obtaining a test log and a related device, using a first electronic device, the first electronic device is an electronic device equipped with an Android operating system, the first electronic device is provided with a first service, and the method includes: establishing a wireless transmission link with a second electronic device according to the first service; receiving log configuration information sent by the second electronic device through the wireless transmission link; executing a target test task according to the log configuration information to obtain a test log; and sending the test log to the second electronic device through the wireless transmission link. It can be seen that the implementation of the embodiment of the present application is conducive to improving the test efficiency for electronic devices.

Figure 202010323417

Description

获取测试日志的方法及相关装置Method and related device for obtaining test log

技术领域technical field

本申请涉及电子技术领域,具体涉及一种获取测试日志的方法及相关装置。The present application relates to the field of electronic technologies, and in particular, to a method for acquiring a test log and a related device.

背景技术Background technique

目前,电子设备在研发和调试过程中,可能需要同时使用多台电子设备进行测试;测试过程中需要针对多台电子设备执行配置日志,抓取日志等操作。当前需要测试人员使用每一台电子设备进行测试,测试完成后,测试人员将多台电子设备通过数据线与用于处理数据的目标电子设备连接,并将多台电子设备的数据导出至目标电子设备,之后目标电子设备针对多台电子设备的数据进行处理和分析;整个过程冗杂繁琐,使得整个测试过程效率低下。At present, in the process of R&D and debugging of electronic devices, it may be necessary to use multiple electronic devices for testing at the same time; during the testing process, operations such as configuring logs and capturing logs need to be performed for multiple electronic devices. At present, testers are required to use each electronic device for testing. After the test is completed, the tester connects multiple electronic devices to the target electronic device for processing data through data lines, and exports the data of multiple electronic devices to the target electronic device. After that, the target electronic device processes and analyzes the data of multiple electronic devices; the whole process is complicated and cumbersome, which makes the whole testing process inefficient.

发明内容SUMMARY OF THE INVENTION

本申请实施例提供了一种获取测试日志的方法及相关装置,有利于提升针对电子设备的测试效率。Embodiments of the present application provide a method and a related apparatus for acquiring a test log, which are beneficial to improve the test efficiency for electronic equipment.

第一方面,本申请实施例提供一种获取测试日志的方法,应用第一电子设备,所述第一电子设备为搭载有安卓操作系统的电子设备,所述第一电子设备设置有第一服务,所述方法包括:In a first aspect, an embodiment of the present application provides a method for acquiring a test log, which applies a first electronic device, where the first electronic device is an electronic device equipped with an Android operating system, and the first electronic device is provided with a first service , the method includes:

根据所述第一服务与第二电子设备建立无线传输链路;establishing a wireless transmission link with a second electronic device according to the first service;

通过所述无线传输链路接收所述第二电子设备发送的日志配置信息;receiving log configuration information sent by the second electronic device through the wireless transmission link;

根据所述日志配置信息执行目标测试任务,得到测试日志;Execute the target test task according to the log configuration information to obtain a test log;

通过所述无线传输链路向所述第二电子设备发送所述测试日志。The test log is sent to the second electronic device over the wireless transmission link.

第二方面,本申请实施例提供一种获取测试日志的方法,应用第二电子设备,所述方法包括:In a second aspect, an embodiment of the present application provides a method for acquiring a test log, using a second electronic device, and the method includes:

根据第一电子设备的第一服务与所述第一电子设备建立无线传输链路;establishing a wireless transmission link with the first electronic device according to the first service of the first electronic device;

通过所述无线传输链路向所述第一电子设备发送日志配置信息,所述日志配置信息用于所述第一电子设备根据所述日志配置信息执行目标测试任务,以得到测试日志;Send log configuration information to the first electronic device through the wireless transmission link, where the log configuration information is used by the first electronic device to perform a target test task according to the log configuration information to obtain a test log;

通过所述无线传输链路接收所述第一电子设备发送的所述测试日志。The test log sent by the first electronic device is received through the wireless transmission link.

第三方面,本申请实施例提供一种获取测试日志的装置,应用于第一电子设备,所述第一电子设备为搭载有安卓操作系统的电子设备,所述第一电子设备设置有第一服务,所述获取测试日志的装置包括处理单元和通信单元,其中,In a third aspect, an embodiment of the present application provides a device for acquiring a test log, which is applied to a first electronic device, where the first electronic device is an electronic device equipped with an Android operating system, and the first electronic device is provided with a first electronic device. service, the device for acquiring the test log includes a processing unit and a communication unit, wherein,

所述处理单元,用于根据所述第一服务与第二电子设备建立无线传输链路;the processing unit, configured to establish a wireless transmission link with the second electronic device according to the first service;

所述通信单元,用于通过所述无线传输链路接收所述第二电子设备发送的日志配置信息;the communication unit, configured to receive log configuration information sent by the second electronic device through the wireless transmission link;

所述处理单元,还用于根据所述日志配置信息执行目标测试任务,得到测试日志;The processing unit is further configured to execute the target test task according to the log configuration information to obtain a test log;

所述通信单元,还用于通过所述无线传输链路向所述第二电子设备发送所述测试日志。The communication unit is further configured to send the test log to the second electronic device through the wireless transmission link.

第四方面,本申请实施例提供一种电子设备,包括控制器、存储器、通信接口以及一个或多个程序,其中,上述一个或多个程序被存储在上述存储器中,并且被配置由上述控制器执行,上述程序包括用于执行本申请实施例第一方面或第二方面任一方法中的步骤的指令。In a fourth aspect, an embodiment of the present application provides an electronic device, including a controller, a memory, a communication interface, and one or more programs, wherein the one or more programs are stored in the memory, and are configured to be controlled by the above The above program includes instructions for executing steps in any method of the first aspect or the second aspect of the embodiments of the present application.

第五方面,本申请实施例提供了一种计算机可读存储介质,其中,上述计算机可读存储介质存储用于电子数据交换的计算机程序,其中,上述计算机程序使得计算机执行如本申请实施例第一方面或第二方面任一方法中所描述的部分或全部步骤。In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program for electronic data exchange, wherein the computer program enables a computer to execute the computer program as described in the first embodiment of the present application. Some or all of the steps described in any of the methods of the one or second aspect.

第六方面,本申请实施例提供了一种计算机程序产品,其中,上述计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,上述计算机程序可操作来使计算机执行如本申请实施例第一方面或第二方面任一方法中所描述的部分或全部步骤。该计算机程序产品可以为一个软件安装包。In a sixth aspect, an embodiment of the present application provides a computer program product, wherein the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute as implemented in the present application. Examples include some or all of the steps described in any of the methods of the first aspect or the second aspect. The computer program product may be a software installation package.

可以看出,本申请实施例中,首先,第一电子设备根据所述第一服务与第二电子设备建立无线传输链路;其次,通过所述无线传输链路接收所述第二电子设备发送的日志配置信息;其次,根据所述日志配置信息执行目标测试任务,得到测试日志;最后,通过所述无线传输链路向所述第二电子设备发送所述测试日志。可见,本申请实施例中第一电子设备可以与第二电子设备建立无线传输链路,进而使得整个测试过程中的数据信息可以通过无线传输链路进行传输,提升了测试过程中信息传输的便捷性;同时,第一电子设备可根据第二电子设备的发送的日志配置信息完成整个测试过程,并将生成的测试日志返回给第二电子设备,无需人为操控第一电子设备完成整个测试过程,提升了整个测试过程的自动化程度,提升了针对电子设备进行测试的效率。It can be seen that, in the embodiment of the present application, firstly, the first electronic device establishes a wireless transmission link with the second electronic device according to the first service; the log configuration information; secondly, the target test task is performed according to the log configuration information to obtain a test log; finally, the test log is sent to the second electronic device through the wireless transmission link. It can be seen that in the embodiment of the present application, the first electronic device can establish a wireless transmission link with the second electronic device, so that the data information in the whole testing process can be transmitted through the wireless transmission link, which improves the convenience of information transmission during the testing process At the same time, the first electronic device can complete the entire test process according to the log configuration information sent by the second electronic device, and return the generated test log to the second electronic device, without manipulating the first electronic device to complete the entire test process, It improves the automation of the entire testing process and improves the efficiency of testing electronic equipment.

附图说明Description of drawings

为了更清楚地说明本申请实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the accompanying drawings required for the description of the embodiments or the prior art. Obviously, the drawings in the following description are only These are some embodiments of the present application. For those of ordinary skill in the art, other drawings can also be obtained based on these drawings without any creative effort.

图1A是本申请实施例提供的一种系统架构的示意图;1A is a schematic diagram of a system architecture provided by an embodiment of the present application;

图1B是一个示例性实施例提供的电子设备100的结构方框图;FIG. 1B is a structural block diagram of an electronic device 100 provided by an exemplary embodiment;

图1C是本申请实施例提供的一种设置有Android系统的软硬件系统的架构示意图;1C is a schematic diagram of the architecture of a software and hardware system provided with an Android system provided by an embodiment of the present application;

图1D是本申请实施例提供的一种目前常见的电子设备形态进行详细说明;FIG. 1D is a detailed description of a currently common electronic device form provided by an embodiment of the present application;

图2是本申请实施例提供的一种获取测试日志的方法的流程示意图;2 is a schematic flowchart of a method for obtaining a test log provided by an embodiment of the present application;

图3是本申请实施例提供的一种获取测试日志的方法的交互示意图;3 is an interactive schematic diagram of a method for acquiring a test log provided by an embodiment of the present application;

图4本申请实施例提供的一种获取测试日志的装置的一种可能的结构示意图;4 is a schematic structural diagram of a possible structure of an apparatus for acquiring a test log provided by an embodiment of the present application;

图5本申请实施例提供的一种获取测试日志的装置的另一种可能的结构示意图。FIG. 5 is another possible schematic structural diagram of an apparatus for acquiring a test log provided by an embodiment of the present application.

具体实施方式Detailed ways

为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。In order to make those skilled in the art better understand the solutions of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only It is a part of the embodiments of the present application, but not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the protection scope of the present application.

本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别不同对象,而不是用于描述特定顺序。此外,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其他步骤或单元。The terms "first", "second" and the like in the description and claims of the present application and the above drawings are used to distinguish different objects, rather than to describe a specific order. Furthermore, the terms "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device comprising a series of steps or units is not limited to the listed steps or units, but optionally also includes unlisted steps or units, or optionally also includes For other steps or units inherent to these processes, methods, products or devices.

在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本申请的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。Reference herein to an "embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the present application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor a separate or alternative embodiment that is mutually exclusive of other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

下面对本申请实施例进行详细介绍。The embodiments of the present application will be described in detail below.

请参阅图1A,请参阅图1A,图1A是本申请实施例提供的一种系统架构的示意图,其中包括至少一个第一电子设备101和第二电子设备102;其中,第二电子设备102与至少一个第一电子设备101可建立无线通信连接,第二电子设备102可通过无线通信连接实现针对至少一个第一电子设备101的控制;在具体测试场景中,第二电子设备102可通过无线通信连接向至少一个第一电子设备101发送日志配置信息;使得至少一个第一电子设备101可根据日志配置信息执行目标测试任务,生成测试日志;之后至少一个第一电子设备101通过无线通信连接将测试日志发送给第二电子设备102,第二电子设备可根据至少一个第一电子设备101生成的测试日志进行分析处理,得到测试结果。可以看出,第二电子设备102可通过无线通信连接实现针对至少一个第一电子设备的控制,即测试人员可通过第二电子设备实现针对至少一个第一电子设备101的控制,进而实现整个测试过程的自动化,生成每个第一电子设备的测试日志,提升了针对电子设备进行测试的效率。具体的,至少一个第一电子设备101是搭载并运行安卓操作系统的电子设备;至少一个第一电子设备101通过安卓调试桥(Android Debug Bridge,ADB)服务与第二电子设备102建立无线通信连接。Please refer to FIG. 1A, please refer to FIG. 1A, FIG. 1A is a schematic diagram of a system architecture provided by an embodiment of the present application, which includes at least one first electronic device 101 and a second electronic device 102; wherein, the second electronic device 102 and the At least one first electronic device 101 can establish a wireless communication connection, and the second electronic device 102 can realize control of at least one first electronic device 101 through the wireless communication connection; in a specific test scenario, the second electronic device 102 can communicate through wireless communication The connection sends log configuration information to at least one first electronic device 101; so that at least one first electronic device 101 can perform a target test task according to the log configuration information, and generate a test log; then at least one first electronic device 101 connects the test log through wireless communication. The log is sent to the second electronic device 102, and the second electronic device can perform analysis and processing according to the test log generated by at least one first electronic device 101 to obtain a test result. It can be seen that the second electronic device 102 can realize the control of at least one first electronic device through the wireless communication connection, that is, the tester can realize the control of at least one first electronic device 101 through the second electronic device, thereby realizing the whole test The automation of the process generates a test log of each first electronic device, which improves the efficiency of testing the electronic device. Specifically, at least one first electronic device 101 is an electronic device that carries and runs an Android operating system; at least one first electronic device 101 establishes a wireless communication connection with the second electronic device 102 through an Android Debug Bridge (Android Debug Bridge, ADB) service .

具体的,第一电子设备101和第二电子设备102的结构示例请参考图1B,其示出了本申请一个示例性实施例提供的电子设备100的结构方框图。该电子设备100可以是具备通信能力的电子设备,该电子设备可以包括各种具有无线通信功能的手持设备、车载设备、可穿戴设备、计算设备或连接到无线调制解调器的其他处理设备,以及各种形式的用户设备(User Equipment,UE),移动台(Mobile Station,MS),终端设备(terminal device)等等。本申请中的电子设备100可以包括一个或多个如下部件:处理器110、存储器120和输入输出装置130。Specifically, please refer to FIG. 1B for a structural example of the first electronic device 101 and the second electronic device 102 , which shows a structural block diagram of the electronic device 100 provided by an exemplary embodiment of the present application. The electronic device 100 may be an electronic device with communication capabilities, and the electronic device may include various handheld devices, vehicle-mounted devices, wearable devices, computing devices, or other processing devices connected to a wireless modem with wireless communication capabilities, as well as various In the form of user equipment (User Equipment, UE), mobile station (Mobile Station, MS), terminal device (terminal device) and so on. The electronic device 100 in this application may include one or more of the following components: a processor 110 , a memory 120 and an input-output device 130 .

处理器110可以包括一个或者多个处理核心。处理器110利用各种接口和线路连接整个电子设备100内的各个部分,通过运行或执行存储在存储器120内的指令、程序、代码集或指令集,以及调用存储在存储器120内的数据,执行电子设备100的各种功能和处理数据。处理器110可以包括一个或多个处理单元,例如:处理器110可以包括中央处理器(CentralProcessing Unit,CPU)、应用处理器(application processor,AP)、调制解调处理器、图形处理器(graphics processing unit,GPU)、图像信号处理器(image signal processor,ISP)、控制器、视频编解码器、数字信号处理器(digital signal processor,DSP)、基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,控制器可以是电子设备100的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。CPU主要处理操作系统、用户界面和应用程序等;GPU用于负责显示内容的渲染和绘制;调制解调器用于处理无线通信。数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当电子设备100在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。视频编解码器用于对数字视频压缩或解压缩。电子设备100可以支持一种或多种视频编解码器。这样,电子设备100可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving pictureexperts group,MPEG)1,MPEG2,MPEG3,MPEG4等。NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现电子设备100的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理解等。The processor 110 may include one or more processing cores. The processor 110 uses various interfaces and lines to connect various parts of the entire electronic device 100, and executes by running or executing the instructions, programs, code sets or instruction sets stored in the memory 120, and calling the data stored in the memory 120. Various functions of the electronic device 100 and processing data. The processor 110 may include one or more processing units, for example, the processor 110 may include a central processing unit (Central Processing Unit, CPU), an application processor (application processor, AP), a modem processor, a graphics processor (graphics processor) processing unit (GPU), image signal processor (ISP), controller, video codec, digital signal processor (DSP), baseband processor, and/or neural network processor ( neural-network processing unit, NPU), etc. The controller may be the nerve center and command center of the electronic device 100 . The controller can generate an operation control signal according to the instruction operation code and timing signal, and complete the control of fetching and executing instructions. The CPU mainly handles the operating system, user interface and applications; the GPU is responsible for rendering and drawing the display content; the modem is used to handle wireless communication. A digital signal processor is used to process digital signals, in addition to processing digital image signals, it can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy and so on. Video codecs are used to compress or decompress digital video. The electronic device 100 may support one or more video codecs. In this way, the electronic device 100 can play or record videos in various encoding formats, such as: Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4 and so on. The NPU is a neural-network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transfer mode between neurons in the human brain, it can quickly process the input information, and can continuously learn by itself. Applications such as intelligent cognition of the electronic device 100 can be implemented through the NPU, such as image recognition, face recognition, speech recognition, text understanding, and the like.

处理器110中可以设置存储器,用于存储指令和数据。在一些实施例中,处理器110中的存储器为高速缓冲存储器。该存储器可以保存处理器110刚用过或循环使用的指令或数据。如果处理器110需要再次使用该指令或数据,可从所述存储器中直接调用。避免重复存取,减少处理器110的等待时间,提高系统效率。A memory may be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in processor 110 is cache memory. This memory may hold instructions or data that have just been used or recycled by the processor 110 . If the processor 110 needs to use the instruction or data again, it can be called directly from the memory. Repeated access is avoided, the waiting time of the processor 110 is reduced, and the system efficiency is improved.

处理器110可以包括一个或多个接口,例如集成电路(inter-integratedcircuit,I2C)接口,集成电路内置音频(inter-integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universalasynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobileindustry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,用户标识模块(subscriber identity module,SIM)接口,和/或通用串行总线(universal serial bus,USB)接口等。The processor 110 may include one or more interfaces, such as an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, Universal asynchronous receiver/transmitter (UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, subscriber identity module (subscriber identity module) , SIM) interface, and/or universal serial bus (universal serial bus, USB) interface, etc.

I2C接口是一种双向同步串行总线,包括一根串行数据线(serial data line,SDA)和一根串行时钟线(derail clock line,SCL)。处理器110可以包含多组I2C接口,通过不同的I2C接口可以分别耦合触摸传感器,充电器,闪光灯,摄像头等。例如:处理器110可以通过I2C接口耦合触摸传感器,使处理器110与触摸传感器通过I2C接口通信,实现电子设备100的触摸功能。The I2C interface is a bidirectional synchronous serial bus that includes a serial data line (SDA) and a serial clock line (SCL). The processor 110 may include multiple groups of I2C interfaces, and touch sensors, chargers, flashes, cameras, etc. may be respectively coupled through different I2C interfaces. For example, the processor 110 can couple the touch sensor through the I2C interface, so that the processor 110 communicates with the touch sensor through the I2C interface, so as to realize the touch function of the electronic device 100 .

I2S接口可以用于音频通信。处理器110可以包含多组I2S接口,通过I2S接口与音频模块耦合,实现处理器110与音频模块之间的通信。音频模块可以通过I2S接口向无线通信模块传递音频信号,实现通过蓝牙耳机接听电话的功能。The I2S interface can be used for audio communication. The processor 110 may include multiple sets of I2S interfaces, and is coupled with the audio module through the I2S interface to implement communication between the processor 110 and the audio module. The audio module can transmit audio signals to the wireless communication module through the I2S interface, so as to realize the function of answering calls through the Bluetooth headset.

PCM接口也可以用于音频通信,将模拟信号抽样,量化和编码。音频模块与无线通信模块可以通过PCM接口耦合,具体可以通过PCM接口向无线通信模块传递音频信号,实现通过蓝牙耳机接听电话的功能。所述I2S接口和所述PCM接口都可以用于音频通信。The PCM interface can also be used for audio communications, sampling, quantizing and encoding analog signals. The audio module and the wireless communication module can be coupled through the PCM interface, and specifically, the audio signal can be transmitted to the wireless communication module through the PCM interface, so as to realize the function of answering calls through the Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.

UART接口是一种通用串行数据总线,用于异步通信。该总线可以为双向通信总线。它将要传输的数据在串行通信与并行通信之间转换。UART接口通常被用于连接处理器110与无线通信模块。例如:处理器110通过UART接口与无线通信模块中的蓝牙模块通信,实现蓝牙功能。音频模块可以通过UART接口向无线通信模块传递音频信号,实现通过蓝牙耳机播放音乐的功能。The UART interface is a universal serial data bus used for asynchronous communication. The bus may be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. The UART interface is typically used to connect the processor 110 with the wireless communication module. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module through the UART interface to realize the Bluetooth function. The audio module can transmit audio signals to the wireless communication module through the UART interface, so as to realize the function of playing music through the Bluetooth headset.

MIPI接口可以被用于连接处理器110与显示屏、摄像头等外围器件。MIPI接口包括摄像头串行接口(camera serial interface,CSI),显示屏串行接口(display serialinterface,DSI)等。在一些实施例中,处理器110和摄像头通过CSI接口通信,实现电子设备100的拍摄功能。处理器110和显示屏通过DSI接口通信,实现电子设备100的显示功能。The MIPI interface can be used to connect the processor 110 with peripheral devices such as a display screen and a camera. The MIPI interface includes a camera serial interface (camera serial interface, CSI), a display serial interface (display serial interface, DSI), and the like. In some embodiments, the processor 110 communicates with the camera through a CSI interface, so as to implement the photographing function of the electronic device 100 . The processor 110 communicates with the display screen through the DSI interface to implement the display function of the electronic device 100 .

GPIO接口可以通过软件配置。GPIO接口可以被配置为控制信号,也可被配置为数据信号。在一些实施例中,GPIO接口可以用于连接处理器110与摄像头、显示屏、无线通信模块、音频模块、传感器模块等。GPIO接口还可以被配置为I2C接口,I2S接口,UART接口,MIPI接口等。The GPIO interface can be configured by software. The GPIO interface can be configured as a control signal or as a data signal. In some embodiments, the GPIO interface may be used to connect the processor 110 with a camera, a display screen, a wireless communication module, an audio module, a sensor module, and the like. The GPIO interface can also be configured as I2C interface, I2S interface, UART interface, MIPI interface, etc.

USB接口是符合USB标准规范的接口,具体可以是Mini USB接口、Micro USB接口、USB Type C接口等。USB接口可以用于连接充电器为电子设备100充电,也可以用于电子设备100与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。该接口还可以用于连接其他电子设备,例如AR设备等。The USB interface is an interface that conforms to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like. The USB interface can be used to connect a charger to charge the electronic device 100, and can also be used to transmit data between the electronic device 100 and peripheral devices. It can also be used to connect headphones to play audio through the headphones. The interface can also be used to connect other electronic devices, such as AR devices.

可以理解的是,上述处理器110在实际产品中可以映射为系统级芯片(System ona Chip,SOC),上述处理单元和/或接口也可以不集成到处理器110中,单独通过一块通信芯片或者电子元器件实现对应的功能。上述各模块间的接口连接关系,只是示意性说明,并不构成对电子设备100的结构的唯一限定。It can be understood that the above-mentioned processor 110 may be mapped to a system-on-chip (System ona Chip, SOC) in an actual product, and the above-mentioned processing unit and/or interface may also not be integrated into the processor 110, and a communication chip or Electronic components realize corresponding functions. The interface connection relationship between the above modules is only a schematic illustration, and does not constitute a unique limitation on the structure of the electronic device 100 .

存储器120可以包括随机存储器(Random Access Memory,RAM),也可以包括只读存储器(Read-Only Memory)。可选地,该存储器120包括非瞬时性计算机可读介质(non-transitory computer-readable storage medium)。存储器120可用于存储指令、程序、代码、代码集或指令集。存储器120可包括存储程序区和存储数据区,其中,存储程序区可存储用于实现操作系统的指令、用于实现至少一个功能的指令(比如触控功能、声音播放功能、图像播放功能等)、用于实现下述各个方法实施例的指令等,该操作系统可以是安卓(Android)系统(包括基于Android系统深度开发的系统)、苹果公司开发的IOS系统(包括基于IOS系统深度开发的系统)或其它系统。存储数据区还可以存储电子设备100在使用中所创建的数据(比如电话本、音视频数据、聊天记录数据)等。The memory 120 may include random access memory (Random Access Memory, RAM), or may include read-only memory (Read-Only Memory). Optionally, the memory 120 includes a non-transitory computer-readable storage medium. Memory 120 may be used to store instructions, programs, codes, sets of codes, or sets of instructions. The memory 120 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.) , instructions for implementing the following method embodiments, etc., the operating system can be an Android (Android) system (including a system based on the deep development of the Android system), an IOS system developed by Apple (including a system based on the deep development of the IOS system) ) or other systems. The storage data area may also store data (such as phone book, audio and video data, chat record data) created by the electronic device 100 during use.

电子设备100的软件系统可以采用分层架构,事件驱动架构,微核架构,微服务架构,或云架构。本申请实施例以分层架构的Android系统为例,示例性说明电子设备100的软件架构。The software system of the electronic device 100 may adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. The embodiments of the present application take an Android system with a layered architecture as an example to illustrate the software architecture of the electronic device 100 as an example.

如图1C所示的设置有Android系统的软硬件系统的架构示意图,存储器120中可存储有Linux内核层220、系统运行库层240、应用框架层260和应用层280,其中,层与层之间通过软件接口通信,Linux内核层220、系统运行库层240和应用框架层260属于操作系统空间。As shown in FIG. 1C , a schematic diagram of the architecture of the software and hardware system provided with the Android system, the memory 120 can store the Linux kernel layer 220, the system runtime layer 240, the application framework layer 260 and the application layer 280, wherein the layer and the layer are stored The Linux kernel layer 220, the system runtime layer 240 and the application framework layer 260 belong to the operating system space.

应用层280属于用户空间,应用层280中运行有至少一个应用程序,这些应用程序可以是操作系统自带的原生应用程序,也可以是第三方开发者所开发的第三方应用程序,具体可以包括密码、眼球追踪、相机,图库,日历,通话,地图,导航,WLAN,蓝牙,音乐,视频,短信息等应用程序。The application layer 280 belongs to the user space, and at least one application program runs in the application layer 280. These application programs can be native applications that come with the operating system, or can be third-party applications developed by third-party developers. Password, eye tracking, camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, SMS and other applications.

应用框架层260提供了构建应用层的应用程序可能用到的各种API,开发者也可以通过使用这些API来构建自己的应用程序,比如窗口管理器、内容提供器、视图系统、电话管理器、资源管理器、通知管理器、消息管理器、活动管理器、包管理器、定位管理。The application framework layer 260 provides various APIs that may be used by applications in the construction of the application layer. Developers can also build their own applications by using these APIs, such as window managers, content providers, view systems, and phone managers. , Resource Manager, Notification Manager, Message Manager, Activity Manager, Package Manager, Location Manager.

窗口管理器用于管理窗口程序。窗口管理器可以获取显示屏大小,判断是否有状态栏,锁定屏幕,截取屏幕等。A window manager is used to manage window programs. The window manager can get the size of the display screen, determine whether there is a status bar, lock the screen, take screenshots, etc.

内容提供器用来存放和获取数据,并使这些数据可以被应用程序访问。所述数据可以包括视频,图像,音频,拨打和接听的电话,浏览历史和书签,电话簿等。Content providers are used to store and retrieve data and make these data accessible to applications. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phone book, etc.

视图系统包括可视控件,例如显示文字的控件,显示图片的控件等。视图系统可用于构建应用程序。显示界面可以由一个或多个视图组成的。例如,包括短信通知图标的显示界面,可以包括显示文字的视图以及显示图片的视图。The view system includes visual controls, such as controls for displaying text, controls for displaying pictures, and so on. View systems can be used to build applications. A display interface can consist of one or more views. For example, the display interface including the short message notification icon may include a view for displaying text and a view for displaying pictures.

电话管理器用于提供电子设备100的通信功能。例如通话状态的管理(包括接通,挂断等)。The phone manager is used to provide the communication function of the electronic device 100 . For example, the management of call status (including connecting, hanging up, etc.).

资源管理器为应用程序提供各种资源,比如本地化字符串,图标,图片,布局文件,视频文件等等。The resource manager provides various resources for the application, such as localization strings, icons, pictures, layout files, video files and so on.

通知管理器使应用程序可以在状态栏中显示通知信息,可以用于传达告知类型的消息,可以短暂停留后自动消失,无需用户交互。比如通知管理器被用于告知下载完成,消息提醒等。通知管理器还可以是以图表或者滚动条文本形式出现在系统顶部状态栏的通知,例如后台运行的应用程序的通知,还可以是以对话窗口形式出现在屏幕上的通知。例如在状态栏提示文本信息,发出提示音,终端振动,指示灯闪烁等。The notification manager enables applications to display notification information in the status bar, which can be used to convey notification-type messages, and can disappear automatically after a brief pause without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also display notifications in the status bar at the top of the system in the form of graphs or scroll bar text, such as notifications of applications running in the background, and notifications on the screen in the form of dialog windows. For example, text information is prompted in the status bar, a prompt tone is issued, the terminal vibrates, and the indicator light flashes.

消息管理器可用于存储各个APP上报的消息的数据,并对各个APP上报的数据进行处理。具体地,消息的数据可包括消息的ID(message ID)、APP的ID(APPID)、消息的处理状态(status)、产生时间(happen time)、消息类型(msg type)及消息描述(description)。其中,消息的处理状态可包括两种:未处理、已处理。当消息的处理状态为未处理时,status字段为0;当消息的处理状态为已处理时,status字段为1。The message manager can be used to store the data of the message reported by each APP, and process the data reported by each APP. Specifically, the data of the message may include message ID (message ID), APP ID (APPID), message processing status (status), generation time (happen time), message type (msg type), and message description (description) . The processing status of the message can include two types: unprocessed and processed. When the processing status of the message is unprocessed, the status field is 0; when the processing status of the message is processed, the status field is 1.

在一种可能的实现方式中,消息管理器可以是通知管理器的一部分。In one possible implementation, the message manager may be part of the notification manager.

系统运行库层240通过一些C/C++库来为Android系统提供了主要的特性支持。如SQLite库提供了数据库的支持,OpenGL/ES库提供了3D绘图的支持,Webkit库提供了浏览器内核的支持等。在系统运行库层240中还提供有安卓运行时库(Android Runtime),它主要提供了一些核心库,能够允许开发者使用Java语言来编写Android应用。The system runtime layer 240 provides main feature support for the Android system through some C/C++ libraries. For example, the SQLite library provides database support, the OpenGL/ES library provides 3D drawing support, and the Webkit library provides browser kernel support. An Android runtime library (Android Runtime) is also provided in the system runtime library layer 240, which mainly provides some core libraries, which can allow developers to use the Java language to write Android applications.

Linux内核层220为电子设备100的各种硬件提供了底层的驱动,如显示驱动、音频驱动、摄像头驱动、蓝牙驱动、Wi-Fi驱动、电源管理等。The Linux kernel layer 220 provides underlying drivers for various hardware of the electronic device 100, such as display drivers, audio drivers, camera drivers, Bluetooth drivers, Wi-Fi drivers, power management, and the like.

下面结合图1D对目前常见的电子设备形态进行详细说明,可以理解的是,本申请实施例示意的结构并不构成对电子设备100的具体限定。在本申请另一些实施例中,电子设备100可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。The following describes in detail the current common electronic device forms with reference to FIG. 1D . It can be understood that the structures illustrated in the embodiments of the present application do not constitute a specific limitation on the electronic device 100 . In other embodiments of the present application, the electronic device 100 may include more or less components than shown, or combine some components, or separate some components, or arrange different components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

如图1D所示,电子设备100包括系统级芯片410,外部存储器接口420,内部存储器421,通用串行总线(universal serial bus,USB)接口430,充电管理模块440,电源管理模块441,电池442,天线1,天线2,移动通信模块450,无线通信模块460,音频模块470,扬声器470A,受话器470B,麦克风470C,传感器模块480,按键490,马达491,指示器492,摄像头493,显示屏494,红外发射器495,以及用户标识模块(subscriber identification module,SIM)卡接口496等。其中传感器模块480可以包括压力传感器480A,陀螺仪传感器480B,气压传感器480C,磁传感器480D,加速度传感器480E,距离传感器480F,接近光传感器480G,指纹传感器480H,温度传感器480J,触摸传感器480K,环境光传感器480L,骨传导传感器480M等。As shown in FIG. 1D , the electronic device 100 includes a system-on-chip 410 , an external memory interface 420 , an internal memory 421 , a universal serial bus (USB) interface 430 , a charging management module 440 , a power management module 441 , and a battery 442 , Antenna 1, Antenna 2, Mobile Communication Module 450, Wireless Communication Module 460, Audio Module 470, Speaker 470A, Receiver 470B, Microphone 470C, Sensor Module 480, Key 490, Motor 491, Indicator 492, Camera 493, Display 494 , infrared transmitter 495, and subscriber identification module (subscriber identification module, SIM) card interface 496 and so on. The sensor module 480 may include a pressure sensor 480A, a gyroscope sensor 480B, an air pressure sensor 480C, a magnetic sensor 480D, an acceleration sensor 480E, a distance sensor 480F, a proximity light sensor 480G, a fingerprint sensor 480H, a temperature sensor 480J, a touch sensor 480K, and ambient light. Sensor 480L, Bone Conduction Sensor 480M, etc.

电子设备100的无线通信功能可以通过天线1,天线2,移动通信模块450,无线通信模块460,调制解调处理器以及基带处理器等实现。The wireless communication function of the electronic device 100 may be implemented by the antenna 1, the antenna 2, the mobile communication module 450, the wireless communication module 460, the modulation and demodulation processor, the baseband processor, and the like.

天线1和天线2用于发射和接收电磁波信号。电子设备100中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 may be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, the antenna 1 can be multiplexed as a diversity antenna of the wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.

移动通信模块450可以提供应用在电子设备100上的包括2G/3G/4G/5G/6G等无线通信的解决方案。移动通信模块450可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块450可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块450还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块450的至少部分功能模块可以被设置于处理器440中。在一些实施例中,移动通信模块450的至少部分功能模块可以与处理器440的至少部分模块被设置在同一个器件中。The mobile communication module 450 may provide wireless communication solutions including 2G/3G/4G/5G/6G etc. applied on the electronic device 100 . The mobile communication module 450 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), and the like. The mobile communication module 450 can receive electromagnetic waves from the antenna 1, filter and amplify the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 450 can also amplify the signal modulated by the modulation and demodulation processor, and then convert it into electromagnetic waves for radiation through the antenna 1 . In some embodiments, at least part of the functional modules of the mobile communication module 450 may be provided in the processor 440 . In some embodiments, at least part of the functional modules of the mobile communication module 450 may be provided in the same device as at least part of the modules of the processor 440 .

调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器470A,受话器470B等)输出声音信号,或通过显示屏494显示图像或视频。在一些实施例中,调制解调处理器可以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器440,与移动通信模块450或其他功能模块设置在同一个器件中。The modem processor may include a modulator and a demodulator. Wherein, the modulator is used to modulate the low frequency baseband signal to be sent into a medium and high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low frequency baseband signal. Then the demodulator transmits the demodulated low-frequency baseband signal to the baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and passed to the application processor. The application processor outputs sound signals through audio devices (not limited to speaker 470A, receiver 470B, etc.), or displays images or videos through display screen 494 . In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be independent of the processor 440, and may be provided in the same device as the mobile communication module 450 or other functional modules.

无线通信模块460可以提供应用在电子设备100上的包括无线局域网(wirelesslocal area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。无线通信模块460可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块460经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器440。无线通信模块460还可以从处理器440接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。The wireless communication module 460 can provide wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), bluetooth (BT), and global navigation satellite systems applied on the electronic device 100 . (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field communication technology (near field communication, NFC), infrared technology (infrared, IR) and other wireless communication solutions. The wireless communication module 460 may be one or more devices integrating at least one communication processing module. The wireless communication module 460 receives electromagnetic waves via the antenna 2 , frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 440 . The wireless communication module 460 can also receive the signal to be sent from the processor 440 , perform frequency modulation on it, amplify it, and then convert it into electromagnetic waves for radiation through the antenna 2 .

在一些实施例中,电子设备100的天线1和移动通信模块450耦合,天线2和无线通信模块460耦合,使得电子设备100可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(codedivision multiple access,CDMA),宽带码分多址(wideband code division multipleaccess,WCDMA),时分码分多址(time-division code division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。所述GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation satellite system,GLONASS),北斗卫星导航系统(beidounavigation satellite system,BDS),准天顶卫星系统(quasi-zenith satellitesystem,QZSS)和/或星基增强系统(satellite based augmentation systems,SBAS)。In some embodiments, the antenna 1 of the electronic device 100 is coupled with the mobile communication module 450, and the antenna 2 is coupled with the wireless communication module 460, so that the electronic device 100 can communicate with the network and other devices through wireless communication technology. The wireless communication technology may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code Wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM , and/or IR technology, etc. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou satellite navigation system (BDS), a quasi-zenith satellite system (quasi- zenith satellite system, QZSS) and/or satellite based augmentation systems (SBAS).

充电管理模块440用于从充电器接收充电输入。其中,充电器可以是无线充电器,也可以是有线充电器。在一些有线充电的实施例中,充电管理模块440可以通过USB接口430接收有线充电器的充电输入。在一些无线充电的实施例中,充电管理模块440可以通过电子设备100的无线充电线圈接收无线充电输入。充电管理模块440为电池442充电的同时,还可以通过电源管理模块441为终端供电。The charging management module 440 is used to receive charging input from the charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 440 may receive charging input from the wired charger through the USB interface 430 . In some wireless charging embodiments, the charging management module 440 may receive wireless charging input through the wireless charging coil of the electronic device 100 . While the charging management module 440 is charging the battery 442 , it can also supply power to the terminal through the power management module 441 .

电源管理模块441用于连接电池442,充电管理模块440与处理器440。电源管理模块441接收电池442和/或充电管理模块440的输入,为处理器440,内部存储器421,外部存储器,显示屏494,摄像头493,和无线通信模块460等供电。电源管理模块441还可以用于监测电池容量,电池循环次数,电池健康状态(漏电,阻抗)等参数。在其他一些实施例中,电源管理模块441也可以设置于处理器440中。在另一些实施例中,电源管理模块441和充电管理模块440也可以设置于同一个器件中。The power management module 441 is used for connecting the battery 442 , the charging management module 440 and the processor 440 . The power management module 441 receives input from the battery 442 and/or the charging management module 440, and supplies power to the processor 440, the internal memory 421, the external memory, the display screen 494, the camera 493, and the wireless communication module 460. The power management module 441 can also be used to monitor parameters such as battery capacity, battery cycle times, battery health status (leakage, impedance). In some other embodiments, the power management module 441 may also be provided in the processor 440 . In other embodiments, the power management module 441 and the charging management module 440 may also be provided in the same device.

电子设备100通过GPU,显示屏494,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏494和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器440可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。The electronic device 100 implements a display function through a GPU, a display screen 494, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display screen 494 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 440 may include one or more GPUs that execute program instructions to generate or alter display information.

显示屏494用于显示图像,视频等。显示屏494包括显示面板。显示面板可以采用液晶显示屏(liquid crystal display,LCD),有机发光二极管(organic light-emittingdiode,OLED),有源矩阵有机发光二极体或主动矩阵有机发光二极体(active-matrixorganic light emitting diode的,AMOLED),柔性发光二极管(flex light-emittingdiode,FLED),Miniled,MicroLed,Micro-oLed,量子点发光二极管(quantum dot lightemitting diodes,QLED)等。在一些实施例中,电子设备100可以包括1个或N个显示屏494,N为大于1的正整数。本申请实施例中,显示屏494可用于在各个APP的图标上显示红点或数量红点,用于提示用户有新消息待处理。Display screen 494 is used to display images, video, and the like. Display screen 494 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (active-matrix organic light-emitting diode). , AMOLED), flexible light-emitting diode (flex light-emitting diode, FLED), Miniled, MicroLed, Micro-oLed, quantum dot light-emitting diodes (quantum dot light emitting diodes, QLED) and so on. In some embodiments, the electronic device 100 may include one or N display screens 494 , where N is a positive integer greater than one. In this embodiment of the present application, the display screen 494 may be used to display red dots or a number of red dots on the icons of each APP, to prompt the user that there is a new message to be processed.

电子设备100可以通过ISP,摄像头493,视频编解码器,GPU,显示屏494以及应用处理器等实现拍摄功能。The electronic device 100 may implement a shooting function through an ISP, a camera 493, a video codec, a GPU, a display screen 494, an application processor, and the like.

ISP用于处理摄像头493反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度,肤色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头493中。The ISP is used to process the data fed back by the camera 493 . For example, when taking a photo, the shutter is opened, the light is transmitted to the camera photosensitive element through the lens, the light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing, and converts it into an image visible to the naked eye. ISP can also perform algorithm optimization on image noise, brightness, and skin tone. ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, the ISP may be provided in the camera 493 .

摄像头493用于捕获静态图像或视频。物体通过镜头生成光学图像投射到感光元件。感光元件可以是电荷耦合器件(charge coupled device,CCD)或互补金属氧化物半导体(complementary metal-oxide-semiconductor,CMOS)光电晶体管。感光元件把光信号转换成电信号,之后将电信号传递给ISP转换成数字图像信号。ISP将数字图像信号输出到DSP加工处理。DSP将数字图像信号转换成标准的RGB,YUV等格式的图像信号。在一些实施例中,电子设备100可以包括1个或N个摄像头493,N为大于1的正整数。Camera 493 is used to capture still images or video. The object is projected through the lens to generate an optical image onto the photosensitive element. The photosensitive element may be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, and then transmits the electrical signal to the ISP to convert it into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. DSP converts digital image signals into standard RGB, YUV and other formats of image signals. In some embodiments, the electronic device 100 may include 1 or N cameras 493 , where N is a positive integer greater than 1.

外部存储器接口420可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备100的存储能力。外部存储卡通过外部存储器接口420与处理器440通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。The external memory interface 420 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100 . The external memory card communicates with the processor 440 through the external memory interface 420 to realize the data storage function. For example to save files like music, video etc in external memory card.

内部存储器421可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。处理器440通过运行存储在内部存储器421的指令,从而执行电子设备100的各种功能应用以及数据处理。内部存储器421可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备100使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器421可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universal flash storage,UFS)等。本申请实施例中,内部存储器421可以用于存储各个APP消息的数据,还可用于存储各个APP对应的红点消除策略。Internal memory 421 may be used to store computer executable program code, which includes instructions. The processor 440 executes various functional applications and data processing of the electronic device 100 by executing the instructions stored in the internal memory 421 . The internal memory 421 may include a storage program area and a storage data area. The storage program area can store an operating system, an application program required for at least one function (such as a sound playback function, an image playback function, etc.), and the like. The storage data area may store data (such as audio data, phone book, etc.) created during the use of the electronic device 100 and the like. In addition, the internal memory 421 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, universal flash storage (UFS), and the like. In this embodiment of the present application, the internal memory 421 may be used to store the data of each APP message, and may also be used to store the red dot elimination policy corresponding to each APP.

电子设备100可以通过音频模块470,扬声器470A,受话器470B,麦克风470C,耳机接口470D,以及应用处理器等实现音频功能。例如音乐播放,录音等。The electronic device 100 may implement audio functions through an audio module 470, a speaker 470A, a receiver 470B, a microphone 470C, an earphone interface 470D, and an application processor. Such as music playback, recording, etc.

音频模块470用于将数字音频信息转换成模拟音频信号输出,也用于将模拟音频输入转换为数字音频信号。音频模块470还可以用于对音频信号编码和解码。在一些实施例中,音频模块470可以设置于处理器440中,或将音频模块470的部分功能模块设置于处理器440中。The audio module 470 is used for converting digital audio information into analog audio signal output, and also for converting analog audio input into digital audio signal. Audio module 470 may also be used to encode and decode audio signals. In some embodiments, the audio module 470 may be provided in the processor 440 , or some functional modules of the audio module 470 may be provided in the processor 440 .

扬声器470A,也称“喇叭”,用于将音频电信号转换为声音信号。电子设备100可以通过扬声器470A收听音乐,或收听免提通话。Speaker 470A, also referred to as a "speaker", is used to convert audio electrical signals into sound signals. The electronic device 100 can listen to music through the speaker 470A, or listen to a hands-free call.

受话器470B,也称“听筒”,用于将音频电信号转换成声音信号。当电子设备100接听电话或语音信息时,可以通过将受话器470B靠近人耳接听语音。The receiver 470B, also referred to as "earpiece", is used to convert audio electrical signals into sound signals. When the electronic device 100 answers a call or a voice message, the voice can be answered by placing the receiver 470B close to the human ear.

麦克风470C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风470C发声,将声音信号输入到麦克风470C。电子设备100可以设置至少一个麦克风470C。在另一些实施例中,电子设备100可以设置两个麦克风470C,除了采集声音信号,还可以实现降噪功能。在另一些实施例中,电子设备100还可以设置三个,四个或更多麦克风470C,实现采集声音信号,降噪,还可以识别声音来源,实现定向录音功能等。Microphone 470C, also called "microphone", "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can make a sound by approaching the microphone 470C through the human mouth, and input the sound signal into the microphone 470C. The electronic device 100 may be provided with at least one microphone 470C. In other embodiments, the electronic device 100 may be provided with two microphones 470C, which may implement a noise reduction function in addition to collecting sound signals. In other embodiments, the electronic device 100 may further be provided with three, four or more microphones 470C to collect sound signals, reduce noise, identify sound sources, and implement directional recording functions.

耳机接口470D用于连接有线耳机。耳机接口470D可以是USB接口430,也可以是3.5mm的开放移动电子设备平台(open mobile terminal platform,OMTP)标准接口,美国蜂窝电信工业协会(cellular telecommunications industry association of the USA,CTIA)标准接口。The headphone jack 470D is used to connect wired headphones. The earphone port 470D may be a USB port 430, or a 3.5mm open mobile terminal platform (OMTP) standard port, a cellular telecommunications industry association of the USA (CTIA) standard port.

压力传感器480A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器480A可以设置于显示屏494。压力传感器480A的种类很多,如电阻式压力传感器,电感式压力传感器,电容式压力传感器等。电容式压力传感器可以是包括至少两个具有导电材料的平行板。当有力作用于压力传感器480A,电极之间的电容改变。电子设备100根据电容的变化确定压力的强度。当有触摸操作作用于显示屏494,电子设备100根据压力传感器480A检测所述触摸操作强度。电子设备100也可以根据压力传感器480A的检测信号计算触摸的位置。在一些实施例中,作用于相同触摸位置,但不同触摸操作强度的触摸操作,可以对应不同的操作指令。例如:当有触摸操作强度小于第一压力阈值的触摸操作作用于短消息应用图标时,执行查看短消息的指令。当有触摸操作强度大于或等于第一压力阈值的触摸操作作用于短消息应用图标时,执行新建短消息的指令。The pressure sensor 480A is used to sense pressure signals, and can convert the pressure signals into electrical signals. In some embodiments, pressure sensor 480A may be provided on display screen 494 . There are many types of pressure sensors 480A, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, and the like. The capacitive pressure sensor may be comprised of at least two parallel plates of conductive material. When a force is applied to pressure sensor 480A, the capacitance between the electrodes changes. The electronic device 100 determines the intensity of the pressure according to the change in capacitance. When a touch operation acts on the display screen 494, the electronic device 100 detects the intensity of the touch operation according to the pressure sensor 480A. The electronic device 100 can also calculate the touched position according to the detection signal of the pressure sensor 480A. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities may correspond to different operation instructions. For example, when a touch operation whose intensity is less than the first pressure threshold acts on the short message application icon, the instruction for viewing the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on the short message application icon, the instruction to create a new short message is executed.

陀螺仪传感器480B可以用于确定电子设备100的运动姿态。在一些实施例中,可以通过陀螺仪传感器480B确定电子设备100围绕三个轴(即,x,y和z轴)的角速度。陀螺仪传感器480B可以用于拍摄防抖。示例性的,当按下快门,陀螺仪传感器480B检测电子设备100抖动的角度,根据角度计算出镜头模组需要补偿的距离,让镜头通过反向运动抵消电子设备100的抖动,实现防抖。陀螺仪传感器480B还可以用于导航,体感游戏场景。The gyro sensor 480B may be used to determine the motion attitude of the electronic device 100 . In some embodiments, the angular velocity of electronic device 100 about three axes (ie, x, y, and z axes) may be determined by gyro sensor 480B. The gyro sensor 480B can be used for image stabilization. Exemplarily, when the shutter is pressed, the gyro sensor 480B detects the shaking angle of the electronic device 100, calculates the distance to be compensated by the lens module according to the angle, and allows the lens to offset the shaking of the electronic device 100 through reverse motion to achieve anti-shake. The gyroscope sensor 480B can also be used for navigation and somatosensory game scenarios.

气压传感器480C用于测量气压。在一些实施例中,电子设备100通过气压传感器480C测得的气压值计算海拔高度,辅助定位和导航。Air pressure sensor 480C is used to measure air pressure. In some embodiments, the electronic device 100 calculates the altitude through the air pressure value measured by the air pressure sensor 480C to assist in positioning and navigation.

磁传感器480D包括霍尔传感器。电子设备100可以利用磁传感器480D检测翻盖皮套的开合。在一些实施例中,当电子设备100是翻盖机时,电子设备100可以根据磁传感器480D检测翻盖的开合。进而根据检测到的皮套的开合状态或翻盖的开合状态,设置翻盖自动解锁等特性。Magnetic sensor 480D includes a Hall sensor. The electronic device 100 can detect the opening and closing of the flip holster using the magnetic sensor 480D. In some embodiments, when the electronic device 100 is a flip machine, the electronic device 100 can detect the opening and closing of the flip according to the magnetic sensor 480D. Further, according to the detected opening and closing state of the leather case or the opening and closing state of the flip cover, characteristics such as automatic unlocking of the flip cover are set.

加速度传感器480E可检测电子设备100在各个方向上(一般为三轴)加速度的大小。当电子设备100静止时可检测出重力的大小及方向。还可以用于识别终端姿态,应用于横竖屏切换,计步器等应用。The acceleration sensor 480E can detect the magnitude of the acceleration of the electronic device 100 in various directions (generally three axes). The magnitude and direction of gravity can be detected when the electronic device 100 is stationary. It can also be used to identify the terminal posture, and can be used in horizontal and vertical screen switching, pedometer and other applications.

距离传感器480F,用于测量距离。电子设备100可以通过红外或激光测量距离。在一些实施例中,拍摄场景,电子设备100可以利用距离传感器480F测距以实现快速对焦。Distance sensor 480F for measuring distance. The electronic device 100 can measure the distance through infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 can use the distance sensor 480F to measure the distance to achieve fast focusing.

接近光传感器480G可以包括例如发光二极管(LED)和光检测器,例如光电二极管。发光二极管可以是红外发光二极管。电子设备100通过发光二极管向外发射红外光。电子设备100使用光电二极管检测来自附近物体的红外反射光。当检测到充分的反射光时,可以确定电子设备100附近有物体。当检测到不充分的反射光时,电子设备100可以确定电子设备100附近没有物体。电子设备100可以利用接近光传感器480G检测用户手持电子设备100贴近耳朵通话,以便自动熄灭屏幕达到省电的目的。接近光传感器480G也可用于皮套模式,口袋模式自动解锁与锁屏。Proximity light sensor 480G may include, for example, light emitting diodes (LEDs) and light detectors, such as photodiodes. The light emitting diodes may be infrared light emitting diodes. The electronic device 100 emits infrared light to the outside through the light emitting diode. Electronic device 100 uses photodiodes to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100 . When insufficient reflected light is detected, the electronic device 100 may determine that there is no object near the electronic device 100 . The electronic device 100 can use the proximity light sensor 480G to detect that the user holds the electronic device 100 close to the ear to talk, so as to automatically turn off the screen to save power. Proximity light sensor 480G can also be used in holster mode, pocket mode automatically unlocks and locks the screen.

环境光传感器480L用于感知环境光亮度。电子设备100可以根据感知的环境光亮度自适应调节显示屏494亮度。环境光传感器480L也可用于拍照时自动调节白平衡。环境光传感器480L还可以与接近光传感器480G配合,检测电子设备100是否在口袋里,以防误触。The ambient light sensor 480L is used to sense ambient light brightness. The electronic device 100 can adaptively adjust the brightness of the display screen 494 according to the perceived ambient light brightness. The ambient light sensor 480L can also be used to automatically adjust the white balance when taking pictures. The ambient light sensor 480L can also cooperate with the proximity light sensor 480G to detect whether the electronic device 100 is in the pocket to prevent accidental touch.

指纹传感器480H用于采集指纹。电子设备100可以利用采集的指纹特性实现指纹解锁,访问应用锁,指纹拍照,指纹接听来电等。The fingerprint sensor 480H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to realize fingerprint unlocking, accessing application locks, taking pictures with fingerprints, answering incoming calls with fingerprints, and the like.

温度传感器480J用于检测温度。在一些实施例中,电子设备100利用温度传感器480J检测的温度,执行温度处理策略。例如,当温度传感器480J上报的温度超过阈值,电子设备100执行降低位于温度传感器480J附近的处理器的性能,以便降低功耗实施热保护。在另一些实施例中,当温度低于另一阈值时,电子设备100对电池442加热,以避免低温导致电子设备100异常关机。在其他一些实施例中,当温度低于又一阈值时,电子设备100对电池442的输出电压执行升压,以避免低温导致的异常关机。The temperature sensor 480J is used to detect the temperature. In some embodiments, the electronic device 100 utilizes the temperature detected by the temperature sensor 480J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 480J exceeds a threshold value, the electronic device 100 reduces the performance of the processor located near the temperature sensor 480J to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 heats the battery 442 to avoid abnormal shutdown of the electronic device 100 caused by the low temperature. In some other embodiments, when the temperature is lower than another threshold, the electronic device 100 boosts the output voltage of the battery 442 to avoid abnormal shutdown caused by low temperature.

触摸传感器480K,也称“触控面板”。触摸传感器480K可以设置于显示屏494,由触摸传感器480K与显示屏494组成触摸屏,也称“触控屏”。触摸传感器480K用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏494提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器480K也可以设置于电子设备100的表面,与显示屏494所处的位置不同。Touch sensor 480K, also called "touch panel". The touch sensor 480K may be disposed on the display screen 494, and the touch sensor 480K and the display screen 494 form a touch screen, also called a "touch screen". The touch sensor 480K is used to detect a touch operation on or near it. The touch sensor can pass the detected touch operation to the application processor to determine the type of touch event. Visual output related to touch operations may be provided through display screen 494 . In other embodiments, the touch sensor 480K may also be disposed on the surface of the electronic device 100 , which is different from the location where the display screen 494 is located.

骨传导传感器480M可以获取振动信号。在一些实施例中,骨传导传感器480M可以获取人体声部振动骨块的振动信号。骨传导传感器480M也可以接触人体脉搏,接收血压跳动信号。在一些实施例中,骨传导传感器480M也可以设置于耳机中,结合成骨传导耳机。音频模块470可以基于所述骨传导传感器480M获取的声部振动骨块的振动信号,解析出语音信号,实现语音功能。应用处理器可以基于所述骨传导传感器480M获取的血压跳动信号解析心率信息,实现心率检测功能。The bone conduction sensor 480M can acquire vibration signals. In some embodiments, the bone conduction sensor 480M can acquire the vibration signal of the vibrating bone mass of the human voice. The bone conduction sensor 480M can also contact the pulse of the human body and receive the blood pressure beating signal. In some embodiments, the bone conduction sensor 480M can also be disposed in the earphone, combined with the bone conduction earphone. The audio module 470 can analyze the voice signal based on the vibration signal of the vocal vibration bone block obtained by the bone conduction sensor 480M, so as to realize the voice function. The application processor can analyze the heart rate information based on the blood pressure beat signal obtained by the bone conduction sensor 480M, so as to realize the function of heart rate detection.

按键490包括开机键,音量键等。按键490可以是机械按键。也可以是触摸式按键。电子设备100可以接收按键输入,产生与电子设备100的用户设置以及功能控制有关的键信号输入。The keys 490 include a power-on key, a volume key, and the like. Keys 490 may be mechanical keys. It can also be a touch key. The electronic device 100 may receive key inputs and generate key signal inputs related to user settings and function control of the electronic device 100 .

马达491可以产生振动提示。马达491可以用于来电振动提示,也可以用于触摸振动反馈。例如,作用于不同应用(例如拍照,音频播放等)的触摸操作,可以对应不同的振动反馈效果。作用于显示屏494不同区域的触摸操作,马达491也可对应不同的振动反馈效果。不同的应用场景(例如:时间提醒,接收信息,闹钟,游戏等)也可以对应不同的振动反馈效果。触摸振动反馈效果还可以支持自定义。Motor 491 can generate vibrating cues. The motor 491 can be used for vibrating alerts for incoming calls, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, playing audio, etc.) can correspond to different vibration feedback effects. The motor 491 can also correspond to different vibration feedback effects for touch operations on different areas of the display screen 494 . Different application scenarios (for example: time reminder, receiving information, alarm clock, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.

指示器492可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等,此外,指示器492可以包括如图1D所示的设置于电子设备100侧边框的射灯。The indicator 492 can be an indicator light, which can be used to indicate the charging state, power change, and can also be used to indicate messages, missed calls, notifications, etc. In addition, the indicator 492 can include the electronic device 100 as shown in FIG. 1D . Spotlights on the side frame.

红外发射器495可以是红外灯,可以发射红外光照射在人脸上从而在人眼上形成光斑。The infrared emitter 495 can be an infrared lamp, which can emit infrared light to irradiate on a human face to form a light spot on the human eye.

SIM卡接口496用于连接SIM卡。SIM卡可以通过插入SIM卡接口496,或从SIM卡接口496拔出,实现和电子设备100的接触和分离。电子设备100可以支持1个或N个SIM卡接口,N为大于1的正整数。SIM卡接口496可以支持Nano SIM卡,Micro SIM卡,SIM卡等。同一个SIM卡接口496可以同时插入多张卡。所述多张卡的类型可以相同,也可以不同。SIM卡接口496也可以兼容不同类型的SIM卡。SIM卡接口496也可以兼容外部存储卡。电子设备100通过SIM卡和网络交互,实现通话以及数据通信等功能。在一些实施例中,电子设备100采用eSIM,即:嵌入式SIM卡。eSIM卡可以嵌在电子设备100中,不能和电子设备100分离。The SIM card interface 496 is used to connect a SIM card. The SIM card can be contacted and separated from the electronic device 100 by inserting into the SIM card interface 496 or pulling out from the SIM card interface 496 . The electronic device 100 may support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 496 can support Nano SIM card, Micro SIM card, SIM card and so on. The same SIM card interface 496 can simultaneously insert multiple cards. The types of the plurality of cards may be the same or different. The SIM card interface 496 may also be compatible with different types of SIM cards. The SIM card interface 496 may also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as call and data communication. In some embodiments, the electronic device 100 employs an eSIM, ie: an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100 .

请参阅图2,图2是本申请实施例提供的一种获取测试日志的方法的流程示意图,应用第一电子设备,第一电子设备为搭载有安卓操作系统的电子设备,第一电子设备设置有第一服务,如图所示,本获取测试日志的方法包括:Please refer to FIG. 2. FIG. 2 is a schematic flowchart of a method for obtaining a test log provided by an embodiment of the present application. A first electronic device is applied, and the first electronic device is an electronic device equipped with an Android operating system. The first electronic device is set to There is the first service, as shown in the figure, the method of obtaining the test log includes:

步骤201,第一电子设备根据第一服务与第二电子设备建立无线传输链路。Step 201, the first electronic device establishes a wireless transmission link with the second electronic device according to the first service.

其中,第一服务是安卓调试桥(Android Debug Bridge,ADB)服务。Among them, the first service is the Android Debug Bridge (Android Debug Bridge, ADB) service.

步骤202,第一电子设备通过无线传输链路接收第二电子设备发送的日志配置信息。Step 202, the first electronic device receives the log configuration information sent by the second electronic device through the wireless transmission link.

步骤203,第一电子设备根据日志配置信息执行目标测试任务,得到测试日志。Step 203, the first electronic device executes the target test task according to the log configuration information, and obtains a test log.

其中,在第一电子设备通过无线传输链路接收第二电子设备发送的日志配置信息之后,第一电子设备根据日志配置信息执行目标测试任务之前,还可以包括:第一电子设备通过无线传输链路接收到第二电子设备发送的日志抓取指令。Wherein, after the first electronic device receives the log configuration information sent by the second electronic device through the wireless transmission link, and before the first electronic device performs the target test task according to the log configuration information, the method may further include: the first electronic device through the wireless transmission link The channel receives the log grabbing instruction sent by the second electronic device.

其中,目标测试任务可以是定位测试,日志配置信息中可以包括:执行定位测试的频率,定位测试的时长,定位过程中电子设备中各个硬件的功率,参考位置点,以及规定中第一电子设备在定位测试过程中需要记录的数据等,本申请实施例不做限定。The target test task may be a positioning test, and the log configuration information may include: the frequency of performing the positioning test, the duration of the positioning test, the power of each hardware in the electronic device during the positioning process, the reference position point, and the first electronic device specified in the regulations. The data and the like that need to be recorded in the positioning test process are not limited in the embodiments of the present application.

步骤204,第一电子设备通过无线传输链路向第二电子设备发送测试日志。Step 204, the first electronic device sends the test log to the second electronic device through the wireless transmission link.

其中,第二电子设备可以与多台第一电子设备构建无线传输链路,进而获取多台第一电子设备的多个测试日志,根据多个测试日志进行分析,得到针对目标功能(如电子设备的定位功能)测试结果。Wherein, the second electronic device can construct a wireless transmission link with multiple first electronic devices, and then obtain multiple test logs of multiple first electronic devices, and analyze the multiple test logs to obtain target functions (such as electronic devices) positioning function) test results.

可以看出,本申请实施例中,首先,第一电子设备根据第一服务与第二电子设备建立无线传输链路;其次,通过无线传输链路接收第二电子设备发送的日志配置信息;其次,根据日志配置信息执行目标测试任务,得到测试日志;最后,通过无线传输链路向第二电子设备发送测试日志。可见,本申请实施例中第一电子设备可以与第二电子设备建立无线传输链路,进而使得整个测试过程中的数据信息可以通过无线传输链路进行传输,提升了测试过程中信息传输的便捷性;同时,第一电子设备可根据第二电子设备的发送的日志配置信息完成整个测试过程,并将生成的测试日志返回给第二电子设备,无需人为操控第一电子设备完成整个测试过程,提升了整个测试过程的自动化程度,提升了针对电子设备进行测试的效率。It can be seen that in the embodiment of the present application, first, the first electronic device establishes a wireless transmission link with the second electronic device according to the first service; secondly, the log configuration information sent by the second electronic device is received through the wireless transmission link; secondly , execute the target test task according to the log configuration information, and obtain the test log; finally, send the test log to the second electronic device through the wireless transmission link. It can be seen that in the embodiment of the present application, the first electronic device can establish a wireless transmission link with the second electronic device, so that the data information in the whole testing process can be transmitted through the wireless transmission link, which improves the convenience of information transmission during the testing process At the same time, the first electronic device can complete the entire test process according to the log configuration information sent by the second electronic device, and return the generated test log to the second electronic device, without manipulating the first electronic device to complete the entire test process, It improves the automation of the entire testing process and improves the efficiency of testing electronic equipment.

在一个可能的示例中,根据第一服务与第二电子设备建立无线传输链路,包括:与第二电子设备建立有线传输链路;通过有线传输链路向第二电子设备发送第一电子设备的互联网协议地址,互联网协议地址用于第二电子设备根据互联网协议地址与第一电子设备建立无线传输链路;与第二电子设备建立无线传输链路。In a possible example, establishing a wireless transmission link with the second electronic device according to the first service includes: establishing a wired transmission link with the second electronic device; sending the first electronic device to the second electronic device through the wired transmission link The Internet Protocol address is used for the second electronic device to establish a wireless transmission link with the first electronic device according to the Internet Protocol address; establish a wireless transmission link with the second electronic device.

其中,第一电子设备与第二电子设备建立有线传输链路的方式可以是第一电子设备与第二电子设备通过数据线进行连接。The manner in which the first electronic device and the second electronic device establish a wired transmission link may be that the first electronic device and the second electronic device are connected through a data line.

具体的,第二电子设备获取到第一电子设备的互联网协议地址之后,第二电子设备可以根据互联网协议地址与第一电子设备建立直连的无线传输链路;第二电子设备也可以通过中继电子设备(如服务器等)与第一电子设备建立间接连接的无线传输链路。Specifically, after the second electronic device obtains the Internet protocol address of the first electronic device, the second electronic device can establish a direct wireless transmission link with the first electronic device according to the Internet protocol address; A wireless transmission link for establishing an indirect connection between a relay electronic device (such as a server, etc.) and the first electronic device.

可以看出,本示例中,第一电子设备和第二电子设备可建立无线传输链路,提升了第一电子设备和第二电子设备之间数据传输的便捷性,进而提升了测试效率。It can be seen that, in this example, the first electronic device and the second electronic device can establish a wireless transmission link, which improves the convenience of data transmission between the first electronic device and the second electronic device, thereby improving the test efficiency.

在一个可能的示例中,根据日志配置信息执行目标测试任务,得到测试日志之后,向第二电子设备发送测试日志之前,方法还包括:通过无线传输链路接收第二电子设备发送的日志获取请求。In a possible example, after the target test task is performed according to the log configuration information, and after the test log is obtained, before the test log is sent to the second electronic device, the method further includes: receiving a log acquisition request sent by the second electronic device through a wireless transmission link .

在一个可能的示例中,日志配置信息包括数据条件,根据日志配置信息执行目标测试任务,得到测试日志,包括:根据日志配置信息获取至少一个检测数据;确定至少一个检测数据中不满足数据条件的第一数量个检测数据;根据第一数量个检测数据生成测试日志。In a possible example, the log configuration information includes data conditions, and executing the target test task according to the log configuration information to obtain the test log includes: acquiring at least one piece of detection data according to the log configuration information; determining at least one piece of detection data that does not meet the data conditions The first quantity of detection data; the test log is generated according to the first quantity of detection data.

具体的,目标测试任务为针对电子设备的定位功能进行测试;其中,日志配置信息可包括执行定位测试的频率,定位测试的时长,定位过程中电子设备中各个硬件的功率,参考位置点,以及规定第一电子设备在定位测试过程中需要记录的数据;其中测试人员可以通过第二电子设备录入日志配置信息;Specifically, the target test task is to test the positioning function of the electronic device; wherein, the log configuration information may include the frequency of performing the positioning test, the duration of the positioning test, the power of each hardware in the electronic device during the positioning process, the reference position point, and Specify the data that the first electronic device needs to record during the positioning test process; wherein the tester can input log configuration information through the second electronic device;

其中,检测数据可以是第一电子设备执行定位功能时,生成的实际偏离值,其中,实际偏离值为实时位置点与参考位置点之间的距离值。The detection data may be an actual deviation value generated when the first electronic device performs a positioning function, wherein the actual deviation value is a distance value between the real-time position point and the reference position point.

其中数据条件可以包括:实际偏离值小于等于参考偏离值。The data conditions may include: the actual deviation value is less than or equal to the reference deviation value.

其中,确定至少一个检测数据中不满足数据条件的第一数量个检测数据,即第一电子设备可根据定位测试的频率和定位测试的时长等得到至少一个实时位置点;第一电子设备计算至少一个实时位置点中每个实时位置点与参考位置点之间距离值,记为实际偏离值;比较实际偏离值与参考偏离的大小;若实际偏离值大于参考偏离值,则确定该实际偏离值不满足数据条件的检测数据。Wherein, determine the first number of detection data that does not meet the data condition in the at least one detection data, that is, the first electronic device can obtain at least one real-time position point according to the frequency of the positioning test and the duration of the positioning test; the first electronic device calculates at least one real-time position point; The distance value between each real-time position point and the reference position point in a real-time position point is recorded as the actual deviation value; compare the actual deviation value and the reference deviation value; if the actual deviation value is greater than the reference deviation value, determine the actual deviation value Detection data that does not meet the data conditions.

可见,本示例中,第一电子设备可首先针对检测到的数据进行分析处理,将不满足条件的数据发送至第二电子设备,使得在实际场景中若第二电子设备连接多个第一电子设备时,可以减小第二电子设备的数据处理量,进而提升了针对测试日志分析处理的效率。It can be seen that in this example, the first electronic device can first perform analysis and processing on the detected data, and send the data that does not meet the conditions to the second electronic device, so that in the actual scene, if the second electronic device is connected to multiple first electronic devices When the device is installed, the data processing amount of the second electronic device can be reduced, thereby improving the efficiency of analyzing and processing the test log.

与图2所示的实施例一致的,请参阅图3,图3是本申请实施例提供的一种获取测试日志的方法的交互示意图,如图所示,本获取测试日志的方法包括:Consistent with the embodiment shown in FIG. 2 , please refer to FIG. 3 . FIG. 3 is an interactive schematic diagram of a method for obtaining a test log provided by an embodiment of the present application. As shown in the figure, the method for obtaining a test log includes:

步骤301,第一电子设备与第二电子设备建立有线传输链路。Step 301, the first electronic device establishes a wired transmission link with the second electronic device.

步骤302,第一电子设备通过有线传输链路向第二电子设备发送第一电子设备的互联网协议地址。Step 302, the first electronic device sends the Internet Protocol address of the first electronic device to the second electronic device through a wired transmission link.

步骤303,第二电子设备根据互联网协议地址与第一电子设备建立无线传输链路。Step 303, the second electronic device establishes a wireless transmission link with the first electronic device according to the Internet protocol address.

步骤304,第二电子设备通过无线传输链路向第一电子设备发送日志配置信息。Step 304, the second electronic device sends the log configuration information to the first electronic device through the wireless transmission link.

步骤305,第一电子设备根据日志配置信息执行目标测试任务,得到测试日志。Step 305, the first electronic device executes the target test task according to the log configuration information, and obtains a test log.

步骤306,第一电子设备通过无线传输链路向第二电子设备发送测试日志。Step 306, the first electronic device sends the test log to the second electronic device through the wireless transmission link.

可见,本申请实施例中第一电子设备可以与第二电子设备建立无线传输链路,进而使得整个测试过程中的数据信息可以通过无线传输链路进行传输,提升了测试过程中信息传输的便捷性;同时,第一电子设备可根据第二电子设备的发送的日志配置信息完成整个测试过程,并将生成的测试日志返回给第二电子设备,无需人为操控第一电子设备完成整个测试过程,提升了整个测试过程的自动化程度,提升了测试过程的效率。It can be seen that in the embodiment of the present application, the first electronic device can establish a wireless transmission link with the second electronic device, so that the data information in the whole testing process can be transmitted through the wireless transmission link, which improves the convenience of information transmission during the testing process At the same time, the first electronic device can complete the entire test process according to the log configuration information sent by the second electronic device, and return the generated test log to the second electronic device, without manipulating the first electronic device to complete the entire test process, Improve the automation of the entire testing process and improve the efficiency of the testing process.

本申请实施例提供一种获取测试日志的装置,该获取测试日志的装置可以为电子设备101或电子设备102。具体的,获取测试日志的装置用于执行以上获取测试日志的方法的步骤。本申请实施例提供的获取测试日志的装置可以包括相应步骤所对应的模块。An embodiment of the present application provides an apparatus for acquiring a test log, and the apparatus for acquiring a test log may be an electronic device 101 or an electronic device 102 . Specifically, the apparatus for acquiring the test log is configured to perform the steps of the above method for acquiring the test log. The apparatus for acquiring a test log provided by the embodiment of the present application may include modules corresponding to corresponding steps.

本申请实施例可以根据上述方法示例对获取测试日志的装置进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。本申请实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。In the embodiment of the present application, the device for acquiring the test log can be divided into functional modules according to the above method examples. For example, each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing module. The above-mentioned integrated modules can be implemented in the form of hardware, and can also be implemented in the form of software function modules. The division of modules in the embodiments of the present application is schematic, and is only a logical function division, and there may be other division manners in actual implementation.

在采用对应各个功能划分各个功能模块的情况下,图4示出上述实施例中所涉及的获取测试日志的装置的一种可能的结构示意图。如图4所示,获取测试日志的装置500包括处理单元501和通信单元502。In the case where each functional module is divided according to each function, FIG. 4 shows a possible schematic structural diagram of the apparatus for acquiring a test log involved in the above embodiment. As shown in FIG. 4 , the apparatus 500 for acquiring a test log includes a processing unit 501 and a communication unit 502 .

在获取测试日志的装置为电子设备101的情况下:In the case where the device for acquiring the test log is the electronic device 101:

所述处理单元,用于根据所述第一服务与第二电子设备建立无线传输链路;the processing unit, configured to establish a wireless transmission link with the second electronic device according to the first service;

所述通信单元,用于通过所述无线传输链路接收所述第二电子设备发送的日志配置信息;the communication unit, configured to receive log configuration information sent by the second electronic device through the wireless transmission link;

所述处理单元,还用于根据所述日志配置信息执行目标测试任务,得到测试日志;The processing unit is further configured to execute the target test task according to the log configuration information to obtain a test log;

所述通信单元,还用于通过所述无线传输链路向所述第二电子设备发送所述测试日志。The communication unit is further configured to send the test log to the second electronic device through the wireless transmission link.

在获取测试日志的装置为电子设备101的情况下:In the case where the device for acquiring the test log is the electronic device 101:

所述处理单元,用于根据第一电子设备的第一服务与所述第一电子设备建立无线传输链路;the processing unit, configured to establish a wireless transmission link with the first electronic device according to the first service of the first electronic device;

所述通信单元,用于通过所述无线传输链路向所述第一电子设备发送日志配置信息,所述日志配置信息用于所述第一电子设备根据所述日志配置信息执行目标测试任务,以得到测试日志;以及用于通过所述无线传输链路接收所述第一电子设备发送的所述测试日志。the communication unit, configured to send log configuration information to the first electronic device through the wireless transmission link, where the log configuration information is used by the first electronic device to perform a target test task according to the log configuration information, to obtain a test log; and for receiving the test log sent by the first electronic device through the wireless transmission link.

其中,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。当然,本申请实施例提供的获取测试日志的装置包括但不限于上述模块,例如:获取测试日志的装置还可以包括存储单元503。存储单元503可以用于存储该获取测试日志的装置的程序代码和数据。Wherein, all relevant contents of the steps involved in the above method embodiments can be cited in the functional descriptions of the corresponding functional modules, which will not be repeated here. Certainly, the apparatus for acquiring the test log provided by the embodiment of the present application includes but is not limited to the above-mentioned modules. For example, the apparatus for acquiring the test log may further include the storage unit 503 . The storage unit 503 may be used to store program codes and data of the apparatus for acquiring the test log.

在采用集成的单元的情况下,本申请实施例提供的获取测试日志的装置的结构示意图如图5所示。在图5中,获取测试日志的装置600包括:处理模块601和通信模块602。处理模块601用于对获取测试日志的装置的动作进行控制管理,例如,执行处理单元501执行的步骤,和/或用于执行本文所描述的技术的其它过程。通信模块602用于支持获取测试日志的装置与其他设备之间的交互。如图5所示,获取测试日志的装置还可以包括存储模块603,存储模块603用于存储获取测试日志的装置的程序代码和数据,例如存储上述存储单元503所保存的内容。In the case of using an integrated unit, a schematic structural diagram of the apparatus for acquiring a test log provided by the embodiment of the present application is shown in FIG. 5 . In FIG. 5 , the apparatus 600 for acquiring the test log includes: a processing module 601 and a communication module 602 . The processing module 601 is used to control and manage the actions of the apparatus for acquiring the test log, for example, to perform the steps performed by the processing unit 501, and/or to perform other processes of the techniques described herein. The communication module 602 is used to support the interaction between the apparatus for acquiring the test log and other devices. As shown in FIG. 5 , the apparatus for acquiring test logs may further include a storage module 603 , the storage module 603 is configured to store program codes and data of the apparatus for acquiring test logs, for example, the contents saved by the above-mentioned storage unit 503 .

其中,处理模块601可以是处理器或控制器,例如可以是中央处理器(CentralProcessing Unit,CPU),通用处理器,数字信号处理器(Digital Signal Processor,DSP),ASIC,FPGA或者其他可编程逻辑器件、晶体管逻辑器件、硬件部件或者其任意组合。其可以实现或执行结合本申请公开内容所描述的各种示例性的逻辑方框,模块和电路。所述处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,DSP和微处理器的组合等等。通信模块602可以是收发器、RF电路或通信接口等。存储模块603可以是存储器。The processing module 601 may be a processor or a controller, such as a central processing unit (Central Processing Unit, CPU), a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), ASIC, FPGA or other programmable logic devices, transistor logic devices, hardware components, or any combination thereof. It may implement or execute the various exemplary logical blocks, modules and circuits described in connection with this disclosure. The processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and the like. The communication module 602 may be a transceiver, an RF circuit, a communication interface, or the like. The storage module 603 may be a memory.

其中,上述方法实施例涉及的各场景的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。上述获取测试日志的装置500和获取测试日志的装置600均可执行上述图2和图3所示的获取测试日志的方法。Wherein, all the relevant contents of the scenarios involved in the above method embodiments can be cited in the functional description of the corresponding functional module, which will not be repeated here. Both the above-mentioned apparatus 500 for acquiring a test log and the apparatus 600 for acquiring a test log can execute the above-mentioned methods for acquiring a test log shown in FIG. 2 and FIG. 3 .

本申请实施例还提供一种计算机存储介质,其中,该计算机存储介质存储用于电子数据交换的计算机程序,该计算机程序使得计算机执行如上述方法实施例中记载的任一方法的部分或全部步骤,上述计算机包括移动终端。Embodiments of the present application further provide a computer storage medium, wherein the computer storage medium stores a computer program for electronic data exchange, and the computer program causes the computer to execute part or all of the steps of any method described in the above method embodiments , the above computer includes a mobile terminal.

本申请实施例还提供一种计算机程序产品,上述计算机程序产品包括存储了计算机程序的非瞬时性计算机可读存储介质,上述计算机程序可操作来使计算机执行如上述方法实施例中记载的任一方法的部分或全部步骤。该计算机程序产品可以为一个软件安装包,上述计算机包括移动终端。Embodiments of the present application further provide a computer program product, where the computer program product includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to cause a computer to execute any one of the method embodiments described above. some or all of the steps of the method. The computer program product may be a software installation package, and the above-mentioned computer includes a mobile terminal.

需要说明的是,对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请并不受所描述的动作顺序的限制,因为依据本申请,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本申请所必须的。It should be noted that, for the sake of simple description, the foregoing method embodiments are all expressed as a series of action combinations, but those skilled in the art should know that the present application is not limited by the described action sequence. Because in accordance with the present application, certain steps may be performed in other orders or concurrently. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。In the above-mentioned embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference may be made to the relevant descriptions of other embodiments.

在本申请所提供的几个实施例中,应该理解到,所揭露的装置,可通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如上述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性或其它的形式。In the several embodiments provided in this application, it should be understood that the disclosed apparatus may be implemented in other manners. For example, the device embodiments described above are only illustrative. For example, the division of the above-mentioned units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated. to another system, or some features can be ignored, or not implemented. On the other hand, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in electrical or other forms.

上述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described above as separate components may or may not be physically separated, and components shown as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution in this embodiment.

另外,在本申请各个实施例中的各功能单元可以集成在一个控制单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。In addition, each functional unit in each embodiment of the present application may be integrated into one control unit, or each unit may exist physically alone, or two or more units may be integrated into one unit. The above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.

上述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储器中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储器中,包括若干指令用以使得一台计算机设备(可为个人计算机、服务器或者网络设备等)执行本申请各个实施例上述方法的全部或部分步骤。而前述的存储器包括:U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。The above-mentioned integrated units, if implemented in the form of software functional units and sold or used as independent products, may be stored in a computer-readable memory. Based on this understanding, the technical solution of the present application can be embodied in the form of a software product in essence, or the part that contributes to the prior art, or all or part of the technical solution, and the computer software product is stored in a memory, Several instructions are included to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the above-mentioned methods in the various embodiments of the present application. The aforementioned memory includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.

本领域普通技术人员可以理解上述实施例的各种方法中的全部或部分步骤是可以通过程序来指令相关的硬件来完成,该程序可以存储于一计算机可读存储器中,存储器可以包括:闪存盘、只读存储器(英文:Read-Only Memory,简称:ROM)、随机存取器(英文:Random Access Memory,简称:RAM)、磁盘或光盘等。Those skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing relevant hardware through a program, and the program can be stored in a computer-readable memory, and the memory can include: a flash disk , Read-only memory (English: Read-Only Memory, referred to as: ROM), random access device (English: Random Access Memory, referred to as: RAM), magnetic disk or optical disk, etc.

以上对本申请实施例进行了详细介绍,本文中应用了具体个例对本申请的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本申请的方法及其核心思想;同时,对于本领域的一般技术人员,依据本申请的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本申请的限制。The embodiments of the present application have been introduced in detail above, and the principles and implementations of the present application are described in this paper by using specific examples. The descriptions of the above embodiments are only used to help understand the methods and core ideas of the present application; at the same time, for Persons of ordinary skill in the art, based on the idea of the present application, will have changes in the specific implementation manner and application scope. In summary, the contents of this specification should not be construed as limitations on the present application.

Claims (11)

1.一种获取测试日志的方法,其特征在于,应用第一电子设备,所述第一电子设备为搭载有安卓操作系统的电子设备,所述第一电子设备设置有第一服务,所述方法包括:1. a method for acquiring a test log, is characterized in that, applying a first electronic device, the first electronic device is an electronic device equipped with an Android operating system, the first electronic device is provided with a first service, the Methods include: 根据所述第一服务与第二电子设备建立无线传输链路;establishing a wireless transmission link with a second electronic device according to the first service; 通过所述无线传输链路接收所述第二电子设备发送的日志配置信息;receiving log configuration information sent by the second electronic device through the wireless transmission link; 根据所述日志配置信息执行目标测试任务,得到测试日志;Execute the target test task according to the log configuration information to obtain a test log; 通过所述无线传输链路向所述第二电子设备发送所述测试日志。The test log is sent to the second electronic device over the wireless transmission link. 2.根据权利要求1所述的方法,其特征在于,所述根据所述第一服务与第二电子设备建立无线传输链路,包括:2. The method according to claim 1, wherein the establishing a wireless transmission link with the second electronic device according to the first service comprises: 与所述第二电子设备建立有线传输链路;establishing a wired transmission link with the second electronic device; 通过所述有线传输链路向所述第二电子设备发送所述第一电子设备的互联网协议地址,所述互联网协议地址用于所述第二电子设备根据所述互联网协议地址与所述第一电子设备建立所述无线传输链路;Send the internet protocol address of the first electronic device to the second electronic device through the wired transmission link, the internet protocol address is used by the second electronic device to communicate with the first electronic device according to the internet protocol address The electronic device establishes the wireless transmission link; 与所述第二电子设备建立所述无线传输链路。The wireless transmission link is established with the second electronic device. 3.根据权利要求1或2所述的方法,其特征在于,所述根据所述日志配置信息执行目标测试任务,得到测试日志之后,所述向所述第二电子设备发送所述测试日志之前,所述方法还包括:3. The method according to claim 1 or 2, characterized in that, after the target test task is performed according to the log configuration information, after the test log is obtained, before the test log is sent to the second electronic device , the method also includes: 通过所述无线传输链路接收所述第二电子设备发送的日志获取请求。The log acquisition request sent by the second electronic device is received through the wireless transmission link. 4.根据权利要求1-3任一项所述的方法,其特征在于,所述日志配置信息包括数据条件,所述根据所述日志配置信息执行目标测试任务,得到测试日志,包括:4. The method according to any one of claims 1-3, wherein the log configuration information includes data conditions, and the execution of a target test task according to the log configuration information to obtain a test log includes: 根据所述日志配置信息获取至少一个检测数据;Acquire at least one detection data according to the log configuration information; 确定所述至少一个检测数据中不满足所述数据条件的第一数量个检测数据;determining a first number of detection data that does not meet the data condition in the at least one detection data; 根据所述第一数量个检测数据生成所述测试日志。The test log is generated according to the first quantity of detection data. 5.一种获取测试日志的方法,其特征在于,应用第二电子设备,所述方法包括:5. A method for obtaining a test log, wherein the second electronic device is applied, the method comprising: 根据第一电子设备的第一服务与所述第一电子设备建立无线传输链路;establishing a wireless transmission link with the first electronic device according to the first service of the first electronic device; 通过所述无线传输链路向所述第一电子设备发送日志配置信息,所述日志配置信息用于所述第一电子设备根据所述日志配置信息执行目标测试任务,以得到测试日志;Send log configuration information to the first electronic device through the wireless transmission link, where the log configuration information is used by the first electronic device to perform a target test task according to the log configuration information to obtain a test log; 通过所述无线传输链路接收所述第一电子设备发送的所述测试日志。The test log sent by the first electronic device is received through the wireless transmission link. 6.根据权利要求5所述的方法,其特征在于,所述根据第一电子设备的第一服务与所述第一电子设备建立无线传输链路,包括:6. The method according to claim 5, wherein the establishing a wireless transmission link with the first electronic device according to the first service of the first electronic device comprises: 与所述第一电子设备建立有线传输链路;establishing a wired transmission link with the first electronic device; 通过所述有线传输链路接收所述第一电子设备发送的互联网协议地址;Receive an internet protocol address sent by the first electronic device through the wired transmission link; 根据所述互联网协议地址与所述第一电子设备建立所述无线传输链路。The wireless transmission link is established with the first electronic device according to the Internet Protocol address. 7.根据权利要求5或6所述的方法,其特征在于,所述通过所述无线传输链路向所述第一电子设备发送日志配置信息之后,所述通过所述无线传输链路接收所述第一电子设备发送的所述测试日志之前,所述方法还包括:7 . The method according to claim 5 or 6 , wherein after the log configuration information is sent to the first electronic device through the wireless transmission link, the receiving the log configuration information through the wireless transmission link is performed. 8 . Before the test log sent by the first electronic device, the method further includes: 通过所述无线传输链路向所述第一电子设备发送日志获取请求。A log acquisition request is sent to the first electronic device through the wireless transmission link. 8.根据权利要求1-7任一项所述的方法,其特征在于,所述第一服务是安卓调试桥ADB服务。8. The method according to any one of claims 1-7, wherein the first service is an Android Debug Bridge ADB service. 9.一种获取测试日志的装置,其特征在于,应用于第一电子设备,所述第一电子设备为搭载有安卓操作系统的电子设备,所述第一电子设备设置有第一服务,所述获取测试日志的装置包括处理单元和通信单元,其中,9. A device for acquiring a test log, characterized in that it is applied to a first electronic device, the first electronic device is an electronic device equipped with an Android operating system, and the first electronic device is provided with a first service, so The device for obtaining the test log includes a processing unit and a communication unit, wherein, 所述处理单元,用于根据所述第一服务与第二电子设备建立无线传输链路;the processing unit, configured to establish a wireless transmission link with the second electronic device according to the first service; 所述通信单元,用于通过所述无线传输链路接收所述第二电子设备发送的日志配置信息;the communication unit, configured to receive log configuration information sent by the second electronic device through the wireless transmission link; 所述处理单元,还用于根据所述日志配置信息执行目标测试任务,得到测试日志;The processing unit is further configured to execute the target test task according to the log configuration information to obtain a test log; 所述通信单元,还用于通过所述无线传输链路向所述第二电子设备发送所述测试日志。The communication unit is further configured to send the test log to the second electronic device through the wireless transmission link. 10.一种电子设备,其特征在于,包括处理器、存储器、通信接口,以及一个或多个程序,所述一个或多个程序被存储在所述存储器中,并且被配置由所述处理器执行,所述程序包括用于执行如权利要求1-8任一项所述的方法中的步骤的指令。10. An electronic device comprising a processor, a memory, a communication interface, and one or more programs, the one or more programs being stored in the memory and configured by the processor Executing, the program includes instructions for performing the steps in the method of any of claims 1-8. 11.一种计算机可读存储介质,其特征在于,存储用于电子数据交换的计算机程序,其中,所述计算机程序使得计算机执行如权利要求1-8任一项所述的方法。11. A computer-readable storage medium, characterized by storing a computer program for electronic data exchange, wherein the computer program causes a computer to perform the method according to any one of claims 1-8.
CN202010323417.7A 2020-04-22 2020-04-22 Method and related device for acquiring test log Pending CN111343326A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010323417.7A CN111343326A (en) 2020-04-22 2020-04-22 Method and related device for acquiring test log

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010323417.7A CN111343326A (en) 2020-04-22 2020-04-22 Method and related device for acquiring test log

Publications (1)

Publication Number Publication Date
CN111343326A true CN111343326A (en) 2020-06-26

Family

ID=71187800

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010323417.7A Pending CN111343326A (en) 2020-04-22 2020-04-22 Method and related device for acquiring test log

Country Status (1)

Country Link
CN (1) CN111343326A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112559333A (en) * 2020-12-10 2021-03-26 武汉联影医疗科技有限公司 Log production method and device, computer equipment and storage medium
CN114422340A (en) * 2020-10-12 2022-04-29 华为技术有限公司 Log reporting method, electronic device and storage medium
CN114553731A (en) * 2022-02-25 2022-05-27 深圳市普渡科技有限公司 Data log acquisition system, method, device and medium
CN115915241A (en) * 2022-10-31 2023-04-04 中国星网网络应用有限公司 A wireless channel testing method and device
CN116049112A (en) * 2022-05-19 2023-05-02 荣耀终端有限公司 Method and system for multi-device log reporting

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103309784A (en) * 2013-07-09 2013-09-18 美商威睿电通公司 Test system and test method
TWM480070U (en) * 2013-08-22 2014-06-11 Inventec Appliances Corp Parallel testing device
CN104268039A (en) * 2014-09-16 2015-01-07 小米科技有限责任公司 Method, device and system for obtaining maintenance data
CN105472083A (en) * 2015-12-08 2016-04-06 北京奇虎科技有限公司 Testing method and system for wireless terminals
CN106649010A (en) * 2016-11-29 2017-05-10 广东欧珀移动通信有限公司 Terminal device testing method and terminal device
WO2018040604A1 (en) * 2016-09-01 2018-03-08 深圳市中兴微电子技术有限公司 Mobile terminal testing method, apparatus, system, device, and storage medium
CN108337739A (en) * 2018-01-30 2018-07-27 上海商米科技有限公司 Establish method and device, the data processing method of wireless debugging connection
CN109388562A (en) * 2018-09-21 2019-02-26 北京辰森世纪科技股份有限公司 Debug method and device, the system, storage medium, electronic device of pos machine
CN110515794A (en) * 2019-07-26 2019-11-29 Oppo广东移动通信有限公司 Log information capture method, device, electronic device and storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103309784A (en) * 2013-07-09 2013-09-18 美商威睿电通公司 Test system and test method
TWM480070U (en) * 2013-08-22 2014-06-11 Inventec Appliances Corp Parallel testing device
CN104268039A (en) * 2014-09-16 2015-01-07 小米科技有限责任公司 Method, device and system for obtaining maintenance data
CN105472083A (en) * 2015-12-08 2016-04-06 北京奇虎科技有限公司 Testing method and system for wireless terminals
WO2018040604A1 (en) * 2016-09-01 2018-03-08 深圳市中兴微电子技术有限公司 Mobile terminal testing method, apparatus, system, device, and storage medium
CN106649010A (en) * 2016-11-29 2017-05-10 广东欧珀移动通信有限公司 Terminal device testing method and terminal device
CN108337739A (en) * 2018-01-30 2018-07-27 上海商米科技有限公司 Establish method and device, the data processing method of wireless debugging connection
CN109388562A (en) * 2018-09-21 2019-02-26 北京辰森世纪科技股份有限公司 Debug method and device, the system, storage medium, electronic device of pos machine
CN110515794A (en) * 2019-07-26 2019-11-29 Oppo广东移动通信有限公司 Log information capture method, device, electronic device and storage medium

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114422340A (en) * 2020-10-12 2022-04-29 华为技术有限公司 Log reporting method, electronic device and storage medium
CN114422340B (en) * 2020-10-12 2023-10-10 华为技术有限公司 Log reporting methods, electronic equipment and storage media
CN112559333A (en) * 2020-12-10 2021-03-26 武汉联影医疗科技有限公司 Log production method and device, computer equipment and storage medium
CN114553731A (en) * 2022-02-25 2022-05-27 深圳市普渡科技有限公司 Data log acquisition system, method, device and medium
CN116049112A (en) * 2022-05-19 2023-05-02 荣耀终端有限公司 Method and system for multi-device log reporting
CN115915241A (en) * 2022-10-31 2023-04-04 中国星网网络应用有限公司 A wireless channel testing method and device

Similar Documents

Publication Publication Date Title
CN111580671A (en) Video image processing method and related device
US20230041696A1 (en) Image Syntheis Method, Electronic Device, and Non-Transitory Computer-Readable Storage Medium
WO2021000807A1 (en) Processing method and apparatus for waiting scenario in application
CN111343326A (en) Method and related device for acquiring test log
CN111563466B (en) Face detection methods and related products
US12490326B2 (en) Data download method, apparatus, and terminal device
WO2020024108A1 (en) Application icon display method and terminal
CN111372329A (en) Connection establishing method and terminal equipment
CN114466107A (en) Sound effect control method, device, electronic device, and computer-readable storage medium
CN114727220A (en) Equipment searching method and electronic equipment
WO2022170856A1 (en) Method for establishing connection, and electronic device
CN111556479A (en) Information sharing method and related device
CN111399659A (en) Interface display method and related device
CN113407300B (en) Applied manslaughter assessment methods and related equipment
CN116405594B (en) Voice call method and device
CN116321265B (en) Network quality evaluation method, electronic device and storage medium
CN117056895B (en) Identification method, terminal device, system and storage medium for target device selection
CN117234351B (en) Touch processing method, terminal equipment and storage medium
CN112583651B (en) Method, device and medium for testing applet communication interface
CN112579425B (en) Method, device and medium for testing applet method interface
WO2022007757A1 (en) Cross-device voiceprint registration method, electronic device and storage medium
CN115017498A (en) Operation method and electronic device of applet
CN116382728B (en) Propagation name display method and terminal equipment
CN116087930B (en) Audio ranging methods, equipment, storage media and program products
CN116450026B (en) Method and system for identifying touch operation

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20200626