CN117081949B - Information detection method and electronic equipment - Google Patents

Information detection method and electronic equipment Download PDF

Info

Publication number
CN117081949B
CN117081949B CN202310851375.8A CN202310851375A CN117081949B CN 117081949 B CN117081949 B CN 117081949B CN 202310851375 A CN202310851375 A CN 202310851375A CN 117081949 B CN117081949 B CN 117081949B
Authority
CN
China
Prior art keywords
chip
data
service
electronic device
data packet
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.)
Active
Application number
CN202310851375.8A
Other languages
Chinese (zh)
Other versions
CN117081949A (en
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.)
Honor Device Co Ltd
Original Assignee
Honor Device Co 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 Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202310851375.8A priority Critical patent/CN117081949B/en
Publication of CN117081949A publication Critical patent/CN117081949A/en
Application granted granted Critical
Publication of CN117081949B publication Critical patent/CN117081949B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/02Capturing of monitoring data
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/04Processing captured monitoring data, e.g. for logfile generation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/72409User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality by interfacing with external accessories
    • H04M1/72412User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality by interfacing with external accessories using two-way short-range wireless interfaces

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Human Computer Interaction (AREA)
  • Data Mining & Analysis (AREA)
  • Telephone Function (AREA)

Abstract

The application provides an information detection method and electronic equipment, which relate to the field of electronic equipment and are applied to first electronic equipment, wherein the first electronic equipment comprises a first chip and a second chip, and the method comprises the following steps: under the condition that a user executes an operation for a first service, the first chip sends a first data packet of the first service to the second chip, wherein the first data packet is used for indicating that the first service needs to be executed by a first application; the second chip requests the first application to execute a first service according to the first data packet; responding to the execution of the first application on the first service, and sending a second data packet of the first service to the first chip by the second chip; the second chip determines first information characterizing data traffic of the first service, wherein the first information is determined from the first data packet and the second data packet. The scheme can realize the detection of the data packet in the dual-core communication channel.

Description

一种信息检测方法及电子设备Information detection method and electronic device

技术领域Technical Field

本申请涉及电子设备技术领域,尤其涉及一种信息检测方法及电子设备。The present application relates to the technical field of electronic equipment, and in particular to an information detection method and electronic equipment.

背景技术Background Art

当前,不管是电子设备之间的蓝牙通信还是双核通信,通信的通道能力是有限的。当多个业务需要同时占用通道时,有可能会遇到通道超负荷导致的一系列问题。Currently, whether it is Bluetooth communication or dual-core communication between electronic devices, the communication channel capacity is limited. When multiple services need to occupy the channel at the same time, a series of problems caused by channel overload may occur.

以手机与手表之间的通信为例,若是手机与手表之间的蓝牙通信,手机侧会有主机控制接口(Host controller Interface,HCI)日志或蓝牙空口,对通道进行监控。但手机与手表之间的双核通信缺乏对通道监控的方式,并且手表的存储和处理能力也有限,无法像手机的HCI日志一样,存储每个业务的数据包的所有信息。Take the communication between a mobile phone and a watch as an example. If the communication between the mobile phone and the watch is Bluetooth, the mobile phone side will have a host controller interface (HCI) log or Bluetooth air interface to monitor the channel. However, the dual-core communication between the mobile phone and the watch lacks a way to monitor the channel, and the storage and processing capabilities of the watch are also limited. It is impossible to store all the information of each service data packet like the HCI log of the mobile phone.

发明内容Summary of the invention

本申请实施例提供一种信息检测方法及电子设备,用于实现对双核通信通道中数据包的检测,可以根据统计的信息对业务进行调整,以使各个业务可以协调正常的运行。The embodiments of the present application provide an information detection method and an electronic device for realizing the detection of data packets in a dual-core communication channel, and can adjust services according to statistical information so that various services can coordinate and operate normally.

为达到上述目的,本申请的实施例采用如下技术方案:To achieve the above objectives, the embodiments of the present application adopt the following technical solutions:

第一方面,提供了一种信息检测方法,该方法可以应用于第一电子设备,第一电子设备包括第一芯片与第二芯片,该方法包括:在用户针对第一业务执行的操作的情况下,第一芯片向第二芯片发送第一业务的第一数据包,其中,第一数据包用于指示第一业务需要由第一应用执行;第二芯片根据第一数据包,请求第一应用执行第一业务;响应于第一应用对第一业务的执行,第二芯片向第一芯片发送第一业务的第二数据包;第二芯片确定用于表征第一业务的数据流量的第一信息,其中,第一信息是根据第一数据包和第二数据包确定的。In a first aspect, an information detection method is provided, which can be applied to a first electronic device, wherein the first electronic device includes a first chip and a second chip, and the method includes: when a user performs an operation on a first service, the first chip sends a first data packet of the first service to the second chip, wherein the first data packet is used to indicate that the first service needs to be executed by a first application; the second chip requests the first application to execute the first service based on the first data packet; in response to the execution of the first service by the first application, the second chip sends a second data packet of the first service to the first chip; the second chip determines first information used to characterize the data flow of the first service, wherein the first information is determined based on the first data packet and the second data packet.

通过采用该技术方案,可以通过从双核通信的从芯片中提取业务消息的相关信息,实现对双核通信通道的检测,可以对提取的信息进行统计与分析,进而根据统计的信息对业务进行调整,以保证各业务可以协调正常的运行。By adopting this technical solution, the dual-core communication channel can be detected by extracting relevant information of business messages from the dual-core communication chip. The extracted information can be counted and analyzed, and the business can be adjusted according to the statistical information to ensure that each business can coordinate and operate normally.

在一种可能的实现方式中,第一信息包括如下至少一项:接收流量的信息、或发送流量的信息,其中,接收流量的信息为根据第一数据包确定,发送流量的信息为根据第二数据包确定。这里的接收流量的信息是由从芯片接收的第一业务的第一数据流量的信息;发送流量的信息由从芯片发送的第一业务的第二数据流量的信息。In a possible implementation, the first information includes at least one of the following: information about received traffic or information about sent traffic, wherein the information about received traffic is determined according to the first data packet, and the information about sent traffic is determined according to the second data packet. The information about received traffic here is information about the first data traffic of the first service received from the chip; the information about sent traffic is information about the second data traffic of the first service sent from the chip.

在一种可能的实现方式中,接收流量是根据第一数据包的目的地址为第二芯片确定。In a possible implementation, the received traffic is determined for the second chip according to a destination address of the first data packet.

在一种可能的实现方式中,接收流量的信息包括如下至少一项:接收的数据包的数目(接收包数)、或接收的数据包对应的数据量(接收数据长度),其中,接收的数据包包括第一数据包。In one possible implementation, the information of the received traffic includes at least one of the following: the number of received data packets (received packet number), or the amount of data corresponding to the received data packets (received data length), wherein the received data packets include the first data packet.

在一种可能的实现方式中,发送流量是根据第二数据包的源地址为第二芯片确定。In a possible implementation, the sending traffic is determined for the second chip according to a source address of the second data packet.

在一种可能的实现方式中,发送流量的信息包括如下至少一项:发送的数据包的数目(发送包数)、或发送的数据包对应的数据量(发送数据长度),其中,发送的数据包包括第二数据包。In a possible implementation, the information of the sent traffic includes at least one of the following: the number of sent data packets (sent packet number), or the amount of data corresponding to the sent data packets (sent data length), wherein the sent data packets include the second data packet.

在一种可能的实现方式中,该方法还包括:响应于第二电子设备执行第一业务的请求,第二芯片向第一芯片发送第三数据包,其中,第三数据包用于指示第一业务请求被执行的业务需求;第一芯片根据第三数据包,确定第一数据包。In one possible implementation, the method further includes: in response to a request from the second electronic device to execute the first service, the second chip sends a third data packet to the first chip, wherein the third data packet is used to indicate the service requirement for the first service request to be executed; and the first chip determines the first data packet based on the third data packet.

在一种可能的实现方式中,第一信息还根据第三数据包确定。In a possible implementation manner, the first information is also determined according to the third data packet.

在一种可能的实现方式中,发送流量还根据第三数据包的源地址为第二芯片确定。In a possible implementation manner, the sending traffic is also determined for the second chip according to the source address of the third data packet.

在一种可能的实现方式中,发送的数据包还包括第三数据包。In a possible implementation manner, the sent data packet also includes a third data packet.

在一种可能的实现方式中,该方法还包括:第一芯片检测到用户针对第一业务执行的操作。也就是说,可以是第二电子设备响应于用户操作去请求执行第一应用上的第一业务,也可以使第一电子设备的主芯片响应于用户操作去请求执行第一应用上的第一业务。In a possible implementation, the method further includes: the first chip detects an operation performed by a user on the first service. That is, the second electronic device may request to execute the first service on the first application in response to the user operation, or the main chip of the first electronic device may request to execute the first service on the first application in response to the user operation.

在一种可能的实现方式中,该方法还包括:第二芯片根据第一信息,确定第一电子设备上运行的业务的总数目;第二芯片根据第一电子设备上运行的业务的总数目,对第一电子设备上运行的业务的运行进行调度。In a possible implementation, the method also includes: the second chip determines the total number of services running on the first electronic device based on the first information; and the second chip schedules the operation of the services running on the first electronic device based on the total number of services running on the first electronic device.

在一种可能的实现方式中,第二芯片根据第一电子设备上运行的业务的总数目,对第一电子设备上运行的业务的运行进行调度,包括:若第一电子设备上运行的业务的总数目超过数目阈值,则第二芯片将第一电子设备上运行的业务中除第一业务以外的其他业务停止运行。由此,可以应用于依赖双核通信的业务性能专项攻克中,可以排查影响性能的时间点和原因In one possible implementation, the second chip schedules the operation of the services running on the first electronic device according to the total number of services running on the first electronic device, including: if the total number of services running on the first electronic device exceeds a threshold, the second chip stops the operation of services other than the first service running on the first electronic device. This can be applied to the special project of service performance that relies on dual-core communication, and can identify the time points and reasons that affect performance.

在一种可能的实现方式中,该方法还包括:第二芯片根据第一信息,确定第一电子设备上运行的业务的总数据流量,其中,总数据流量与第二芯片的主频的频率正相关。由此可以根据总数据流量动态调整主频频率,合理的利用系统资源。In a possible implementation, the method further includes: the second chip determines the total data flow of the service running on the first electronic device according to the first information, wherein the total data flow is positively correlated with the frequency of the main frequency of the second chip. Thus, the main frequency can be dynamically adjusted according to the total data flow, and system resources can be reasonably used.

在一种可能的实现方式中,该方法还包括:总数据流量是由如下至少一项表征:第二芯片接收和/或发送的数据包的总数目、或第二芯片接收和/或发送的数据包对应的总数据量。In a possible implementation, the method further includes: the total data traffic is characterized by at least one of the following: the total number of data packets received and/or sent by the second chip, or the total data volume corresponding to the data packets received and/or sent by the second chip.

在一种可能的实现方式中,该方法还包括:若第一业务的数据流量小于流量阈值,则第二芯片上报第一业务的异常信息。由此,可以对通道状态进行监控,防止通道异常时,难以定位。In a possible implementation, the method further includes: if the data flow of the first service is less than the flow threshold, the second chip reports abnormal information of the first service. Thus, the channel status can be monitored to prevent the channel from being difficult to locate when it is abnormal.

在一种可能的实现方式中,第一业务的数据流量小于流量阈值是指:第一业务在预设时长内接收和/或发送的数据包数目小于数据包数目阈值,和/或,第一业务在预设时长内接收和/或发送的数据包对应的数据量小于数据量阈值。In one possible implementation, the data traffic of the first service is less than the traffic threshold value means that: the number of data packets received and/or sent by the first service within a preset time period is less than the data packet number threshold value, and/or the data volume corresponding to the data packets received and/or sent by the first service within the preset time period is less than the data volume threshold value.

在一种可能的实现方式中,该方法还包括:第二芯片根据第一信息,确定第一业务的数据包的丢包数目;若第一业务的数据包的丢包数目大于丢包数目阈值,则第二芯片上报第二芯片与其他电子设备的通信异常。由此,可以辅助定位丢包的具体位置。In a possible implementation, the method further includes: the second chip determines the number of lost packets of the first service data packets according to the first information; if the number of lost packets of the first service data packets is greater than the packet loss number threshold, the second chip reports that the communication between the second chip and other electronic devices is abnormal. Thus, the specific location of the packet loss can be assisted.

第二方面,本申请提供一种电子设备,该电子设备包括:通信模块、存储器和一个或多个处理器;通信模块、存储器和处理器耦合;存储器用于存储计算机程序代码,计算机程序代码包括计算机指令,当计算机指令被所述电子设备执行时,使得电子设备执行上述第一方面中任一项所述的方法。In a second aspect, the present application provides an electronic device, comprising: a communication module, a memory and one or more processors; the communication module, the memory and the processor are coupled; the memory is used to store computer program code, the computer program code includes computer instructions, and when the computer instructions are executed by the electronic device, the electronic device executes any one of the methods described in the first aspect above.

第三方面,本申请提供了一种计算机可读存储介质,该计算机可读存储介质中存储有指令,当其在电子设备上运行时,使得电子设备可以执行上述第一方面中任一项所述的方法。In a third aspect, the present application provides a computer-readable storage medium, which stores instructions, and when the computer-readable storage medium is executed on an electronic device, the electronic device can execute any of the methods described in the first aspect.

第四方面,本申请提供了一种包含指令的计算机程序产品,当其在电子设备上运行时,使得电子设备可以执行上述第一方面中任一项所述的方法。In a fourth aspect, the present application provides a computer program product comprising instructions, which, when executed on an electronic device, enables the electronic device to execute any of the methods described in the first aspect.

可以理解地,上述提供的第二方面所述的电子设备,以及第三方面所述的计算机可读存储介质及第四方面所述的计算机程序产品均用于执行上文所提供的对应的方法,因此,其所能达到的有益效果可参考上文所提供的对应的方法中的有益效果,此处不再赘述。It can be understood that the electronic device described in the second aspect provided above, the computer-readable storage medium described in the third aspect and the computer program product described in the fourth aspect are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be repeated here.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

图1为本申请实施例提供的一种手机与手表通信的场景示意图;FIG1 is a schematic diagram of a scenario of communication between a mobile phone and a watch provided in an embodiment of the present application;

图2为本申请实施例提供的一种电子设备的硬件结构示意图;FIG2 is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application;

图3为本申请实施例提供的一种信息检测方法的整体实现示意图;FIG3 is a schematic diagram of an overall implementation of an information detection method provided in an embodiment of the present application;

图4为本申请实施例提供的一种第一电子设备与第二电子设备双核通信的信息检测方法的示意图;FIG4 is a schematic diagram of an information detection method for dual-core communication between a first electronic device and a second electronic device provided by an embodiment of the present application;

图5为本申请实施例提供的一种电子设备双核通信的软件架构图;FIG5 is a software architecture diagram of dual-core communication of an electronic device provided in an embodiment of the present application;

图6为本申请实施例提供的一种芯片系统的结构示意图。FIG6 is a schematic diagram of the structure of a chip system provided in an embodiment of the present application.

具体实施方式DETAILED DESCRIPTION

下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本申请保护的范围。The following will describe the technical solutions in the embodiments of the present application in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this application.

需要说明的是,以下术语“第一”、“第二”等仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”等的特征可以明示或者隐含地包括一个或者更多个该特征。此外,术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或设备固有的其它步骤或单元。It should be noted that the following terms "first", "second", etc. are only used for descriptive purposes and should not be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Thus, features defined as "first", "second", etc. may explicitly or implicitly include one or more of the features. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or devices.

在本说明书中描述的参考“一个实施例”或“一些实施例”等意味着在本申请的一个或多个实施例中包括结合该实施例描述的特定特征、结构或特点。由此,在本说明书中的不同之处出现的语句“在一个实施例中”、“在一些实施例中”、“在其他一些实施例中”、“在另外一些实施例中”等不是必然都参考相同的实施例,而是意味着“一个或多个但不是所有的实施例”,除非是以其他方式另外特别强调。References to "one embodiment" or "some embodiments" etc. described in this specification mean that a particular feature, structure or characteristic described in conjunction with the embodiment is included in one or more embodiments of the present application. Thus, the phrases "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. appearing in different places in this specification do not necessarily all refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways.

在本申请实施例中,“示例性的”或者“例如”等词用于表示作例子、例证或说明。本申请实施例中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念。In the embodiments of the present application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a specific way.

当前,不管是电子设备之间的蓝牙通信还是电子设备之间的双核通信,通信的通道能力是有限的。当多个业务需要同时占用通道时,有可能会遇到通道超负荷导致的一系列问题。Currently, whether it is Bluetooth communication between electronic devices or dual-core communication between electronic devices, the communication channel capacity is limited. When multiple services need to occupy the channel at the same time, a series of problems caused by channel overload may be encountered.

请参阅图1,在第一电子设备与第二电子设备通信的场景下,以第一电子设备为可穿戴设备例如手表102,第二电子设备为手机101为例。现有技术中,若是手机与手表之间的蓝牙通信,在手机侧会有主机控制接口(Host controller Interface,HCI)日志或蓝牙空口,用于对通道进行监控。但手机与手表之间的双核通信缺乏对通道监控的方式,并且手表的存储和处理能力也有限,无法像手机的HCI日志一样,存储每个业务的数据包的所有信息。Please refer to Figure 1, in the scenario where the first electronic device communicates with the second electronic device, take the first electronic device as a wearable device such as a watch 102, and the second electronic device as a mobile phone 101 as an example. In the prior art, if it is Bluetooth communication between a mobile phone and a watch, there will be a host controller interface (HCI) log or Bluetooth air port on the mobile phone side to monitor the channel. However, the dual-core communication between the mobile phone and the watch lacks a way to monitor the channel, and the storage and processing capabilities of the watch are also limited. It is impossible to store all the information of the data packet of each service like the HCI log of the mobile phone.

并且,有些特殊的业务需要占用通道的所有能力,以实现业务的高效运行。如手表的空间下载技术(Over-the-Air Technology,OTA)升级场景下,手机向手表的蓝牙芯片发送一个数据包,蓝牙芯片的线程不用处理这个数据包,直接通过双核通道透传给手表的主芯片。也即,此时手表中会停止跟蓝牙相关的其它业务的运行。但有些业务可能会在后台运行又没有相关日志打印,很难排查清除。In addition, some special services need to occupy all the capabilities of the channel to achieve efficient operation of the service. For example, in the Over-the-Air Technology (OTA) upgrade scenario of the watch, the mobile phone sends a data packet to the Bluetooth chip of the watch. The thread of the Bluetooth chip does not need to process this data packet, but directly transmits it to the main chip of the watch through the dual-core channel. That is, at this time, the operation of other Bluetooth-related services in the watch will be stopped. However, some services may run in the background without relevant log printing, which is difficult to troubleshoot and clear.

其中,双核通信是指一般指主核与副核之间的通信,主核的芯片处理能力强一点,副核的芯片处理能力弱一点。主核就是指主芯片,副核就是指从芯片(或者也称为副芯片)。Among them, dual-core communication generally refers to the communication between the main core and the secondary core. The chip processing capability of the main core is stronger, and the chip processing capability of the secondary core is weaker. The main core refers to the main chip, and the secondary core refers to the slave chip (or also called secondary chip).

由此,本申请实施例提供一种信息检测方法及电子设备,通过从双核通信的从芯片中提取业务消息的相关信息,实现对双核通信通道的检测,可以对提取的信息进行统计与分析,进而根据统计的信息对业务进行调整,以保证各业务可以协调正常的运行。Therefore, the embodiment of the present application provides an information detection method and an electronic device, which realizes the detection of the dual-core communication channel by extracting relevant information of the business message from the chip of the dual-core communication. The extracted information can be counted and analyzed, and the business can be adjusted according to the statistical information to ensure that each business can coordinate and operate normally.

示例性的,本申请实施例中的电子设备具体可以是手机、平板电脑、笔记本电脑、超级移动个人计算机(Ultra-mobile Personal Computer,UMPC)、手持计算机、可穿戴电子设备(例如:智能手表,智能手环,智能眼镜)等设备,本申请实施例对该电子设备的具体形态不作特殊限制。Exemplarily, the electronic device in the embodiments of the present application may be a mobile phone, a tablet computer, a laptop computer, an ultra-mobile personal computer (UMPC), a handheld computer, a wearable electronic device (for example, a smart watch, a smart bracelet, smart glasses), etc. The embodiments of the present application do not impose any special restrictions on the specific form of the electronic device.

本申请实施例提供的信息检测方法的执行主体可以为信息检测的装置,该执行装置可以为图2所示的电子设备。同时,该执行装置还可以为该电子设备的中央处理器(Central Processing Unit,CPU),或者该电子设备中的用于信息检测的控制模块。本申请实施例中以电子设备执行信息检测方法为例,说明本申请实施例提供的信息检测方法。The execution subject of the information detection method provided in the embodiment of the present application may be a device for information detection, and the execution device may be the electronic device shown in Figure 2. At the same time, the execution device may also be a central processing unit (CPU) of the electronic device, or a control module for information detection in the electronic device. In the embodiment of the present application, the information detection method provided in the embodiment of the present application is described by taking the execution of the information detection method by the electronic device as an example.

下面将结合附图对本申请实施例的实施方式进行详细描述。以上述电子设备是手机为例,介绍电子设备(如电子设备200)的硬件结构。其中,图2所示的电子设备200仅仅是电子设备的一个范例,并且电子设备200可以具有比图中所示出的更多的或者更少的部件,可以组合两个或更多的部件,或者可以具有不同的部件配置。图2中所示出的各种部件可以在包括一个或多个信号处理和/或专用集成电路在内的硬件、软件、或硬件和软件的组合中实现。The following will describe in detail the implementation of the embodiments of the present application in conjunction with the accompanying drawings. Taking the above-mentioned electronic device as a mobile phone as an example, the hardware structure of the electronic device (such as the electronic device 200) is introduced. Among them, the electronic device 200 shown in Figure 2 is only an example of an electronic device, and the electronic device 200 may have more or fewer components than those shown in the figure, may combine two or more components, or may have different component configurations. The various components shown in Figure 2 can be implemented in hardware, software, or a combination of hardware and software including one or more signal processing and/or application-specific integrated circuits.

请参阅图2,图2示出了电子设备的硬件结构示意图,如图2所示,电子设备200可以包括:处理器210,外部存储器接口220,内部存储器221,USB接口230,充电管理模块240,电源管理模块241,电池242,天线1,天线2,移动通信模块250,无线通信模块260,音频模块270,扬声器270A,受话器270B,麦克风270C,耳机接口270D,传感器模块280,按键290,马达291,指示器292,摄像头293,显示屏294,以及用户标识模块(subscriber identificationmodule,SIM)卡接口295等。Please refer to Figure 2, which shows a schematic diagram of the hardware structure of the electronic device. As shown in Figure 2, the electronic device 200 may include: a processor 210, an external memory interface 220, an internal memory 221, a USB interface 230, a charging management module 240, a power management module 241, a battery 242, an antenna 1, an antenna 2, a mobile communication module 250, a wireless communication module 260, an audio module 270, a speaker 270A, a receiver 270B, a microphone 270C, an earphone interface 270D, a sensor module 280, a button 290, a motor 291, an indicator 292, a camera 293, a display screen 294, and a subscriber identification module (SIM) card interface 295, etc.

其中,上述传感器模块280可以包括压力传感器,陀螺仪传感器,气压传感器,磁传感器,加速度传感器,距离传感器,接近光传感器,指纹传感器,温度传感器,触摸传感器,环境光传感器和骨传导传感器等传感器。Among them, the above-mentioned sensor module 280 may include sensors such as pressure sensor, gyroscope sensor, air pressure sensor, magnetic sensor, acceleration sensor, distance sensor, proximity light sensor, fingerprint sensor, temperature sensor, touch sensor, ambient light sensor and bone conduction sensor.

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

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

可以理解的是,本申请实施例示意的结构并不构成对电子设备200的具体限定。在另一些实施例中,电子设备200可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 200. In other embodiments, the electronic device 200 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

处理器210可以包括一个或多个处理单元,例如:处理器210可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processingunit,GPU),图像信号处理器(image signal processor,ISP),控制器,存储器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。The processor 210 may include one or more processing units, for example, the processor 210 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and/or a neural-network processing unit (NPU), etc. Among them, different processing units may be independent devices or integrated in one or more processors.

控制器可以是电子设备200的神经中枢和指挥中心。控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。The controller may be the nerve center and command center of the electronic device 200. The controller may generate an operation control signal according to the instruction operation code and the timing signal to complete the control of fetching and executing instructions.

处理器210中还可以设置存储器,用于存储指令和数据。在一些实施例中,处理器210中的存储器为高速缓冲存储器。该存储器可以保存处理器210刚用过或循环使用的指令或数据。如果处理器210需要再次使用该指令或数据,可从所述存储器中直接调用。避免了重复存取,减少了处理器210的等待时间,因而提高了系统的效率。The processor 210 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 210 is a cache memory. The memory may store instructions or data that the processor 210 has just used or cyclically used. If the processor 210 needs to use the instruction or data again, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 210, and thus improves the efficiency of the system.

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

I2C接口是一种双向同步串行总线,包括一根串行数据线(serial data line,SDL)和一根串行时钟线(derailclock line,SCL)。在一些实施例中,处理器210可以包含多组I2C总线。处理器210可以通过不同的I2C总线接口分别耦合触摸传感器280K,充电器,闪光灯,摄像头293等。例如:处理器210可以通过I2C接口耦合触摸传感器280K,使处理器210与触摸传感器280K通过I2C总线接口通信,实现电子设备200的触摸功能。The I2C interface is a bidirectional synchronous serial bus, including a serial data line (SDL) and a serial clock line (SCL). In some embodiments, the processor 210 may include multiple groups of I2C buses. The processor 210 may be coupled to the touch sensor 280K, the charger, the flash, the camera 293, etc. through different I2C bus interfaces. For example: the processor 210 may be coupled to the touch sensor 280K through the I2C interface, so that the processor 210 communicates with the touch sensor 280K through the I2C bus interface to realize the touch function of the electronic device 200.

I2S接口可以用于音频通信。在一些实施例中,处理器210可以包含多组I2S总线。处理器210可以通过I2S总线与音频模块270耦合,实现处理器210与音频模块270之间的通信。在一些实施例中,音频模块270可以通过I2S接口向无线通信模块260传递音频信号,实现通过蓝牙耳机接听电话的功能。The I2S interface can be used for audio communication. In some embodiments, the processor 210 can include multiple groups of I2S buses. The processor 210 can be coupled to the audio module 270 via the I2S bus to achieve communication between the processor 210 and the audio module 270. In some embodiments, the audio module 270 can transmit an audio signal to the wireless communication module 260 via the I2S interface to achieve the function of answering a call through a Bluetooth headset.

PCM接口也可以用于音频通信,将模拟信号抽样,量化和编码。在一些实施例中,音频模块270与无线通信模块260可以通过PCM总线接口耦合。在一些实施例中,音频模块270也可以通过PCM接口向无线通信模块260传递音频信号,实现通过蓝牙耳机接听电话的功能。所述I2S接口和所述PCM接口都可以用于音频通信,两种接口的采样速率不同。The PCM interface can also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, the audio module 270 and the wireless communication module 260 can be coupled via a PCM bus interface. In some embodiments, the audio module 270 can also transmit audio signals to the wireless communication module 260 via the PCM interface to realize the function of answering calls via a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication, and the sampling rates of the two interfaces are different.

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

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

GPIO接口可以通过软件配置。GPIO接口可以配置为控制信号,也可配置为数据信号。在一些实施例中,GPIO接口可以用于连接处理器210与摄像头293,显示屏294,无线通信模块260,音频模块270,传感器模块280等。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 can be used to connect the processor 210 with the camera 293, the display 294, the wireless communication module 260, the audio module 270, the sensor module 280, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.

USB接口230可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口230可以用于连接充电器为电子设备200充电,也可以用于电子设备200与外围设备之间传输数据。也可以用于连接耳机,通过耳机播放音频。还可以用于连接其他电子设备,例如AR设备等。The USB interface 230 may be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 230 may be used to connect a charger to charge the electronic device 200, or may be used to transmit data between the electronic device 200 and a peripheral device. The USB interface 230 may also be used to connect headphones to play audio through the headphones. The USB interface 230 may also be used to connect other electronic devices, such as AR devices, etc.

可以理解的是,本实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对电子设备200的结构限定。在另一些实施例中,电子设备200也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。It is understandable that the interface connection relationship between the modules illustrated in this embodiment is only a schematic illustration and does not constitute a structural limitation on the electronic device 200. In other embodiments, the electronic device 200 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.

充电管理模块240用于从充电器接收充电输入。其中,充电器在本申请实施例中是有线充电器,充电管理模块240可以通过USB接口230(即上述的充电接口)接收有线充电器的充电输入。充电管理模块240为电池442充电的同时,还可以通过电源管理模块441为电子设备供电。The charging management module 240 is used to receive charging input from a charger. In the embodiment of the present application, the charger may be a wired charger, and the charging management module 240 may receive charging input from the wired charger through the USB interface 230 (i.e., the above-mentioned charging interface). While the charging management module 240 is charging the battery 442, it may also power the electronic device through the power management module 441.

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

电子设备200的无线通信功能可以通过天线1,天线2,移动通信模块250,无线通信模块260,调制解调处理器以及基带处理器等实现。The wireless communication function of the electronic device 200 can be implemented through the antenna 1, the antenna 2, the mobile communication module 250, the wireless communication module 260, the modem processor and the baseband processor.

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

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

移动通信模块250可以提供应用在电子设备200上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块250可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块250可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。The mobile communication module 250 can provide solutions for wireless communications including 2G/3G/4G/5G, etc., applied to the electronic device 200. The mobile communication module 250 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 250 can receive electromagnetic waves from the antenna 1, and filter, amplify, etc. the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation.

移动通信模块250还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块250的至少部分功能模块可以被设置于处理器210中。在一些实施例中,移动通信模块250的至少部分功能模块可以与处理器210的至少部分模块被设置在同一个器件中。The mobile communication module 250 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some functional modules of the mobile communication module 250 can be set in the processor 210. In some embodiments, at least some functional modules of the mobile communication module 250 can be set in the same device as at least some modules of the processor 210.

无线通信模块260可以提供应用在电子设备200上的包括无线局域网(wirelesslocal area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT),全球导航卫星系统(global navigation satellite system,GNSS),调频(frequency modulation,FM),近距离无线通信技术(near field communication,NFC),红外技术(infrared,IR)等无线通信的解决方案。例如,本申请实施例中,电子设备200可以通过无线通信模块260接入Wi-Fi网络。The wireless communication module 260 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 200. For example, in the embodiment of the present application, the electronic device 200 can access the Wi-Fi network through the wireless communication module 260.

无线通信模块260可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块260经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器210。无线通信模块260还可以从处理器210接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。The wireless communication module 260 may be one or more devices integrating at least one communication processing module. The wireless communication module 260 receives electromagnetic waves via the antenna 2, modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 210. The wireless communication module 260 may also receive signals to be sent from the processor 210, modulate the frequencies of the signals, amplify the signals, and convert the signals into electromagnetic waves for radiation via the antenna 2.

在一些实施例中,电子设备200的天线1和移动通信模块250耦合,天线2和无线通信模块260耦合,使得电子设备200可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括全球移动通讯系统(global system for mobile communications,GSM),通用分组无线服务(general packet radio service,GPRS),码分多址接入(codedivision multiple access,CDMA),宽带码分多址(wideband code division multipleaccess,WCDMA),时分码分多址(time-divisioncode division multiple access,TD-SCDMA),长期演进(long term evolution,LTE),BT,GNSS,WLAN,NFC,FM,和/或IR技术等。所述GNSS可以包括全球卫星定位系统(global positioning system,GPS),全球导航卫星系统(global navigation sate llite 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 200 is coupled to the mobile communication module 250, and the antenna 2 is coupled to the wireless communication module 260, so that the electronic device 200 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 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 navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and/or a satellite based augmentation system (SBAS).

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

显示屏294用于显示图像,视频等。该显示屏294包括显示面板。显示面板可以采用液晶显示屏(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)等。在一些实施例中,电子设备200可以包括1个或N个显示屏294,N为大于1的正整数。The display screen 294 is used to display images, videos, etc. The display screen 294 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 (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 200 may include 1 or N display screens 294, where N is a positive integer greater than 1.

本申请实施例中,显示屏294可用于显示电子设备的界面。显示屏294可以用于显示电子设备的系统桌面,电子设备的系统桌面可以包括多个应用图标。应用图标可以在显示屏294的不同位置进行显示,即构成了电子设备的系统桌面的布局。In the embodiment of the present application, the display screen 294 can be used to display the interface of the electronic device. The display screen 294 can be used to display the system desktop of the electronic device, and the system desktop of the electronic device can include multiple application icons. The application icons can be displayed at different positions of the display screen 294, that is, they constitute the layout of the system desktop of the electronic device.

电子设备200可以通过ISP,摄像头293,视频编解码器,GPU,显示屏294以及应用处理器等实现拍摄功能。The electronic device 200 can realize the shooting function through ISP, camera 293, video codec, GPU, display screen 294 and application processor.

ISP用于处理摄像头293反馈的数据。例如,拍照时,打开快门,光线通过镜头被传递到摄像头感光元件上,光信号转换为电信号,摄像头感光元件将所述电信号传递给ISP处理,转化为肉眼可见的图像。ISP还可以对图像的噪点,亮度,肤色进行算法优化。ISP还可以对拍摄场景的曝光,色温等参数优化。在一些实施例中,ISP可以设置在摄像头293中。The ISP is used to process the data fed back by the camera 293. For example, when taking a photo, the shutter is opened, and 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. The ISP can also perform algorithm optimization on the noise, brightness, and skin color of the image. The ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, the ISP can be set in the camera 293.

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

数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当电子设备200在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。The digital signal processor is used to process digital signals, and can process not only digital image signals but also other digital signals. For example, when the electronic device 200 is selecting a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.

视频编解码器用于对数字视频压缩或解压缩。电子设备200可以支持一种或多种视频编解码器。这样,电子设备200可以播放或录制多种编码格式的视频,例如:动态图像专家组(moving picture experts group,MPEG)1,MPEG2,MPEG3,MPEG4等。Video codecs are used to compress or decompress digital videos. The electronic device 200 may support one or more video codecs. Thus, the electronic device 200 may play or record videos in a variety of coding formats, such as moving picture experts group (MPEG) 1, MPEG2, MPEG3, MPEG4, etc.

NPU为神经网络(neural-network,NN)计算处理器,通过借鉴生物神经网络结构,例如借鉴人脑神经元之间传递模式,对输入信息快速处理,还可以不断的自学习。通过NPU可以实现电子设备200的智能认知等应用,例如:图像识别,人脸识别,语音识别,文本理解等。NPU is a neural network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission mode between neurons in the human brain, it can quickly process input information and can also continuously self-learn. Through NPU, applications such as intelligent cognition of the electronic device 200 can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.

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

内部存储器221可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。处理器210通过运行存储在内部存储器221的指令,从而执行电子设备200的各种功能应用以及数据处理。例如,在本申请实施例中,处理器210可以通过执行存储在内部存储器221中的指令,内部存储器221可以包括存储程序区和存储数据区。The internal memory 221 may be used to store computer executable program codes, which include instructions. The processor 210 executes various functional applications and data processing of the electronic device 200 by running the instructions stored in the internal memory 221. For example, in an embodiment of the present application, the processor 210 may execute the instructions stored in the internal memory 221, and the internal memory 221 may include a program storage area and a data storage area.

其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。存储数据区可存储电子设备200使用过程中所创建的数据(比如音频数据,电话本等)等。此外,内部存储器221可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件,闪存器件,通用闪存存储器(universalflash storage,UFS)等。The program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device 200 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 221 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc.

电子设备200可以通过音频模块270,扬声器270A,受话器270B,麦克风270C,耳机接口270D,以及应用处理器等实现音频功能。例如音乐播放,录音等。The electronic device 200 can implement audio functions such as music playing and recording through the audio module 270, the speaker 270A, the receiver 270B, the microphone 270C, the headphone jack 270D, and the application processor.

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

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

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

麦克风270C,也称“话筒”,“传声器”,用于将声音信号转换为电信号。当拨打电话或发送语音信息时,用户可以通过人嘴靠近麦克风270C发声,将声音信号输入到麦克风270C。电子设备200可以设置至少一个麦克风270C。在一些实施例中,电子设备200可以设置两个麦克风270C,除了采集声音信号,还可以实现降噪功能。在一些实施例中,电子设备200还可以设置三个,四个或更多麦克风270C,实现采集声音信号,降噪,还可以识别声音来源,实现定向录音功能等。本申请实施例中,在开启语音控制功能后,在支持的视频应用内,电子设备可以通过麦克风接收到用户的语音信息。Microphone 270C, also called "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to the microphone 270C to input the sound signal into the microphone 270C. The electronic device 200 can be provided with at least one microphone 270C. In some embodiments, the electronic device 200 can be provided with two microphones 270C, which can not only collect sound signals but also realize noise reduction function. In some embodiments, the electronic device 200 can also be provided with three, four or more microphones 270C to realize the collection of sound signals, noise reduction, identification of sound sources, realization of directional recording function, etc. In an embodiment of the present application, after the voice control function is turned on, in the supported video application, the electronic device can receive the user's voice information through the microphone.

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

按键290包括开机键,音量键等。按键290可以是机械按键。也可以是触摸式按键。电子设备200接收按键290输入,产生与电子设备200的用户设置以及功能控制有关的键信号输入。The key 290 includes a power key, a volume key, etc. The key 290 may be a mechanical key or a touch key. The electronic device 200 receives the key 290 input and generates a key signal input related to the user settings and function control of the electronic device 200.

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

指示器292可以是指示灯,可以用于指示充电状态,电量变化,也可以用于指示消息,未接来电,通知等。Indicator 292 may be an indicator light, which may be used to indicate charging status, power changes, messages, missed calls, notifications, etc.

SIM卡接口295用于连接SIM卡。SIM卡可以通过插入SIM卡接口295,或从SIM卡接口295拔出,实现和电子设备200的接触和分离。电子设备200可以支持1个或N个SIM卡接口,N为大于1的正整数。SIM卡接口295可以支持Nano SIM卡,Micro SIM卡,SIM卡等。The SIM card interface 295 is used to connect a SIM card. The SIM card can be connected to or disconnected from the electronic device 200 by inserting the SIM card interface 295 or pulling the SIM card interface 295 out. The electronic device 200 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 295 can support Nano SIM cards, Micro SIM cards, SIM cards, etc.

以下实施例中的方法均可以在具有上述硬件结构的电子设备200中实现。同一个SIM卡接口295可以同时插入多张卡。所述多张卡的类型可以相同,也可以不同。SIM卡接口295也可以兼容不同类型的SIM卡。SIM卡接口295也可以兼容外部存储卡。电子设备200通过SIM卡和网络交互,实现通话以及数据通信等功能。在一些实施例中,电子设备200采用eSIM,即嵌入式SIM卡。eSIM卡可以嵌在电子设备200中,不能和电子设备200分离。The methods in the following embodiments can all be implemented in an electronic device 200 having the above-mentioned hardware structure. Multiple cards can be inserted into the same SIM card interface 295 at the same time. The types of the multiple cards can be the same or different. The SIM card interface 295 can also be compatible with different types of SIM cards. The SIM card interface 295 can also be compatible with external memory cards. The electronic device 200 interacts with the network through the SIM card to implement functions such as calls and data communications. In some embodiments, the electronic device 200 uses an eSIM, that is, an embedded SIM card. The eSIM card can be embedded in the electronic device 200 and cannot be separated from the electronic device 200.

尽管图2未示出,电子设备200还可以闪光灯、微型投影装置、近场通信(NearFieldCommunication,NFC)装置等,在此不再赘述。Although not shown in FIG. 2 , the electronic device 200 may also include a flash, a micro-projection device, a near field communication (NFC) device, etc., which will not be described in detail herein.

以下实施例中的方法均可以在具有上述硬件结构的电子设备200中实现。The methods in the following embodiments can all be implemented in the electronic device 200 having the above hardware structure.

本申请实施例提供了一种信息检测方法及电子设备,可以对电子设备的双核通信通道进行检测。其中,双核通信可以是两个电子设备之间的通信,也可以是单个电子设备中的通信。The embodiment of the present application provides an information detection method and an electronic device, which can detect a dual-core communication channel of an electronic device. The dual-core communication can be communication between two electronic devices or communication in a single electronic device.

在两个电子设备进行双核通信的场景下,第一电子设备可以为可穿戴设备例如手表,第二电子设备可以为手机。其中,第一电子设备中包含有第一芯片与第二芯片。可以设第一芯片为主芯片,第二芯片为从芯片。主芯片一般是指微控制器(MicrocontrollerUnit,MCU)芯片。从芯片可以是蓝牙芯片,例如BES芯片,也可以是如MODEM芯片等。In the scenario where two electronic devices perform dual-core communication, the first electronic device may be a wearable device such as a watch, and the second electronic device may be a mobile phone. The first electronic device includes a first chip and a second chip. The first chip may be a master chip and the second chip may be a slave chip. The master chip generally refers to a microcontroller unit (MCU) chip. The slave chip may be a Bluetooth chip, such as a BES chip, or a MODEM chip.

以从芯片为蓝牙芯片为例。第一电子设备与第二电子设备之间建立了无线连接,可以是例如蓝牙连接。第一电子设备与第二电子设备进行双核通信,也即第一电子设备与第二电子设备之间进行业务消息的交互。一般来说,第一电子设备与第二电子设备之间运行的业务为透传业务。在第二电子设备上发起的业务都要先通过给第一电子设备的主芯片发送消息,主芯片根据业务需求确定是否要发送消息给从芯片去进行对应业务的处理。在第二电子设备给第一电子设备的主芯片发送消息的过程中,又是先向第一电子设备的从芯片发送消息,从芯片再将消息透传给主芯片。Take the slave chip as a Bluetooth chip as an example. A wireless connection is established between the first electronic device and the second electronic device, which can be, for example, a Bluetooth connection. The first electronic device and the second electronic device perform dual-core communication, that is, the first electronic device and the second electronic device interact with each other in business messages. Generally speaking, the business running between the first electronic device and the second electronic device is a transparent transmission business. The business initiated on the second electronic device must first send a message to the main chip of the first electronic device, and the main chip determines whether to send a message to the slave chip to process the corresponding business based on business needs. In the process of the second electronic device sending a message to the main chip of the first electronic device, it first sends a message to the slave chip of the first electronic device, and the slave chip then transparently transmits the message to the main chip.

可以理解的是,由于从芯片的处理能力有限,第二电子设备不会直接给从芯片发送消息请求处理,也即消息目的不会是从芯片。从芯片只是用来将消息透传给主芯片,主芯片解析消息后,确定是否需要再发送消息给从芯片处理,或者是主芯片直接处理。It is understandable that due to the limited processing capability of the slave chip, the second electronic device will not directly send a message request to the slave chip for processing, that is, the message destination will not be the slave chip. The slave chip is only used to transparently transmit the message to the master chip. After the master chip parses the message, it determines whether it needs to send the message to the slave chip for processing or whether it needs to be processed directly by the master chip.

在单个电子设备中进行双核通信的场景下,第一电子设备可以为可穿戴设备例如手表。其中,第一电子设备中包含有主芯片与从芯片。在第一电子设备上的主芯片上发起业务,主芯片向从芯片发送消息,从芯片根据消息进行对应业务的处理。In the scenario of dual-core communication in a single electronic device, the first electronic device may be a wearable device such as a watch. The first electronic device includes a master chip and a slave chip. A service is initiated on the master chip on the first electronic device, the master chip sends a message to the slave chip, and the slave chip processes the corresponding service according to the message.

上述主芯片与从芯片之间的通信都是双核通信。其中,双核通信的业务可以包括音频业务,日志业务,蓝牙业务等。The communication between the master chip and the slave chip is dual-core communication, wherein the services of the dual-core communication may include audio services, log services, Bluetooth services, and the like.

本申请实施例是对从芯片中接收到的数据包进行检测。对于从芯片来说,从芯片中包含数据包处理的线程,用于组包,拆包和校验等。以BES蓝牙芯片为例,包含的数据包处理的线程为通信(COMMU)线程。从芯片无论接收消息还是发送消息,都会经过COMMU线程进行处理。因此,可以在从芯片的COMMU线程建立一个对通道的监控机制,提取出每次经过从芯片的消息的关键信息,关键信息包括消息对应的业务标识,消息源,消息目的和数据长度。根据关键信息可以确定每个业务对应的发送情况和接收情况,也即每个业务的发送包数,发送数据长度,接收包数和接收数据长度。并且可以统计一段时间内,通道内消息的所有发送情况和所有接收情况,以及各业务的使用情况。The embodiment of the present application is to detect the data packets received from the chip. For the slave chip, the slave chip contains a thread for data packet processing, which is used for packet assembly, unpacking and verification. Taking the BES Bluetooth chip as an example, the thread for data packet processing included is the communication (COMMU) thread. Whether the slave chip receives or sends messages, it will be processed by the COMMU thread. Therefore, a monitoring mechanism for the channel can be established in the COMMU thread of the slave chip to extract the key information of each message passing through the slave chip. The key information includes the service identifier corresponding to the message, the source of the message, the purpose of the message and the data length. According to the key information, the sending and receiving conditions corresponding to each business can be determined, that is, the number of sent packets, the length of sent data, the number of received packets and the length of received data for each business. And it is possible to count all the sending conditions and all the receiving conditions of messages in the channel over a period of time, as well as the usage of each business.

本申请实施例中,在业务交互的过程中,比如,在用户针对某一业务(设为第一业务)执行的操作的情况下,那么会去向对应的第一业务发送消息。In the embodiment of the present application, during the process of business interaction, for example, when a user performs an operation on a certain business (set as the first business), a message will be sent to the corresponding first business.

本申请实施例中,可以是第二电子设备去触发第一电子设备中的业务执行。例如,手机响应于用户对手机的某一操作,去控制手表的音乐播放。具体的,第二电子设备可以检测到用户针对第一业务执行的操作,例如可以是检测到用户对第二电子设备中第一业务对应控件的触控操作,向第一电子设备的主芯片发送消息。其中,第二电子设备向第一电子设备的主芯片发送消息,也即第二电子设备向第一电子设备的从芯片发送消息,从芯片将消息透传给主芯片。具体的,第二电子设备是先通过无线通信将消息发送给从芯片,然后从芯片再通过双核通信将该消息透传给主芯片。主芯片在接收到第二电子设备发送的消息后,对该消息进行解析,若是解析为需要从芯片参与处理的业务后,又重新封装消息并通过双核通信发送给从芯片。从芯片再根据接收到的消息进行解析,向解析出的业务对应的应用发送消息,以使应用执行该业务。In the embodiment of the present application, the second electronic device may trigger the execution of the service in the first electronic device. For example, the mobile phone controls the music playing of the watch in response to a certain operation of the user on the mobile phone. Specifically, the second electronic device may detect the operation performed by the user on the first service, for example, it may detect the touch operation of the user on the control corresponding to the first service in the second electronic device, and send a message to the main chip of the first electronic device. Among them, the second electronic device sends a message to the main chip of the first electronic device, that is, the second electronic device sends a message to the slave chip of the first electronic device, and the slave chip transmits the message to the main chip. Specifically, the second electronic device first sends the message to the slave chip through wireless communication, and then the slave chip transmits the message to the main chip through dual-core communication. After receiving the message sent by the second electronic device, the main chip parses the message. If it is parsed as a service that needs to be processed by the slave chip, it repackages the message and sends it to the slave chip through dual-core communication. The slave chip then parses the received message and sends a message to the application corresponding to the parsed service so that the application executes the service.

本申请实施例中,也可以是第一电子设备自己触发第一电子设备中的业务运行。例如,手表响应于用户对手表屏幕的操作,去控制手表的音乐播放。具体的,第一电子设备的主芯片检测到用户针对第一业务执行的操作,例如可以是检测到用户对第一电子设备中第一业务对应控件的触控操作,第一电子设备的主芯片向从芯片发送消息。从芯片再根据接收到的消息进行解析,向解析出的第一业务对应的第一应用发送消息,以使第一应用执行该第一业务。In an embodiment of the present application, the first electronic device itself may trigger the operation of the service in the first electronic device. For example, the watch controls the music playback of the watch in response to the user's operation on the watch screen. Specifically, the main chip of the first electronic device detects the operation performed by the user on the first service, for example, it may detect the user's touch operation on the control corresponding to the first service in the first electronic device, and the main chip of the first electronic device sends a message to the slave chip. The slave chip then parses the received message and sends a message to the first application corresponding to the parsed first service, so that the first application executes the first service.

其中,在应用接收到消息并执行对应业务后,又向从芯片发送业务数据,也即执行业务的结果。从芯片会对接收到的业务数据进行封装,得到封装好的消息,向主芯片发送该消息。其中,若是由第二电子设备检测到用户针对第一业务执行的操作,那么从芯片则会向第一电子设备发送封装好的消息。这里的用户针对第一业务执行的操作是指用户通过第二电子设备请求执行第一应用的第一业务。Among them, after the application receives the message and executes the corresponding business, it sends the business data to the slave chip, that is, the result of executing the business. The slave chip will encapsulate the received business data, obtain the encapsulated message, and send the message to the master chip. Among them, if the second electronic device detects the operation performed by the user on the first business, the slave chip will send the encapsulated message to the first electronic device. The operation performed by the user on the first business here refers to the user requesting to execute the first business of the first application through the second electronic device.

可以理解的是,在无线通信与双核通信中传输的是数据包,也就是将应用层的业务消息封装成数据包。无线通信中传输的为蓝牙数据包,双核通信中传输的为双核数据包。It is understandable that what is transmitted in wireless communication and dual-core communication is a data packet, that is, the service message of the application layer is encapsulated into a data packet. What is transmitted in wireless communication is a Bluetooth data packet, and what is transmitted in dual-core communication is a dual-core data packet.

上述消息交互的过程中,对于从芯片中接收到的消息,也就是指从芯片中接收到的数据包,可能是从芯片接收到的,要向主芯片发送的待透传的数据包(可以设为第三数据包),或者是接收到的主芯片发送的数据包(可以设为第一数据包),或者是接收到的业务返回的业务数据,在对业务数据进行封装后得到的待发送的数据包(可以设为第二数据包)。During the above-mentioned message interaction process, the message received from the chip, that is, the data packet received from the chip, may be a data packet received from the chip to be transmitted transparently to the main chip (can be set as the third data packet), or a data packet sent by the main chip (can be set as the first data packet), or business data returned by the received business, which is a data packet to be sent after encapsulating the business data (can be set as the second data packet).

其中,第一数据包用于指示第一业务需要由第一应用执行,也就是说从芯片可以基于接收到的第一数据包,去请求对应的应用执行第一业务。从芯片响应于第一应用对第一业务的执行,此时从芯片会接收到第一业务发送的业务数据,在对业务数据进行封装后得到第二数据包,然后从芯片向主芯片发送第二数据包。The first data packet is used to indicate that the first service needs to be executed by the first application, that is, the slave chip can request the corresponding application to execute the first service based on the received first data packet. The slave chip responds to the execution of the first service by the first application. At this time, the slave chip receives the service data sent by the first service, encapsulates the service data to obtain the second data packet, and then sends the second data packet to the master chip.

其中,若是由第二电子设备检测到针对第一业务的执行的操作后,从芯片在接收到第二电子设备发送的数据包后,向主芯片发送该数据包。该数据包也就是第三数据包,第三数据包用于指示第一业务请求被执行的业务需求。也就是说,从芯片向主芯片发送第三数据包后,主芯片可以根据第三数据包,确定上述的第一数据包。Among them, if the second electronic device detects the operation of executing the first service, the slave chip sends the data packet to the master chip after receiving the data packet sent by the second electronic device. The data packet is also the third data packet, and the third data packet is used to indicate the service requirement for the first service request to be executed. That is to say, after the slave chip sends the third data packet to the master chip, the master chip can determine the above-mentioned first data packet based on the third data packet.

那么,对从芯片中的消息进行提取,也即对接收到的各个数据包进行解析,提取出数据包的包头信息。其中,数据包中可以包括包头和有效载荷(pay load),有效载荷也即业务的有效数据,包头中可以包括消息源,消息目的,业务的标识以及数据长度。Then, extract the message from the chip, that is, parse each received data packet and extract the packet header information. The data packet may include a header and a payload, the payload is the valid data of the service, and the header may include the message source, message destination, service identifier and data length.

本申请实施例中,对每一次经过从芯片中的数据包进行提取,也就是确定用于表征第一业务的数据流量的信息(设为第一信息)。其中,若是没有检测到第二电子设备上执行第一业务的请求,那么第一信息就是根据第一数据包和第二数据包确定的。若是检测到第二电子设备上执行第一业务的请求,那么第一信息就是根据第一数据包和第二数据包和第三数据包共同确定的。In the embodiment of the present application, each data packet passing through the chip is extracted, that is, information (set as the first information) used to characterize the data flow of the first service is determined. If no request to execute the first service on the second electronic device is detected, the first information is determined based on the first data packet and the second data packet. If a request to execute the first service on the second electronic device is detected, the first information is determined based on the first data packet, the second data packet and the third data packet.

本申请实施例中,可以对预设时间段内确定的第一信息进行统计。其中,可以通过结构体存储每个业务对应的数据流量的信息,结构体是由一系列具有相同类型或不同类型的数据构成的数据集合。通过业务的标识ID区分各个业务结构体,在业务结构体中包含对应的业务的数据流量的信息。例如,第一业务结构体中包含第一业务的数据流量的第一信息。In an embodiment of the present application, statistics can be collected on the first information determined within a preset time period. Among them, the information of the data flow corresponding to each business can be stored through a structure, and the structure is a data set consisting of a series of data of the same type or different types. Each business structure is distinguished by the identification ID of the business, and the business structure contains information on the data flow of the corresponding business. For example, the first business structure contains the first information of the data flow of the first business.

第一信息包括如下至少一项:接收流量的信息、或发送流量的信息,其中,接收流量的信息为根据第一数据包确定,发送流量的信息为根据第二数据包确定。这里的接收流量的信息是由从芯片接收的第一业务的第一数据流量的信息;发送流量的信息由从芯片发送的第一业务的第二数据流量的信息。这里的接收流量的信息包括如下至少一项:接收的数据包的数目(接收包数)、或接收的数据包对应的数据量(接收数据长度),发送流量的信息包括如下至少一项:发送的数据包的数目(发送包数)、或发送的数据包对应的数据量(发送数据长度)。The first information includes at least one of the following: information on received traffic, or information on sent traffic, wherein the information on received traffic is determined based on the first data packet, and the information on sent traffic is determined based on the second data packet. The information on received traffic here is information on the first data traffic of the first business received from the chip; the information on sent traffic is information on the second data traffic of the first business sent from the chip. The information on received traffic here includes at least one of the following: the number of received data packets (number of received packets), or the amount of data corresponding to the received data packets (received data length), and the information on sent traffic includes at least one of the following: the number of sent data packets (number of sent packets), or the amount of data corresponding to the sent data packets (sent data length).

接收流量是根据第一数据包的目的地址(消息目的)为从芯片确定,也可以是确定第一数据包是接收包,或者说接收的数据包包括第一数据包。发送流量是根据第二数据包的源地址(消息源)为从芯片确定,也可以是确定第二数据包是发送包,或者说发送的数据包包括第二数据包。发送流量还根据第三数据包的源地址为从芯片确定,也可以是确定第二数据包是发送包,或者说发送的数据包包括第二数据包。The received traffic is determined by the slave chip based on the destination address (message destination) of the first data packet, or it can be determined that the first data packet is a received packet, or the received data packet includes the first data packet. The sent traffic is determined by the slave chip based on the source address (message source) of the second data packet, or it can be determined that the second data packet is a sent packet, or the sent data packet includes the second data packet. The sent traffic is also determined by the slave chip based on the source address of the third data packet, or it can be determined that the second data packet is a sent packet, or the sent data packet includes the second data packet.

具体来说,从芯片可以根据数据包中的消息源与消息目的区分是发送包还是接收包。若是第二电子设备向第一电子设备的主芯片发送消息,第二电子设备封装成的数据包中,消息源是第二电子设备,消息目的是第一电子设备的主芯片。那么,从芯片接收到的数据包只是用来透传给主芯片,消息目的并不是从芯片。由此,可以认为从芯片向主芯片发送数据包,对该数据包进行解析与提取,该数据包的消息源可以是从芯片,得到的是对应业务的发送数据包与发送数据长度。若是主芯片向从芯片发送消息,那么主芯片封装的数据包中,消息源是主芯片,消息目的是从芯片,由此,从芯片对接收到的数据包进行解析与提取,得到的是对应业务的接收数据包与接收数据长度。若是业务对应的应用向主芯片发送消息,会向从芯片发送消息,也就业务数据。从芯片对业务数据进行封装,消息源是从芯片,消息目的是主芯片,由此,从芯片提取得到的是对应业务的接收数据包与接收数据长度。Specifically, the slave chip can distinguish whether it is a sending packet or a receiving packet according to the message source and the message destination in the data packet. If the second electronic device sends a message to the main chip of the first electronic device, in the data packet encapsulated by the second electronic device, the message source is the second electronic device, and the message destination is the main chip of the first electronic device. Then, the data packet received by the slave chip is only used for transparent transmission to the main chip, and the message destination is not the slave chip. Therefore, it can be considered that the slave chip sends a data packet to the main chip, parses and extracts the data packet, and the message source of the data packet can be the slave chip, and the corresponding business sending data packet and sending data length are obtained. If the main chip sends a message to the slave chip, then in the data packet encapsulated by the main chip, the message source is the main chip, and the message destination is the slave chip. Therefore, the slave chip parses and extracts the received data packet, and the corresponding business receiving data packet and receiving data length are obtained. If the application corresponding to the business sends a message to the main chip, it will send a message to the slave chip, which is the business data. The slave chip encapsulates the business data, the message source is the slave chip, and the message destination is the main chip. Therefore, the slave chip extracts the receiving data packet and receiving data length of the corresponding business.

其中,数据包的数量跟数据长度不一定对应,如果发送包数较多,发送数据长度比较小,则可以认为此时的发生数据包的效率不高,也就表示数据包所述业务没有很好利用这个通道,浪费了通道资源。The number of data packets does not necessarily correspond to the data length. If the number of sent packets is large and the sent data length is small, it can be considered that the efficiency of the data packet generation is not high, which means that the business described in the data packet does not make good use of this channel and wastes channel resources.

每个业务结构体中会根据预设时间段内提取出的信息累计该时间段内该业务的发送包数,接收包数,发送数据长度和接收数据长度。Each service structure will accumulate the number of sent packets, the number of received packets, the length of sent data and the length of received data of the service within the preset time period according to the information extracted within the preset time period.

各业务结构体以链表的方式进行存储,在链表的开头是总节点结构体,是所有提取出来的业务信息的总和,包括总发送包数,总接收包数,总发送数据长度和总接收数据长度。Each business structure is stored in the form of a linked list. At the beginning of the linked list is the total node structure, which is the sum of all extracted business information, including the total number of sent packets, the total number of received packets, the total sent data length and the total received data length.

如图3所示的信息检测方法的整体实现示意图中,第二电子设备为手机,第二第一电子设备的从芯片为BES芯片。手机的应用与从芯片的通信线程之间可以进行蓝牙数据包的交互,从芯片与主芯片之间可以进行双核通信包的交互。其中,蓝牙数据包的交互与双核通信包的交互可以参考本申请实施例中前述对第一电子设备与主芯片,主芯片与从芯片中数据包的交互的具体描述。在从芯片的通信线程中可以对数据包进行组包,拆包和校验等。例如,对数据包进行解析得到消息1,消息2和消息3。消息1对应的信息中包括消息源,A业务,消息目的,数据长度以及业务的有效数据。消息2对应的信息中包括消息源,B业务,消息目的,数据长度以及业务的有效数据。消息3对应的信息中包括消息源,C业务,消息目的,数据长度以及业务的有效数据。从芯片的通信线程在接收到消息后,可以通过线程间通信,分发给对应的业务处理,其中,消息1对应的是A业务线程,消息2对应的是B业务线程,消息3对应的是C业务线程。In the overall implementation diagram of the information detection method shown in Figure 3, the second electronic device is a mobile phone, and the slave chip of the second first electronic device is a BES chip. The application of the mobile phone can interact with the communication thread of the slave chip through Bluetooth data packets, and the slave chip can interact with the master chip through dual-core communication packets. Among them, the interaction of Bluetooth data packets and the interaction of dual-core communication packets can refer to the aforementioned specific description of the interaction of data packets between the first electronic device and the master chip, and the master chip and the slave chip in the embodiment of the present application. In the communication thread of the slave chip, data packets can be packaged, unpacked, and verified. For example, the data packet is parsed to obtain message 1, message 2, and message 3. The information corresponding to message 1 includes the source of the message, A business, message purpose, data length, and valid data of the business. The information corresponding to message 2 includes the source of the message, B business, message purpose, data length, and valid data of the business. The information corresponding to message 3 includes the source of the message, C business, message purpose, data length, and valid data of the business. After receiving the message, the communication thread of the slave chip can distribute it to the corresponding business processing through inter-thread communication. Among them, message 1 corresponds to business thread A, message 2 corresponds to business thread B, and message 3 corresponds to business thread C.

在从芯片向主芯片透传该消息,或者根据该消息分发给对应的业务的同时,从芯片提取该消息的关键信息,如对应业务和消息大小(数据长度),也即消息源,业务标识,消息目的和数据长度,并在从芯片的通道带宽的结构体统计。When the message is transparently transmitted from the chip to the main chip, or distributed to the corresponding business according to the message, the key information of the message is extracted from the chip, such as the corresponding business and message size (data length), that is, the message source, business identifier, message purpose and data length, and is counted in the structure of the channel bandwidth of the slave chip.

在业务执行结束后,需要给主芯片发送消息,会向从芯片发送请求。从芯片的通信线程在接收到请求消息后,对消息进行封装消息头和消息尾,有必要时还会进行消息拆分。在封装的消息头中,会包含对应业务和消息大小,也即消息源,业务标识,消息目的和数据长度。从芯片提取出该信息,并在从芯片的通道带宽的结构体统计。After the business execution is completed, a message needs to be sent to the master chip, and a request will be sent to the slave chip. After receiving the request message, the communication thread of the slave chip encapsulates the message header and message footer, and splits the message if necessary. The encapsulated message header contains the corresponding business and message size, that is, the message source, business identifier, message purpose and data length. The slave chip extracts this information and counts it in the structure of the channel bandwidth of the slave chip.

其中,总节点结构体在链表头,然后是A业务结构体与B业务结构体。采用链表结构可以节省内存,只有在业务运行时才会去创建该业务对应的节点,其他未运行的业务不会占据内存。并且,链表遍历数据比较快,使得分析数据时的效率更高。Among them, the total node structure is at the head of the linked list, followed by the A business structure and the B business structure. The linked list structure can save memory. Only when the business is running will the node corresponding to the business be created, and other non-running businesses will not occupy memory. In addition, the linked list traverses data quickly, making data analysis more efficient.

本申请实施例中在提取出预设时间段内从芯片中各业务的信息并进行信息统计后,得到各个业务对应的结构体,通过对各业务结构体进行遍历分析,可以获取出通道的负荷,以及使用率最高的业务。例如,在半小时内,B业务的发送包数是最多的,则B业务是该时间段内使用率最高的业务。并且在预设时间段后,从芯片可以清除链表,防止内存使用过多。其中,预设时间段可以是10分钟,15分钟等。这里,通道的负荷就是指预设时长内的数据包的数据量是有限的,就可以根据预设时长内的发送包数和发送数据长度确定。In the embodiment of the present application, after extracting the information of each business from the chip within a preset time period and performing information statistics, the structure corresponding to each business is obtained. By traversing and analyzing each business structure, the load of the channel and the business with the highest utilization rate can be obtained. For example, within half an hour, the number of packets sent by business B is the largest, then business B is the business with the highest utilization rate in this time period. And after the preset time period, the linked list can be cleared from the chip to prevent excessive memory usage. Among them, the preset time period can be 10 minutes, 15 minutes, etc. Here, the load of the channel means that the amount of data in the data packet within the preset time length is limited, which can be determined based on the number of packets sent within the preset time length and the length of the sent data.

如图4所示,以第一电子设备与第二电子设备之间进行双核通信为例,详细介绍信息检测方法。图4中,第二电子设备可以响应于用户对第二电子设备中某一业务对应控件的触控操作,向第一电子设备的从芯片发送消息,从芯片将消息透传给第一电子设备的主芯片。主芯片在接收到第二电子设备发送的消息后,对该消息进行解析,若是解析为需要从芯片参与处理的业务后,又重新封装消息并通过双核通信发送给从芯片。从芯片再根据接收到的消息进行解析,向解析出的业务对应的应用发送消息,以使应用执行该业务。As shown in Figure 4, taking the dual-core communication between the first electronic device and the second electronic device as an example, the information detection method is introduced in detail. In Figure 4, the second electronic device can send a message to the slave chip of the first electronic device in response to the user's touch operation on a control corresponding to a business in the second electronic device, and the slave chip transparently transmits the message to the main chip of the first electronic device. After receiving the message sent by the second electronic device, the main chip parses the message. If it is parsed as a business that requires the participation of the slave chip in processing, it repackages the message and sends it to the slave chip through dual-core communication. The slave chip then parses the received message and sends a message to the application corresponding to the parsed business so that the application executes the business.

从芯片在接收到要向主芯片发送的待透传的数据包时,可以对该数据包进行信息提取。从芯片在接收到主芯片发送的数据包时,可以对该数据包进行信息提取。从芯片在接收到业务执行后发送的业务数据后,对该数据进行封装后,可以对该数据包进行信息提取。When the slave chip receives a data packet to be transparently transmitted to the master chip, it can extract information from the data packet. When the slave chip receives a data packet sent by the master chip, it can extract information from the data packet. After receiving the service data sent after the service is executed, the slave chip can extract information from the data packet after encapsulating the data.

例如,手机播控手表播放音乐的场景中,手表的MCU芯片(主芯片)在接收到蓝牙芯片(从芯片)透传的手机的播控消息后,解析该消息,确定需要蓝牙芯片进行音频编解码。那么,MCU芯片把对蓝牙有效的数据即音频编解码的内容进行重新封装,发送给蓝牙芯片。蓝牙芯片再向对应的音频应用发送消息。For example, in the scenario where a mobile phone controls a watch to play music, the MCU chip (main chip) of the watch receives the mobile phone's control message transmitted by the Bluetooth chip (slave chip), parses the message, and determines that the Bluetooth chip is required to perform audio encoding and decoding. Then, the MCU chip repackages the data that is valid for Bluetooth, that is, the audio encoding and decoding content, and sends it to the Bluetooth chip. The Bluetooth chip then sends a message to the corresponding audio application.

请参阅图5,图5为本申请实施例提供的一种电子设备双核通信的软件架构示意图。如图5所示,第一电子设备的主芯片与从芯片中都包括上层,链路层和物理层。蓝牙通信与双核通信的通道都是在物理层,有对应的物理通道。Please refer to Figure 5, which is a schematic diagram of the software architecture of dual-core communication of an electronic device provided in an embodiment of the present application. As shown in Figure 5, the master chip and the slave chip of the first electronic device both include an upper layer, a link layer and a physical layer. The channels of Bluetooth communication and dual-core communication are both in the physical layer and have corresponding physical channels.

第二电子设备的应用层封装数据包,将数据包通过无线通道发送给从芯片的物理层。从芯片的物理层发送给硬件链路层,然后在链路层提取数据包中关键信息后,再发送该数据包给物理层,通过双核通道发送到主芯片的物理层。然后,主芯片的物理层发送该数据包到主芯片的链路层,最后发送到主芯片的上层。The application layer of the second electronic device encapsulates the data packet and sends the data packet to the physical layer of the slave chip through the wireless channel. The slave chip's physical layer sends it to the hardware link layer, and then after extracting key information from the data packet, the link layer sends the data packet to the physical layer and sends it to the physical layer of the master chip through the dual-core channel. Then, the physical layer of the master chip sends the data packet to the link layer of the master chip, and finally to the upper layer of the master chip.

主芯片的上层对数据包进行解析处理后,若是解析为需要从芯片参与处理的业务后,又将对于从芯片中有效的数据重新封装为数据包。主芯片的上层将数据包发送到主芯片的链路层,主芯片的链路层将数据包发送到主芯片的物理层。然后主芯片将数据包通过双核通道发送给从芯片的物理层。从芯片的物理层将数据包发送到从芯片的链路层。在从芯片链路层提取数据包中关键信息后,再将数据包中业务的有效数据发送给对应的业务(应用层)。After the upper layer of the master chip parses and processes the data packet, if it is parsed as a business that requires the participation of the slave chip, it will re-encapsulate the valid data in the slave chip into a data packet. The upper layer of the master chip sends the data packet to the link layer of the master chip, and the link layer of the master chip sends the data packet to the physical layer of the master chip. Then the master chip sends the data packet to the physical layer of the slave chip through the dual-core channel. The physical layer of the slave chip sends the data packet to the link layer of the slave chip. After extracting the key information in the data packet from the link layer of the slave chip, the valid data of the business in the data packet is sent to the corresponding business (application layer).

本申请实施例的信息检测方法,通过从双核通信的从芯片中提取业务消息的相关信息,实现对双核通信通道的检测,可以对提取的信息进行统计与分析,进而可以根据统计的信息对业务进行调整。下面详细描述业务进行调整的具体表现。The information detection method of the embodiment of the present application realizes the detection of the dual-core communication channel by extracting the relevant information of the service message from the chip of the dual-core communication, and can perform statistics and analysis on the extracted information, and then adjust the service according to the statistical information. The specific performance of the service adjustment is described in detail below.

在一些实施例中,从芯片可以根据第一信息,确定第一电子设备上运行的业务的总数目;从芯片可以根据第一电子设备上运行的业务的总数目,对第一电子设备上运行的业务的运行进行调度。若第一电子设备上运行的业务的总数目超过数目阈值,则从芯片将第一电子设备上运行的业务中除第一业务以外的其他业务停止运行。例如,应用于业务性能专项攻克中时,也就是只能有第一业务运行,设第一业务只有一个业务,若是运行的业务的总数目大于1个,那么从芯片将第一电子设备上运行的业务中除第一业务以外的其他业务停止运行。In some embodiments, the slave chip can determine the total number of services running on the first electronic device based on the first information; the slave chip can schedule the operation of the services running on the first electronic device based on the total number of services running on the first electronic device. If the total number of services running on the first electronic device exceeds the number threshold, the slave chip stops the services running on the first electronic device except the first service. For example, when applied to a special project to overcome service performance, that is, only the first service can be run, and the first service has only one service, if the total number of running services is greater than 1, then the slave chip stops the services running on the first electronic device except the first service.

例如,应用于业务性能专项攻克中时,由于通道性能有限,有些业务需要占用全部的通道,以A业务为例。若是在通道统计的信息中还统计到了B业务的信息,这时业务的总数目是2个。那么,就可以向B业务对应的应用发送通知,通知其进行整改。并且每次记录的在运行的业务的数据包信息时,会同时记录该业务的时间点。也就是说,在依赖双核通信的业务性能专项攻克中,本申请实施例的信息检测方法可以排查影响性能的时间点和原因,可以知道在哪一个时间点B业务在运行。For example, when applied to special attacks on business performance, due to limited channel performance, some businesses need to occupy all channels, taking business A as an example. If the information of business B is also counted in the channel statistics, the total number of businesses is 2 at this time. Then, a notification can be sent to the application corresponding to business B to notify it to make rectifications. And each time the data packet information of a running business is recorded, the time point of the business will also be recorded. In other words, in the special attack on business performance that relies on dual-core communication, the information detection method of the embodiment of the present application can check the time points and reasons that affect performance, and can know at which point in time business B is running.

在遇到丢包问题时,本申请实施例提供的信息检测方法可以辅助定位丢包的具体位置。从芯片根据第一信息,确定第一业务的数据包的丢包数目,若第一业务的数据包的丢包数目大于丢包数目阈值,则从芯片上报从芯片与其他电子设备的通信异常。这里的丢包数目,是指原本从芯片应该接收到的数据包的数据,与当前接收到的数据包的数目之差。这里的丢包数目阈值可以根据业务需求设置。When encountering a packet loss problem, the information detection method provided in the embodiment of the present application can assist in locating the specific location of the packet loss. The slave chip determines the number of packet losses of the data packets of the first service based on the first information. If the number of packet losses of the data packets of the first service is greater than the packet loss number threshold, the slave chip reports the communication anomaly between the slave chip and other electronic devices. The number of packet losses here refers to the difference between the data of the data packet that should have been received from the chip and the number of data packets currently received. The packet loss number threshold here can be set according to business needs.

例如,第二电子设备响应于用户对某个按钮的点击操作,对于该按钮对应的业务来说,可以设发送X个数据包给第一电子设备的主芯片。若是业务没有执行成功,此时,可以通过查看主芯片的日志确定主芯片接收到的数据包的数量。若是通过查看日志得知并没有收到X个数据包,可以认为此时丢包数目大于丢包数据阈值。此时,也就表示在第二电子设备向第一电子设备的主芯片发送数据包的过程中产生了丢包。For example, in response to a user clicking a button, the second electronic device can send X data packets to the main chip of the first electronic device for the service corresponding to the button. If the service is not successfully executed, the number of data packets received by the main chip can be determined by checking the log of the main chip. If it is found by checking the log that X data packets have not been received, it can be considered that the number of packet loss is greater than the packet loss data threshold. At this time, it means that packet loss occurs in the process of the second electronic device sending data packets to the main chip of the first electronic device.

然后,可以去从芯片统计的信息中,也就是该业务结构体中查看发送包数,确认该消息是否经过了从芯片。若是该业务结构体中该业务对应的发送包数没有X个,那么,可以认为第二电子设备并没有发送相应数据包给蓝牙芯片,则此时可以定位到第二电子设备接收到用户对按钮点击操作但是并没有生效。若是该业务结构体中该业务对应的发送包数为X个,那么可以定位到从芯片向主芯片发送数据包的过程中产生了丢包。此时,可以针对该丢包的具体位置进行调整改进,例如接收用户对业务控件的重新的触控操作,通过再次检测确认按钮是否真的失效。Then, you can check the number of sent packets in the information from the chip statistics, that is, in the business structure, to confirm whether the message has passed through the slave chip. If the number of sent packets corresponding to the business in the business structure is less than X, then it can be considered that the second electronic device has not sent the corresponding data packet to the Bluetooth chip. At this time, it can be located that the second electronic device received the user's button click operation but it did not take effect. If the number of sent packets corresponding to the business in the business structure is X, it can be located that packet loss occurred in the process of sending data packets from the slave chip to the main chip. At this time, adjustments and improvements can be made to the specific location of the packet loss, such as receiving the user's re-touch operation on the business control, and re-detecting to confirm whether the button is really invalid.

由于电子设备之间进行双核通信的业务都是透传业务,本申请实施例提供的信息检测方法可以监控数据包中的消息源。在消息源是第二电子设备的应用的情况下,如果信息统计时发现没有统计到该消息源,那么就可以认为第二电子设备本身或者第二电子设备与从芯片之间的通信存在问题。Since the services for dual-core communication between electronic devices are all transparent transmission services, the information detection method provided in the embodiment of the present application can monitor the message source in the data packet. In the case where the message source is an application of the second electronic device, if the message source is not counted during information statistics, it can be considered that there is a problem with the second electronic device itself or the communication between the second electronic device and the slave chip.

本申请实施例中,可以对通道状态进行监控,防止通道异常时,难以定位。如果检测到某段时间内的通道速率严重下降,可以通过统计信息中检查到异常情况下的通道内消息的所属业务,排查是否该业务会破坏通道,甚至影响系统运行。其中,预设时间段内,正常来说从芯片中统计信息的总的发送包数与接收包数是有一个阈值的。某段时间内的通道速率严重下降是指此时统计信息的总的发送包数与接收包数远远小于该阈值。In the embodiment of the present application, the channel status can be monitored to prevent the channel from being difficult to locate when it is abnormal. If it is detected that the channel rate has dropped severely within a certain period of time, the business to which the message in the channel under abnormal circumstances belongs can be checked through the statistical information to check whether the business will damage the channel or even affect the operation of the system. Among them, within the preset time period, normally there is a threshold for the total number of sent packets and the number of received packets from the statistical information of the chip. A severe drop in the channel rate within a certain period of time means that the total number of sent packets and the number of received packets of the statistical information at this time are far less than the threshold.

本申请实施例中,从芯片的大多数业务都是依赖双核通信,所以从芯片的业务繁忙情况和消息数量呈正相关关系。电子设备可以根据通道的使用情况动态调节从芯片的主频。在消息频率高的时候,提高主频,提升性能;在消息频率低的时候,降低主频,降低功耗。相对于主频为固定的最小值与最大值,本申请实施例可以根据消息频率或者说总数据流量动态调整主频频率,合理的利用系统资源。总数据流量是由如下至少一项表征:从芯片接收和/或发送的数据包的总数目、或从芯片接收和/或发送的数据包对应的总数据量。总数据流量与从芯片的主频的频率正相关。In the embodiment of the present application, most of the services of the slave chip rely on dual-core communication, so the business busyness of the slave chip is positively correlated with the number of messages. The electronic device can dynamically adjust the main frequency of the slave chip according to the usage of the channel. When the message frequency is high, increase the main frequency to improve performance; when the message frequency is low, reduce the main frequency to reduce power consumption. Relative to the fixed minimum and maximum values of the main frequency, the embodiment of the present application can dynamically adjust the main frequency according to the message frequency or the total data flow, and reasonably utilize system resources. The total data flow is characterized by at least one of the following: the total number of data packets received and/or sent from the chip, or the total amount of data corresponding to the data packets received and/or sent from the chip. The total data flow is positively correlated with the frequency of the main frequency of the slave chip.

本申请实施例中,若第一业务的数据流量小于流量阈值,则从芯片上报第一业务的异常信息。第一业务的数据流量小于流量阈值是指:第一业务在预设时长内接收和/或发送的数据包数目小于数据包数目阈值,和/或,第一业务在预设时长内接收和/或发送的数据包对应的数据量小于数据量阈值。例如,如果在一段时间内统计信息中收发数据包的数量很少的情况下,例如1个或2个数据包,可以认为从芯片所在的电子设备处于待机状态。那么,电子设备中可以把影响功耗的应用关闭掉,以及调整主频为最低。本申请实施例中可以不需要在接收到数据包时提升一次主频,可以节省功耗。In an embodiment of the present application, if the data flow of the first service is less than the flow threshold, the abnormal information of the first service is reported from the chip. The data flow of the first service is less than the flow threshold means that: the number of data packets received and/or sent by the first service within a preset time length is less than the data packet number threshold, and/or, the amount of data corresponding to the data packets received and/or sent by the first service within a preset time length is less than the data volume threshold. For example, if the number of sent and received data packets in the statistical information over a period of time is very small, such as 1 or 2 data packets, it can be considered that the electronic device where the slave chip is located is in standby mode. Then, the application that affects power consumption can be turned off in the electronic device, and the main frequency can be adjusted to the lowest. In the embodiment of the present application, it is not necessary to increase the main frequency once when a data packet is received, which can save power consumption.

本申请实施例还提供一种芯片系统,如图6所示,该芯片系统90包括至少一个处理器901和至少一个接口电路902。处理器901和接口电路902可通过线路互联。例如,接口电路902可用于从其它装置(例如电子设备的存储器)接收信号。又例如,接口电路902可用于向其它装置(例如处理器901)发送信号。示例性的,接口电路902可读取存储器中存储的指令,并将该指令发送给处理器901。当所述指令被处理器901执行时,可使得电子设备执行上述实施例中的各个步骤。当然,该芯片系统还可以包含其他分立器件,本申请实施例对此不作具体限定。The embodiment of the present application also provides a chip system, as shown in Figure 6, the chip system 90 includes at least one processor 901 and at least one interface circuit 902. The processor 901 and the interface circuit 902 can be interconnected through lines. For example, the interface circuit 902 can be used to receive signals from other devices (such as a memory of an electronic device). For another example, the interface circuit 902 can be used to send signals to other devices (such as processor 901). Exemplarily, the interface circuit 902 can read instructions stored in the memory and send the instructions to the processor 901. When the instruction is executed by the processor 901, the electronic device can execute the various steps in the above embodiments. Of course, the chip system can also include other discrete devices, which is not specifically limited in the embodiment of the present application.

本申请实施例还提供一种计算机存储介质,该计算机存储介质包括计算机指令,当所述计算机指令在上述电子设备上运行时,使得该电子设备执行上述方法实施例中手机执行的各个功能或者步骤。An embodiment of the present application also provides a computer storage medium, which includes computer instructions. When the computer instructions are executed on the above-mentioned electronic device, the electronic device executes each function or step executed by the mobile phone in the above-mentioned method embodiment.

本申请实施例还提供一种计算机程序产品,当所述计算机程序产品在计算机上运行时,使得所述计算机执行上述方法实施例中手机执行的各个功能或者步骤。The embodiment of the present application also provides a computer program product. When the computer program product is run on a computer, the computer is enabled to execute each function or step executed by the mobile phone in the above method embodiment.

通过以上实施方式的描述,所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。Through the description of the above implementation methods, technical personnel in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.

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

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

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

所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个可读取存储介质中。基于这样的理解,本申请实施例的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该软件产品存储在一个存储介质中,包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read on ly memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium, including several instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk and other media that can store program code.

以上内容,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何在本申请揭露的技术范围内的变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。The above contents are only specific implementation methods of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application shall be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (20)

1. An information detection method is characterized by being applied to first electronic equipment, wherein the first electronic equipment comprises a first chip and a second chip, and the method comprises the following steps:
under the condition that a user executes an operation for a first service, the first chip sends a first data packet of the first service to the second chip, wherein the first data packet is used for indicating that the first service needs to be executed by a first application;
The second chip requests the first application to execute the first service according to the first data packet;
responding to the execution of the first service by the first application, and sending a second data packet of the first service to the first chip by the second chip;
The second chip determines first information for characterizing data traffic of the first service, wherein the first information is determined according to the first data packet and the second data packet.
2. The method of claim 1, wherein the first information comprises at least one of: and receiving traffic information or sending traffic information, wherein the received traffic information is determined according to the first data packet, and the sent traffic information is determined according to the second data packet.
3. The method of claim 2, wherein the received traffic is determined for the second chip based on a destination address of the first data packet.
4. A method according to claim 3, wherein the information of the received traffic comprises at least one of: the number of received data packets, or the data amount corresponding to the received data packets, wherein the received data packets include the first data packet.
5. The method of claim 2, wherein the transmit traffic is determined for the second chip based on a source address of the second data packet.
6. The method of claim 5, wherein the information of the transmission traffic comprises at least one of: the number of the transmitted data packets, or the data amount corresponding to the transmitted data packets, wherein the transmitted data packets include the second data packets.
7. The method according to any one of claims 2-6, further comprising:
responding to a request of a second electronic device for executing the first service, and sending a third data packet to the first chip by the second chip, wherein the third data packet is used for indicating the service requirement of the first service request to be executed;
And the first chip determines the first data packet according to the third data packet.
8. The method of claim 7, wherein the first information is further determined from the third data packet.
9. The method of claim 8, wherein the transmit traffic is further determined for the second chip based on a source address of the third data packet.
10. The method of claim 9, wherein the information of the transmission traffic comprises at least one of: the number of the transmitted data packets, or the data amount corresponding to the transmitted data packets, wherein the transmitted data packets include the third data packet.
11. The method according to any one of claims 1-6, 8-10, wherein the method further comprises:
The first chip detects the operation performed by the user for the first service.
12. The method according to any one of claims 1-6, 8-10, wherein the method further comprises:
The second chip determines the total number of the business running on the first electronic equipment according to the first information;
And the second chip schedules the operation of the business operated on the first electronic equipment according to the total number of the business operated on the first electronic equipment.
13. The method of claim 12, wherein the second chip schedules operation of the traffic running on the first electronic device based on a total number of traffic running on the first electronic device, comprising:
And if the total number of the services running on the first electronic equipment exceeds a number threshold, stopping running other services except the first service in the services running on the first electronic equipment by the second chip.
14. The method according to any one of claims 1-6, 8-10, wherein the method further comprises:
And the second chip determines total data traffic of the service running on the first electronic device according to the first information, wherein the total data traffic is positively correlated with the frequency of the main frequency of the second chip.
15. The method of claim 14, wherein the method further comprises:
the total data traffic is characterized by at least one of: the total number of the data packets received and/or transmitted by the second chip or the total data quantity corresponding to the data packets received and/or transmitted by the second chip.
16. The method according to any one of claims 1-6, 8-10, wherein the method further comprises:
if the data traffic of the first service is smaller than the traffic threshold, the second chip reports the abnormal information of the first service.
17. The method of claim 16, wherein the data traffic of the first service being less than the traffic threshold means that: the number of the data packets received and/or transmitted by the first service in the preset time period is smaller than a data packet number threshold value, and/or the data quantity corresponding to the data packets received and/or transmitted by the first service in the preset time period is smaller than a data quantity threshold value.
18. The method according to any one of claims 1-6, 8-10, wherein the method further comprises:
the second chip determines the packet loss number of the data packets of the first service according to the first information;
if the packet loss number of the data packets of the first service is larger than the packet loss number threshold, the second chip reports that the communication between the second chip and other electronic equipment is abnormal.
19. An electronic device, the electronic device comprising: a communication module, a memory, and one or more processors; the communication module, the memory, and the processor are coupled; the memory is for storing computer program code comprising computer instructions which, when executed by the electronic device, cause the electronic device to perform the method of any one of claims 1 to 18.
20. A computer readable storage medium having instructions stored therein which, when executed in an electronic device, cause the electronic device to perform the method of any of claims 1 to 18.
CN202310851375.8A 2023-07-11 2023-07-11 Information detection method and electronic equipment Active CN117081949B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310851375.8A CN117081949B (en) 2023-07-11 2023-07-11 Information detection method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310851375.8A CN117081949B (en) 2023-07-11 2023-07-11 Information detection method and electronic equipment

Publications (2)

Publication Number Publication Date
CN117081949A CN117081949A (en) 2023-11-17
CN117081949B true CN117081949B (en) 2024-08-13

Family

ID=88718255

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310851375.8A Active CN117081949B (en) 2023-07-11 2023-07-11 Information detection method and electronic equipment

Country Status (1)

Country Link
CN (1) CN117081949B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107579877A (en) * 2017-09-18 2018-01-12 南京国电南自电网自动化有限公司 A kind of exchange of electric power machine flux monitoring system and monitoring method based on FPGA
CN115550891A (en) * 2021-06-29 2022-12-30 华为技术有限公司 Service data transmission method and related equipment

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10938680B2 (en) * 2018-01-23 2021-03-02 Arista Networks, Inc. Accelerated network traffic sampling using a network chip
CN111694402B (en) * 2020-06-11 2021-10-01 翱捷科技股份有限公司 Control method of single-chip heterogeneous system and wearable device
CN114050983B (en) * 2021-10-26 2023-11-07 中国电信股份有限公司 Flow self-adaptive acquisition method and device, storage medium and electronic equipment
CN115865835A (en) * 2022-11-24 2023-03-28 苏州盛科通信股份有限公司 Master and backup exchange board, interface board, exchange system and state summarizing method thereof
CN116319259A (en) * 2023-04-27 2023-06-23 新华三技术有限公司 Traffic detection method, network equipment and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107579877A (en) * 2017-09-18 2018-01-12 南京国电南自电网自动化有限公司 A kind of exchange of electric power machine flux monitoring system and monitoring method based on FPGA
CN115550891A (en) * 2021-06-29 2022-12-30 华为技术有限公司 Service data transmission method and related equipment

Also Published As

Publication number Publication date
CN117081949A (en) 2023-11-17

Similar Documents

Publication Publication Date Title
US20240389174A1 (en) Bluetooth reconnection method and related apparatus
US20220304094A1 (en) Bluetooth Reconnection Method and Related Apparatus
CN113382397A (en) Bluetooth connection method, equipment and system
US20240224357A1 (en) Data Download Method, Apparatus, and Terminal Device
WO2020124371A1 (en) Method and device for establishing data channels
CN114079892A (en) Bluetooth communication method, wearable device and system
CN113676339A (en) Multicast method, device, terminal equipment and computer readable storage medium
CN113596919B (en) Data downloading method, device and terminal equipment
CN113678481B (en) Wireless audio system, audio communication method and equipment
CN117081949B (en) Information detection method and electronic equipment
WO2020078267A1 (en) Method and device for voice data processing in online translation process
CN111935705A (en) Data service management method and device, computer readable medium and terminal equipment
CN116048769B (en) Memory recycling method and device and terminal equipment
CN113115483B (en) Method and device for releasing radio resource control connection and user equipment
WO2023165513A1 (en) Communication method, electronic device, and apparatus
WO2021114950A1 (en) Multipath http channel multiplexing method and terminal
CN116708317B (en) Data packet MTU adjustment method and device and terminal equipment
CN116669153B (en) Transmission power backoff method, terminal device, and computer-readable storage medium
WO2024146288A1 (en) Message sending and displaying method and apparatus, server, and terminal device
CN117349125B (en) Device state acquisition method, electronic device and computer readable storage medium
CN117130765B (en) Computing resource configuration method and electronic device
CN117130952B (en) Pre-reading method and pre-reading device
CN117724595B (en) Power management circuit, method, apparatus, electronic device, and readable storage medium
EP4456063A1 (en) Voice signal output method and electronic device
WO2024022154A1 (en) Method for determining device user, and related apparatus

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
GR01 Patent grant
GR01 Patent grant
CP03 Change of name, title or address

Address after: Unit 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong 518040

Patentee after: Honor Terminal Co.,Ltd.

Country or region after: China

Address before: 3401, unit a, building 6, Shenye Zhongcheng, No. 8089, Hongli West Road, Donghai community, Xiangmihu street, Futian District, Shenzhen, Guangdong

Patentee before: Honor Device Co.,Ltd.

Country or region before: China