CN117081949B - Information detection method and electronic equipment - Google Patents
Information detection method and electronic equipment Download PDFInfo
- 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
- service
- data
- 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
Links
- 238000001514 detection method Methods 0.000 title claims abstract description 29
- 238000004891 communication Methods 0.000 claims abstract description 108
- 230000006854 communication Effects 0.000 claims abstract description 108
- 238000000034 method Methods 0.000 claims abstract description 70
- 230000000875 corresponding effect Effects 0.000 claims description 52
- 230000005540 biological transmission Effects 0.000 claims description 16
- 230000002159 abnormal effect Effects 0.000 claims description 9
- 238000004590 computer program Methods 0.000 claims description 5
- 230000002596 correlated effect Effects 0.000 claims description 3
- 238000012545 processing Methods 0.000 description 27
- 230000006870 function Effects 0.000 description 23
- 230000008569 process Effects 0.000 description 16
- 238000007726 management method Methods 0.000 description 14
- 230000005236 sound signal Effects 0.000 description 12
- 238000010295 mobile communication Methods 0.000 description 11
- 230000003993 interaction Effects 0.000 description 8
- 238000010586 diagram Methods 0.000 description 7
- 230000004044 response Effects 0.000 description 6
- 230000003287 optical effect Effects 0.000 description 5
- 230000000694 effects Effects 0.000 description 4
- 239000000284 extract Substances 0.000 description 4
- 238000013528 artificial neural network Methods 0.000 description 3
- 230000008859 change Effects 0.000 description 3
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 229920001621 AMOLED Polymers 0.000 description 2
- 230000003416 augmentation Effects 0.000 description 2
- 230000008901 benefit Effects 0.000 description 2
- 230000001413 cellular effect Effects 0.000 description 2
- 238000013461 design Methods 0.000 description 2
- 230000007774 longterm Effects 0.000 description 2
- 238000012544 monitoring process Methods 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 230000009467 reduction Effects 0.000 description 2
- 241000220300 Eupsilia transversa Species 0.000 description 1
- 230000001133 acceleration Effects 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 230000007175 bidirectional communication Effects 0.000 description 1
- 238000013529 biological neural network Methods 0.000 description 1
- 210000000988 bone and bone Anatomy 0.000 description 1
- 210000004556 brain Anatomy 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000019771 cognition Effects 0.000 description 1
- 230000000295 complement effect Effects 0.000 description 1
- 239000004020 conductor Substances 0.000 description 1
- 239000013078 crystal Substances 0.000 description 1
- 238000007405 data analysis Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 230000009977 dual effect Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000001914 filtration Methods 0.000 description 1
- 230000036541 health Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000001939 inductive effect Effects 0.000 description 1
- 230000000977 initiatory effect Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 229910044991 metal oxide Inorganic materials 0.000 description 1
- 150000004706 metal oxides Chemical class 0.000 description 1
- 230000001537 neural effect Effects 0.000 description 1
- 210000002569 neuron Anatomy 0.000 description 1
- 238000012856 packing Methods 0.000 description 1
- 238000007639 printing Methods 0.000 description 1
- 239000002096 quantum dot Substances 0.000 description 1
- 230000005855 radiation Effects 0.000 description 1
- 230000001105 regulatory effect Effects 0.000 description 1
- 238000009877 rendering Methods 0.000 description 1
- 238000005070 sampling Methods 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
- 238000000926 separation method Methods 0.000 description 1
- 239000004984 smart glass Substances 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000001360 synchronised effect Effects 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/02—Capturing of monitoring data
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/04—Processing captured monitoring data, e.g. for logfile generation
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/72—Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
- H04M1/724—User interfaces specially adapted for cordless or mobile telephones
- H04M1/72403—User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
- H04M1/72409—User 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/72412—User 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
Technical Field
The present application relates to the field of electronic devices, and in particular, to an information detection method and an electronic device.
Background
Currently, the channel capability of communication is limited, whether bluetooth communication or dual-core communication between electronic devices. When multiple services need to occupy a channel at the same time, a series of problems caused by overload of the channel may be encountered.
Taking communication between the mobile phone and the watch as an example, if the communication is bluetooth communication between the mobile phone and the watch, a host control interface (Host controller Interface, HCI) log or a bluetooth air interface is arranged on the mobile phone side to monitor the channel. However, dual-core communication between the mobile phone and the watch lacks a way to monitor the channel, and the watch has limited storage and processing capabilities, and cannot store all information of the data packet of each service like the HCI log of the mobile phone.
Disclosure of Invention
The embodiment of the application provides an information detection method and electronic equipment, which are used for detecting data packets in a dual-core communication channel, and can adjust services according to statistical information so that each service can coordinate normal operation.
In order to achieve the above purpose, the embodiment of the present application adopts the following technical scheme:
In a first aspect, an information detection method is provided, where the method may be applied to a first electronic device, where the first electronic device includes a first chip and a second chip, and the method includes: 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.
By adopting the technical scheme, the detection of the dual-core communication channel can be realized by extracting the related information of the service message from the slave chip of the dual-core communication, the extracted information can be counted and analyzed, and the service can be further regulated according to the counted information, so that the service can be ensured to coordinate and normally run.
In one possible implementation, the first information includes at least one of: and receiving traffic information or sending traffic information, wherein the traffic information is determined according to the first data packet and the traffic information is determined according to the second data packet. The information of the received traffic here is information of a first data traffic of a first service received by the slave chip; the information of the transmission traffic is information of the second data traffic of the first traffic transmitted from the chip.
In one possible implementation, the received traffic is determined for the second chip based on the destination address of the first data packet.
In one possible implementation, the information of the received traffic includes at least one of: the number of received data packets (number of received packets), 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 one possible implementation, the transmit traffic is determined for the second chip based on the source address of the second data packet.
In one possible implementation, the information of the sending traffic includes at least one of: the number of transmitted data packets (the number of transmitted packets), or the amount of data corresponding to the transmitted data packets (the transmitted data length), wherein the transmitted data packets include the second data packet.
In one possible implementation, the method further includes: responding to a request of the second electronic equipment 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; the first chip determines a first data packet according to the third data packet.
In one possible implementation, the first information is further determined from a third data packet.
In one possible implementation, the sending traffic is also determined for the second chip according to the source address of the third data packet.
In one possible implementation, the transmitted data packet further includes a third data packet.
In one possible implementation, the method further includes: the first chip detects an operation performed by the user for 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 one possible implementation, the method further includes: the second chip determines the total number of the business running on the first electronic equipment according to the first information; the second chip schedules the operation of the business operated on the first electronic device according to the total number of the business operated on the first electronic device.
In one possible implementation manner, the second chip schedules the operation of the service running on the first electronic device according to the total number of the services running on the first electronic device, including: and if the total number of the services running on the first electronic equipment exceeds the number threshold, stopping running other services except the first service in the services running on the first electronic equipment by the second chip. Therefore, the method can be applied to the service performance special attack which depends on dual-core communication, and can be used for checking the time point and the reason of influencing the performance
In one possible implementation, the method further includes: 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. Therefore, the main frequency can be dynamically adjusted according to the total data flow, and system resources can be reasonably utilized.
In one possible implementation, the method further includes: the total data traffic is characterized by at least one of: the total number of data packets received and/or transmitted by the second chip, or the total data amount corresponding to the data packets received and/or transmitted by the second chip.
In one possible implementation, the method further includes: 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. Therefore, the channel state can be monitored, and the positioning is difficult when the channel is abnormal.
In one possible implementation, the data traffic of the first service being smaller than the traffic threshold means that: the number of data packets received and/or transmitted by the first service in the preset duration 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 duration is smaller than a data quantity threshold value.
In one possible implementation, the method further includes: 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 abnormal communication between the second chip and other electronic equipment. Therefore, the specific position of the packet loss can be assisted to be positioned.
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 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 of the above first aspects.
In a third aspect, the present application provides a computer readable storage medium having instructions stored therein which, when run on an electronic device, cause the electronic device to perform the method of any one of the first aspects above.
In a fourth aspect, the present application provides a computer program product comprising instructions which, when run on an electronic device, cause the electronic device to perform the method of any of the first aspects above.
It will be appreciated that the electronic device according to the second aspect, the computer readable storage medium according to the third aspect, and the computer program product according to the fourth aspect are all configured to perform the corresponding methods provided above, and therefore, the advantages achieved by the electronic device are referred to the advantages of the corresponding methods provided above, and are not repeated herein.
Drawings
Fig. 1 is a schematic diagram of a scenario in which a mobile phone communicates with a wristwatch according to an embodiment of the present application;
Fig. 2 is a schematic hardware structure of an electronic device according to an embodiment of the present application;
fig. 3 is a schematic diagram of an overall implementation of an information detection method according to an embodiment of the present application;
Fig. 4 is a schematic diagram of an information detection method for dual-core communication between a first electronic device and a second electronic device according to an embodiment of the present application;
fig. 5 is a software architecture diagram for dual-core communication of an electronic device according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a chip system according to an embodiment of the present application.
Detailed Description
The following description of the technical solutions according to the embodiments of the present application will be given with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present application without making any inventive effort, shall fall within the scope of the present application.
It should be noted that the following terms "first", "second", etc. are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first", "a second", etc. may explicitly or implicitly include one or more such feature. Furthermore, the terms "comprise" and "have," as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those listed steps or elements but may include other steps or elements not listed or inherent to such process, method, article, or apparatus.
Reference in the specification to "one embodiment" or "some embodiments" or the like means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," and the like in the specification are not necessarily all referring to the same embodiment, but mean "one or more but not all embodiments" unless expressly specified otherwise.
In embodiments of the application, words such as "exemplary" or "such as" are used to mean serving as an example, instance, or illustration. Any embodiment or design described herein as "exemplary" or "e.g." in an embodiment should not be taken as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "such as" is intended to present related concepts in a concrete fashion.
Currently, the channel capability of communication is limited, whether it be bluetooth communication between electronic devices or dual-core communication between electronic devices. When multiple services need to occupy a channel at the same time, a series of problems caused by overload of the channel may be encountered.
Referring to fig. 1, in a scenario where a first electronic device is in communication with a second electronic device, the first electronic device is a wearable device, such as a wristwatch 102, and the second electronic device is a mobile phone 101. In the prior art, if bluetooth communication is performed between a mobile phone and a watch, a host control interface (Host controller Interface, HCI) log or a bluetooth air interface is provided on the mobile phone side for monitoring a channel. However, dual-core communication between the mobile phone and the watch lacks a way to monitor the channel, and the watch has limited storage and processing capabilities, and cannot store all information of the data packet of each service like the HCI log of the mobile phone.
And, some special services need to occupy all the capabilities of the channel to realize efficient operation of the service. For example, in the scenario of space downloading Technology (OTA) upgrade of a wristwatch, the mobile phone sends a data packet to the bluetooth chip of the wristwatch, and the thread of the bluetooth chip directly transmits the data packet to the main chip of the wristwatch through the dual-core channel without processing the data packet. I.e. the watch will cease operation of other services associated with bluetooth. However, some businesses may run in the background without related log printing, and it is difficult to check and clear.
The dual-core communication refers to communication between a main core and a secondary core, wherein the main core has a strong chip processing capability, and the secondary core has a weak chip processing capability. The master core refers to a master chip and the slave core refers to a slave chip (or also referred to as a slave chip).
Therefore, the embodiment of the application provides an information detection method and electronic equipment, which are used for realizing the detection of a dual-core communication channel by extracting the related information of service messages from a slave chip of dual-core communication, counting and analyzing the extracted information, and further adjusting the service according to the counted information so as to ensure that each service can coordinate normal operation.
The electronic device in the embodiment of the present application may be a mobile phone, a tablet computer, a notebook computer, an Ultra-mobile Personal Computer (UMPC), a handheld computer, a wearable electronic device (for example, a smart watch, a smart bracelet, and a smart glasses), and the specific form of the electronic device is not particularly limited.
The execution body of the information detection method provided by the embodiment of the application can be an information detection device, and the execution device can be the electronic equipment shown in fig. 2. Meanwhile, the execution device can also be a central processing unit (Central Processing Unit, CPU) of the electronic equipment or a control module for information detection in the electronic equipment. In the embodiment of the application, an information detection method executed by an electronic device is taken as an example, and the information detection method provided by the embodiment of the application is described.
The following describes in detail the implementation of the embodiment of the present application with reference to the drawings. Taking the example that the electronic device is a mobile phone, a hardware structure of the electronic device (such as the electronic device 200) is described. Wherein the electronic device 200 shown in fig. 2 is only one example of an electronic device, and the electronic device 200 may have more or fewer components than shown in the figures, may combine two or more components, or may have a different configuration of components. The various components shown in fig. 2 may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and/or application specific integrated circuits.
Referring to fig. 2, fig. 2 shows a schematic hardware structure of an electronic device, and as shown in fig. 2, the electronic device 200 may include: processor 210, external memory interface 220, internal memory 221, usb interface 230, charge management module 240, power management module 241, battery 242, antenna 1, antenna 2, mobile communication module 250, wireless communication module 260, audio module 270, speaker 270A, receiver 270B, microphone 270C, headset interface 270D, sensor module 280, keys 290, motor 291, indicator 292, camera 293, display 294, and subscriber identity module (subscriber identification module, SIM) card interface 295, etc.
The sensor module 280 may include pressure sensors, gyroscope sensors, barometric pressure sensors, magnetic sensors, acceleration sensors, distance sensors, proximity sensors, fingerprint sensors, temperature sensors, touch sensors, ambient light sensors, bone conduction sensors, and the like.
Touch sensors, also known as "touch panels". The touch sensor may be disposed on the display screen 294, and the touch sensor and the display screen 294 form a touch screen, which is also called a "touch screen". The touch sensor is used to detect a touch operation acting on or near it. The detected touch operation may be communicated to an application processor to determine the touch event type and provide a corresponding visual output through the display 294. In other embodiments, the touch sensor may also be disposed on a surface of the electronic device 200 at a different location than the display 294.
The pressure sensor is used for sensing a pressure signal and can convert the pressure signal into an electric signal. In some embodiments, a pressure sensor may be provided at the display 294. Pressure sensors are of many kinds, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. The capacitive pressure sensor may be a capacitive pressure sensor comprising at least two parallel plates with conductive material. When a force is applied to the pressure sensor, the capacitance between the electrodes changes. The electronic device 200 determines the strength of the pressure from the change in capacitance. When a touch operation is applied to the display screen 294, the electronic apparatus 200 detects the touch operation intensity according to the pressure sensor. The electronic device 200 may also calculate the location of the touch based on the detection signal of the pressure sensor 280A. In some embodiments, touch operations that act on the same touch location, but at different touch operation strengths, may correspond to different operation instructions. For example: and executing an instruction for checking the short message when the touch operation with the touch operation intensity smaller than the first pressure threshold acts on the short message application icon. And executing an instruction for newly creating the short message when the touch operation with the touch operation intensity being greater than or equal to the first pressure threshold acts on the short message application icon.
It should be understood that the structure illustrated in the embodiments 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, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Processor 210 may include one or more processing units such as, for example: processor 210 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (IMAGE SIGNAL processor, ISP), a controller, a memory, a video codec, a digital signal processor (DIGITAL SIGNAL processor, DSP), a baseband processor, and/or a neural Network Processor (NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors.
The controller may be a neural hub and command center of the electronic device 200. The controller can generate operation control signals according to the instruction operation codes and the time sequence signals to finish the control of instruction fetching and instruction execution.
A memory may also be provided in the processor 210 for storing instructions and data. In some embodiments, the memory in the processor 210 is a cache memory. The memory may hold instructions or data that the processor 210 has just used or recycled. If the processor 210 needs to reuse the instruction or data, it may be called directly from the memory. Repeated accesses are avoided and the latency of the processor 210 is reduced, thereby improving the efficiency of the system.
In some embodiments, processor 210 may include one or more interfaces. The interfaces may include an integrated circuit (inter-INTEGRATED CIRCUIT, I2C) interface, an integrated circuit built-in audio (inter-INTEGRATED CIRCUIT SOUND, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous receiver transmitter (universal asynchronous receiver/transmitter, UART) interface, a mobile industry processor interface (mobile industry processor interface, MIPI), a general-purpose input/output (GPIO) interface, a subscriber identity module (subscriber identity module, SIM) interface, and/or a universal serial bus (universal serial bus, USB) interface, among others.
The I2C interface is a bi-directional synchronous serial bus comprising a serial data line (SERIAL DATA LINE, SDL) and a serial clock line (derailclock line, SCL). In some embodiments, the processor 210 may contain multiple sets of I2C buses. The processor 210 may be coupled to the touch sensor 280K, charger, flash, camera 293, etc., respectively, through different I2C bus interfaces. For example: the processor 210 may couple the touch sensor 280K through an I2C interface, so that the processor 210 communicates with the touch sensor 280K through an I2C bus interface to implement a touch function of the electronic device 200.
The I2S interface may be used for audio communication. In some embodiments, the processor 210 may contain multiple sets of I2S buses. The processor 210 may be coupled to the audio module 270 via an I2S bus to enable communication between the processor 210 and the audio module 270. In some embodiments, the audio module 270 may communicate audio signals to the wireless communication module 260 through the I2S interface to implement a function of answering a call through a bluetooth headset.
PCM interfaces may also be used for audio communication to sample, quantize and encode analog signals. In some embodiments, the audio module 270 and the wireless communication module 260 may be coupled by a PCM bus interface. In some embodiments, the audio module 270 may also transmit audio signals to the wireless communication module 260 through the PCM interface to implement a function of answering a call through the bluetooth headset. Both the I2S interface and the PCM interface may be used for audio communication, the sampling rates of the two interfaces being different.
The UART interface is a universal serial data bus for asynchronous communications. The bus is a bi-directional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, a UART interface is typically used to connect the processor 210 with the wireless communication module 260. For example: the processor 210 communicates with the bluetooth module through a UART interface to implement a bluetooth function. In some embodiments, the audio module 270 may transmit an audio signal to the wireless communication module 260 through a UART interface, implementing a function of playing music through a bluetooth headset.
The MIPI interface may be used to connect the processor 210 to peripheral devices such as the display 294, the camera 293, and the like. The MIPI interfaces include camera serial interfaces (CAMERASERIAL INTERFACE, CSI), display serial interfaces (DISPLAY SERIAL INTERFACE, DSI), and the like. In some embodiments, processor 210 and camera 293 communicate through a CSI interface to implement the photographing functions of electronic device 200. The processor 210 and the display 294 communicate via a DSI interface to implement the display functions of the electronic device 200.
The GPIO interface may be configured by software. The GPIO interface may be configured as a control signal or as a data signal. In some embodiments, a GPIO interface may be used to connect the processor 210 with the camera 293, display 294, wireless communication module 260, audio module 270, sensor module 280, and the like. The GPIO interface may also be configured as an I2C interface, an I2S interface, a UART interface, an MIPI interface, etc.
USB interface 230 may be a Mini USB interface, micro USB interface, 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 transfer data between the electronic device 200 and a peripheral device. And can also be used for connecting with a headset, and playing audio through the headset. But also for connecting other electronic devices, such as AR devices, etc.
It should be understood that the connection relationship between the modules illustrated in this embodiment is only illustrative, and does not limit the structure of the electronic device 200. In other embodiments, the electronic device 200 may also employ different interfaces in the above embodiments, or a combination of interfaces.
The charge management module 240 is configured to receive a charge input from a charger. The charger is a wired charger in the embodiment of the present application, and the charging management module 240 may receive a charging input of the wired charger through the USB interface 230 (i.e., the charging interface described above). The battery 442 may be charged by the charge management module 240, and the electronic device may be powered by the power management module 441.
The power management module 441 is configured to connect the battery 442, the charge management module 240 and the processor 210. The power management module 441 receives input from the battery 442 and/or the charge management module 240 to power the processor 210, the internal memory 221, the external memory, the display 294, the camera 293, the wireless communication module 260, and the like. The power management module 441 may also be configured to monitor battery capacity, battery cycle number, battery health (leakage, impedance) and other parameters. In other embodiments, the power management module 441 may also be disposed in the processor 210. In other embodiments, the power management module 441 and the charge management module 240 may be disposed in the same device.
The wireless communication function of the electronic device 200 can be implemented by the antenna 1, the antenna 2, the mobile communication module 250, the wireless communication module 260, a modem processor, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the electronic device 200 may be used to cover a single or multiple communication bands. Different antennas may also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed into a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The radio frequency module may provide a communication processing module including a solution of 2G/3G/4G/5G wireless communication applied to the electronic device 200. The radio frequency module may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA), etc. The radio frequency module receives electromagnetic waves from the antenna 1, filters, amplifies and the like the received electromagnetic waves, and transmits the electromagnetic waves to the modem for demodulation. The radio frequency module can amplify the signal modulated by the modem and convert the signal into electromagnetic waves to radiate through the antenna 1. In some embodiments, at least some of the functional modules of the radio frequency module may be disposed in the processor 210. In some embodiments, at least some of the functional modules of the radio frequency module may be disposed in the same device as at least some of the modules of the processor 210.
The mobile communication module 250 may provide a solution for wireless communication including 2G/3G/4G/5G, etc., applied on the electronic device 200. The mobile communication module 250 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA), or the like. The mobile communication module 250 may receive electromagnetic waves from the antenna 1, perform processes such as filtering, amplifying, and the like on the received electromagnetic waves, and transmit the processed electromagnetic waves to the modem processor for demodulation.
The mobile communication module 250 can amplify the signal modulated by the modem processor, and convert the signal into electromagnetic waves through the antenna 1 to radiate. In some embodiments, at least some of the functional modules of the mobile communication module 250 may be disposed in the processor 210. In some embodiments, at least some of the functional modules of the mobile communication module 250 may be provided in the same device as at least some of the modules of the processor 210.
The wireless communication module 260 may provide solutions for wireless communication including wireless local area network (wireless local area networks, WLAN) (e.g., wireless fidelity (WIRELESS FIDELITY, wi-Fi) network), bluetooth (BT), global navigation satellite system (global navigation SATELLITE SYSTEM, GNSS), frequency modulation (frequency modulation, FM), near field communication (NEAR FIELD communication, NFC), infrared (IR), etc., as applied to the electronic device 200. For example, in an embodiment of the present application, the electronic device 200 may access a Wi-Fi network through the wireless communication module 260.
The wireless communication module 260 may be one or more devices that integrate at least one communication processing module. The wireless communication module 260 receives electromagnetic waves via the antenna 2, modulates the electromagnetic wave signals, filters the electromagnetic wave signals, and transmits the processed signals to the processor 210. The wireless communication module 260 may also receive a signal to be transmitted from the processor 210, frequency modulate it, amplify it, and convert it to electromagnetic waves for radiation via the antenna 2.
In some embodiments, antenna 1 and mobile communication module 250 of electronic device 200 are coupled, and antenna 2 and wireless communication module 260 are coupled, such that electronic device 200 may communicate with a network and other devices via wireless communication techniques. The wireless communication techniques can include the Global System for Mobile communications (global system for mobile communications, GSM), general packet radio service (GENERAL PACKET radio service, GPRS), code division multiple access (code division multiple access, CDMA), wideband code division multiple access (wideband code division multiple access, WCDMA), time division code division multiple access (time-divisioncode division multiple access, TD-SCDMA), long term evolution (long term evolution, LTE), BT, GNSS, WLAN, NFC, FM, and/or IR techniques, among others. The GNSS may include a global satellite positioning system (global positioning system, GPS), a global navigation satellite system (global navigation SATE LLITE SYSTEM, GLONASS), a beidou satellite navigation system (beidou navigation SATELLITE SYSTEM, BDS), a quasi zenith satellite system (quasi-zenith SATELLITE SYSTEM, QZSS) and/or a satellite based augmentation system (SATELLITE BASED AUGMENTATION SYSTEMS, SBAS).
The electronic device 200 implements display functions through a GPU, a display screen 294, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display screen 294 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 210 may include one or more GPUs that execute program instructions to generate or change display information.
The display 294 is used to display images, videos, and the like. The display 294 includes a display panel. The display panel may employ a Liquid Crystal Display (LCD) CRYSTAL DISPLAY, an organic light-emitting diode (OLED), 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), or the like. In some embodiments, the electronic device 200 may include 1 or N display screens 294, N being a positive integer greater than 1.
In embodiments of the present application, the display 294 may be used to display an interface of an electronic device. The display 294 may be used to display a system desktop of the electronic device, which may include a plurality of application icons. The application icons may be displayed in different locations on the display screen 294, i.e., a layout of the system desktop constituting the electronic device.
The electronic device 200 may implement a photographing function through an ISP, a camera 293, a video codec, a GPU, a display 294, an application processor, and the like.
The ISP is used to process the data fed back by the camera 293. For example, when photographing, the shutter is opened, light is transmitted to the camera photosensitive element through the lens, the optical signal is converted into an electric signal, and the camera photosensitive element transmits the electric signal to the ISP for processing and is converted into an image visible to naked eyes. ISP can also optimize the noise, brightness and skin color of the image. The ISP can also optimize parameters such as exposure, color temperature and the like of a shooting scene. In some embodiments, the ISP may be provided in the camera 293.
The camera 293 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image onto the photosensitive element. The photosensitive element may be a charge coupled device (charge coupled device, CCD) or a Complementary Metal Oxide Semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, which is then transferred 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 the like format. In some embodiments, the electronic device 200 may include 1 or N cameras 293, N being a positive integer greater than 1.
The digital signal processor is used for processing digital signals, and can process other digital signals besides digital image signals. For example, when the electronic device 200 is selecting a frequency bin, the digital signal processor is used to fourier transform the frequency bin energy, or the like.
Video codecs are used to compress or decompress digital video. The electronic device 200 may support one or more video codecs. In this way, the electronic device 200 may play or record video in a variety of encoding formats, such as: dynamic picture experts group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
The NPU is a neural-network (NN) computing processor, and can rapidly process input information by referencing a biological neural network structure, for example, referencing a transmission mode between human brain neurons, and can also continuously perform self-learning. Applications such as intelligent cognition of the electronic device 200 may be implemented by the NPU, for example: image recognition, face recognition, speech recognition, text understanding, etc.
The external memory interface 220 may be used to connect an external memory card, such as a MicroSD card, to enable expansion of the memory capabilities of the electronic device 200. The external memory card communicates with the processor 210 through an external memory interface 220 to implement data storage functions. For example, files such as music, video, etc. are stored in an external memory card.
Internal memory 221 may be used to store computer executable program code that includes instructions. The processor 210 executes various functional applications of the electronic device 200 and data processing by executing instructions stored in the internal memory 221. For example, in an embodiment of the present application, the processor 210 may include a memory program area and a memory data area by executing instructions stored in the internal memory 221.
The storage program area may store an application program (such as a sound playing function, an image playing function, etc.) required for at least one function of the operating system, etc. The storage data area may store data created during use of the electronic device 200 (e.g., audio data, phonebook, etc.), and so on. In addition, the internal memory 221 may include a high-speed random access memory, and may further include a nonvolatile memory such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (universal flash storage, UFS), and the like.
The electronic device 200 may implement audio functions through an audio module 270, a speaker 270A, a receiver 270B, a microphone 270C, an ear-headphone interface 270D, an application processor, and the like. Such as music playing, recording, etc.
The audio module 270 is used to convert digital audio information into an analog audio signal output and also to convert an analog audio input into a digital audio signal. The audio module 270 may also be used to encode and decode audio signals. In some embodiments, the audio module 270 may be disposed in the processor 210, or some functional modules of the audio module 270 may be disposed in the processor 210.
Speaker 270A, also referred to as a "horn," is used to convert audio electrical signals into sound signals. The electronic device 200 may listen to music, or to hands-free conversations, through the speaker 270A.
A receiver 270B, also referred to as a "earpiece", is used to convert the audio electrical signal into a sound signal. When electronic device 200 is answering a telephone call or voice message, voice may be received by placing receiver 270B close to the human ear.
Microphone 270C, also referred to as a "microphone" or "microphone," is used to convert sound signals into electrical signals. When making a call or transmitting voice information, the user can sound near the microphone 270C through the mouth, inputting a sound signal to the microphone 270C. The electronic device 200 may be provided with at least one microphone 270C. In some embodiments, the electronic device 200 may be provided with two microphones 270C, and may implement a noise reduction function in addition to collecting sound signals. In some embodiments, the electronic device 200 may also be provided with three, four, or more microphones 270C to enable collection of sound signals, noise reduction, identification of sound sources, directional recording functions, etc. In the embodiment of the application, after the voice control function is started, the electronic equipment can receive the voice information of the user through the microphone in the supported video application.
The earphone interface 270D is for connecting a wired earphone. Earphone interface 270D may be USB interface 230 or a 3.5mm open mobile electronic device platform (open mobile terminal platform, OMTP) standard interface, american cellular telecommunications industry association (cellular telecommunications industry association of the USA, CTIA) standard interface.
Keys 290 include a power on key, a volume key, etc. The keys 290 may be mechanical keys. Or may be a touch key. The electronic device 200 receives key 290 inputs, generating key signal inputs related to user settings and function control of the electronic device 200.
The motor 291 may generate a vibration alert. The motor 291 may be used for incoming call vibration alerting or for touch vibration feedback. For example, touch operations acting on different applications (e.g., photographing, audio playing, etc.) may correspond to different vibration feedback effects. Touch operations applied to different areas of the display 294 may also correspond to different vibration feedback effects. Different application scenarios (such as time reminding, receiving information, alarm clock, game, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect may also support customization.
The indicator 292 may be an indicator light, which may be used to indicate a state of charge, a change in power, a message indicating a missed call, a notification, etc.
The SIM card interface 295 is for interfacing with a SIM card. The SIM card may be inserted into the SIM card interface 295 or removed from the SIM card interface 295 to enable contact and separation from the electronic device 200. The electronic device 200 may support 1 or N SIM card interfaces, N being a positive integer greater than 1. The SIM card interface 295 may support Nano SIM cards, micro SIM cards, and the like.
The methods in the following embodiments may be implemented in the electronic device 200 having the above-described hardware structure. The same SIM card interface 295 may be used to insert multiple cards simultaneously. The types of the plurality of cards may be the same or different. The SIM card interface 295 may also be compatible with different types of SIM cards. The SIM card interface 295 may also be compatible with external memory cards. The electronic device 200 interacts with the network through the SIM card to realize functions such as communication and data communication. In some embodiments, the electronic device 200 employs an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device 200 and cannot be separated from the electronic device 200.
Although not shown in fig. 2, the electronic device 200 may also be a flash, a micro-projection device, a Near field communication (Near FieldCommunication, NFC) device, etc., which are not described herein.
The methods in the following embodiments may be implemented in the electronic device 200 having the above-described hardware structure.
The embodiment of the application provides an information detection method and electronic equipment, which can detect a dual-core communication channel of the electronic equipment. The dual-core communication can be communication between two electronic devices or communication in a single electronic device.
In the scenario where two electronic devices are in 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 comprises a first chip and a second chip. The first chip may be set as a master chip and the second chip may be set as a slave chip. The main chip is generally referred to as a microcontroller (Microcontroller Unit, MCU) chip. The slave chip may be a bluetooth chip, such as a BES chip, or a MODEM chip, for example.
Take the slave chip as a bluetooth chip as an example. The wireless connection between the first electronic device and the second electronic device is established and may be, for example, a bluetooth connection. The first electronic device and the second electronic device perform dual-core communication, namely, service message interaction is performed between the first electronic device and the second electronic device. Generally, the service running between the first electronic device and the second electronic device is a pass-through service. The service initiated on the second electronic device is to send a message to the master chip of the first electronic device, and the master chip determines whether to send the message to the slave chip to process the corresponding service according to the service requirement. In the process that the second electronic device sends the message to the main chip of the first electronic device, the message is sent to the slave chip of the first electronic device, and then the slave chip sends the message to the main chip.
It will be appreciated that, due to the limited processing power of the slave chip, the second electronic device will not send a message request process directly to the slave chip, i.e. the message purpose will not be the slave chip. The slave chip is only used for transmitting the message to the master chip, and after the master chip analyzes the message, the master chip determines whether the message needs to be sent to the slave chip again for processing or the master chip directly processes the message.
In the scenario where dual-core communication is conducted in a single electronic device, the first electronic device may be a wearable device, such as a watch. The first electronic device comprises a master chip and a slave chip. And initiating a service on a master chip on the first electronic device, sending a message to a slave chip by the master chip, and processing corresponding service by the slave chip according to the message.
The communication between the master chip and the slave chip is dual-core communication. The service of dual-core communication may include an audio service, a log service, a bluetooth service, etc.
The embodiment of the application detects the data packet received from the chip. For the slave chip, the slave chip contains a thread for processing the data packet for packing, unpacking, checking and the like. Taking the BES Bluetooth chip as an example, the thread for processing the included data packet is a Communication (COMMU) thread. The slave chip, whether receiving or sending the message, processes the message through the COMMU thread. Therefore, a channel monitoring mechanism can be established in the COMMU threads of the slave chip, and key information of the message passing through the slave chip each time can be extracted, wherein the key information comprises a service identifier, a message source, a message destination and a data length corresponding to the message. The sending condition and receiving condition corresponding to each service, namely the sending packet number, the sending data length, the receiving packet number and the receiving data length of each service can be determined according to the key information. And can count all sending conditions and all receiving conditions of the message in the channel and the service conditions of each service within a period of time.
In the embodiment of the present application, in the process of service interaction, for example, in the case that a user performs an operation for a certain service (set as a first service), a message is sent to the corresponding first service.
In the embodiment of the application, the second electronic device can trigger the service execution in the first electronic device. For example, the mobile phone controls music playing of the watch in response to a certain operation of the mobile phone by the user. Specifically, the second electronic device may detect an operation performed by the user for the first service, for example, may detect a touch operation performed by the user on a control corresponding to the first service in the second electronic device, and send a message to the main chip of the first electronic device. The second electronic device sends a message to the master 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 transparently transmits the message to the master chip. Specifically, the second electronic device sends the message to the slave chip through wireless communication, and then the slave chip sends the message to the master chip through dual-core communication. After receiving the message sent by the second electronic device, the master chip analyzes the message, and if the message is analyzed to be the service needing the slave chip to participate in processing, the master chip repackages the message and sends the message to the slave chip through dual-core communication. And the slave chip analyzes the received information and sends the information to the application corresponding to the analyzed service so as to enable the application to execute the service.
In the embodiment of the application, the first electronic device can trigger the service operation in the first electronic device. For example, the wristwatch controls music play of the wristwatch in response to a user operation of the wristwatch screen. Specifically, the detection of the operation performed by the user on the first service by the master chip of the first electronic device may be, for example, detection of a touch operation performed by the user on a control corresponding to the first service in the first electronic device, where the master chip of the first electronic device sends a message to the slave chip. And the slave chip analyzes the received information and sends the information to a first application corresponding to the analyzed first service so as to enable the first application to execute the first service.
After receiving the message and executing the corresponding service, the application sends service data to the slave chip, namely, the result of executing the service. The slave chip encapsulates the received service data to obtain an encapsulated message, and sends the message to the master chip. If the second electronic device detects the operation executed by the user for the first service, the slave chip sends the packaged message to the first electronic device. The operation performed by the user with respect to the first service herein refers to the user requesting, through the second electronic device, the first service of executing the first application.
It will be appreciated that in wireless communication and dual core communication, data packets are transmitted, i.e. the application layer traffic messages are encapsulated into data packets. The wireless communication is transmitted by a Bluetooth data packet, and the dual-core communication is transmitted by a dual-core data packet.
In the process of message interaction, the message received from the chip, that is, the data packet received from the chip, may be a data packet to be transmitted (may be set as a third data packet) to be sent to the master chip, or a data packet to be sent by the master chip (may be set as a first data packet) received, or service data returned by the received service, and the data packet to be sent (may be set as a second data packet) obtained after the service data is encapsulated.
The first data packet is used for indicating 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 the moment, the slave chip receives service data sent by the first service, a second data packet is obtained after the service data are packaged, and then the slave chip sends the second data packet to the master chip.
And if the second electronic equipment 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 equipment. The data packet is a third data packet, which is used to indicate the service requirement that the first service request is performed. That is, after the third data packet is sent from the chip to the master chip, the master chip may determine the first data packet according to the third data packet.
Then, the message in the slave chip is extracted, that is, each received data packet is parsed, and header information of the data packet is extracted. The data packet may include a packet header and a payload (payload), where the payload is valid data of the service, and the packet header may include a message source, a message destination, an identifier of the service, and a data length.
In the embodiment of the application, the data packet in the slave chip is extracted for each pass, that is, the information (set as the first information) for characterizing the data traffic of the first service is determined. If the request of executing the first service on the second electronic device is not detected, the first information is determined according to the first data packet and the second data packet. If the request of executing the first service on the second electronic device is detected, the first information is determined according to the first data packet, the second data packet and the third data packet.
In the embodiment of the application, the first information determined in the preset time period can be counted. The information of the data traffic corresponding to each service can be stored through a structure body, and the structure body is a data set formed by a series of data with the same type or different types. Each service structure is distinguished by the service identification ID, and the service structure contains the information of the data traffic of the corresponding service. For example, the first traffic structure includes first information of data traffic of the first traffic.
The first information includes at least one of: and receiving traffic information or sending traffic information, wherein the traffic information is determined according to the first data packet and the traffic information is determined according to the second data packet. The information of the received traffic here is information of a first data traffic of a first service received by the slave chip; the information of the transmission traffic is information of the second data traffic of the first traffic transmitted from the chip. The information of the received traffic here includes at least one of the following: the number of received data packets (number of received packets), or the data amount (received data length) corresponding to the received data packets, and the information of the transmission traffic includes at least one of the following: the number of transmitted packets (the number of transmitted packets), or the amount of data corresponding to the transmitted packets (the transmission data length).
The received traffic is determined for the slave chip according to the destination address (message destination) of the first data packet, or it may be determined that the first data packet is a received packet, or the received data packet includes the first data packet. The sending traffic is determined for the slave chip according to the source address (message source) of the second data packet, or it may be determined that the second data packet is a sending packet, or the sending data packet includes the second data packet. The sending traffic is also determined for the slave chip according to the source address of the third data packet, or it may be determined that the second data packet is a sending packet, or the sending data packet includes the second data packet.
In particular, the slave chip can distinguish whether to send or receive packets according to the source and destination of the messages in the data packets. If the second electronic device sends a message to the main chip of the first electronic device, the message source is the second electronic device, and the message destination is the main chip of the first electronic device in the data packet encapsulated by the second electronic device. Then the data packets received from the chip are only intended for transmission to the master chip and the message is not intended for the slave chip. Thus, it can be considered that the slave chip transmits a data packet to the master chip, the data packet is parsed and extracted, and the message source of the data packet may be the slave chip, and the transmission data packet and the transmission data length corresponding to the service are obtained. If the master chip sends a message to the slave chip, the source of the message in the data packet encapsulated by the master chip is the master chip, and the message is aimed at the slave chip, so that the slave chip analyzes and extracts the received data packet, and the received data packet and the received data length corresponding to the service are obtained. If the application corresponding to the service sends a message to the master chip, the message is sent to the slave chip, and the service data is also concerned. The slave chip encapsulates the service data, the message source is the slave chip, and the message destination is the master chip, so that the received data packet and the received data length of the corresponding service are extracted from the slave chip.
If the number of the data packets is larger, the transmission data length is smaller, and the efficiency of generating the data packets at the moment is considered to be low, namely that the service of the data packets does not well utilize the channel, and channel resources are wasted.
And accumulating the number of sending packets, the number of receiving packets, the sending data length and the receiving data length of the service in the time period according to the information extracted in the preset time period in each service structure body.
The service structures are stored in a linked list mode, and the beginning of the linked list is a total node structure which is the sum of all the extracted service information and comprises the total number of sending packets, the total number of receiving packets, the total sending data length and the total receiving data length.
In the overall implementation schematic diagram of the information detection method shown in fig. 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 and the communication thread of the slave chip can carry out interaction of Bluetooth data packets, and the slave chip and the master chip can carry out interaction of dual-core communication packets. The interaction of the bluetooth data packet and the interaction of the dual-core communication packet may refer to the specific description of the interaction of the data packet in the first electronic device and the master chip, and the master chip and the slave chip in the embodiment of the present application. The data packets can be packed, unpacked, checked and the like in the communication thread of the slave chip. For example, the data packet is parsed to obtain message 1, message 2 and message 3. The information corresponding to the message 1 comprises a message source, an A service, a message destination, a data length and effective data of the service. The information corresponding to the message 2 comprises a message source, a B service, a message destination, a data length and effective data of the service. The information corresponding to the message 3 comprises a message source, a C service, a message destination, a data length and effective data of the service. After receiving the message, the communication thread of the slave chip can distribute the message to the corresponding business process through inter-thread communication, wherein the message 1 corresponds to the A business thread, the message 2 corresponds to the B business thread, and the message 3 corresponds to the C business thread.
The key information of the message, such as the corresponding service and the message size (data length), that is, the message source, the service identification, the message destination and the data length, are extracted from the chip while the message is transmitted from the chip to the main chip or distributed to the corresponding service according to the message, and are counted in the structure of the channel bandwidth of the slave chip.
After the service execution is finished, a message needs to be sent to the master chip, and a request is sent to the slave chip. After receiving the request message, the communication thread of the slave chip encapsulates the message header and the message tail, and if necessary, splits the message. In the encapsulated message header, the corresponding service and message size, i.e. message source, service identification, message destination and data length, will be included. This information is extracted from the chip and is counted in the structure of the channel bandwidth of the slave chip.
The total node structure body is arranged at the head of the linked list, and then the A service structure body and the B service structure body. By adopting the linked list structure, the memory can be saved, the node corresponding to the service can be created only when the service runs, and other non-running services can not occupy the memory. And the linked list traverses the data faster, so that the efficiency of data analysis is higher.
According to the embodiment of the application, after the information of each service in the chip is extracted and counted in the preset time period, the corresponding structure body of each service is obtained, and the load of the channel and the service with the highest utilization rate can be obtained by carrying out traversal analysis on each service structure body. For example, if the number of transmission packets of the B service is the largest in half an hour, the B service is the service with the highest usage rate in the period. And after a preset time period, the slave chip can clear the linked list to prevent excessive memory use. The preset time period may be 10 minutes, 15 minutes, or the like. Here, the load of the channel means that the data amount of the data packet in the preset time period is limited, and can be determined according to the number of the transmission packets and the transmission data length in the preset time period.
As shown in fig. 4, the information detection method is described in detail by taking dual-core communication between the first electronic device and the second electronic device as an example. In fig. 4, the second electronic device may send a message to the slave chip of the first electronic device in response to a touch operation of a user on a control corresponding to a certain service in the second electronic device, where the slave chip transparently transmits the message to the master chip of the first electronic device. After receiving the message sent by the second electronic device, the master chip analyzes the message, and if the message is analyzed to be the service needing the slave chip to participate in processing, the master chip repackages the message and sends the message to the slave chip through dual-core communication. And the slave chip analyzes the received information and sends the information to the application corresponding to the analyzed service so as to enable the application to execute the service.
When the slave chip receives a data packet to be transmitted to the master chip, the slave chip can extract information of the data packet. When the slave chip receives the data packet sent by the master chip, the slave chip can extract information from the data packet. After receiving service data sent after service execution, the slave chip encapsulates the data and can extract information from the data packet.
For example, in a scenario where a mobile phone plays and controls a watch to play music, after receiving a play control message of the mobile phone transmitted by a bluetooth chip (slave chip), an MCU chip (master chip) of the watch parses the message to determine that the bluetooth chip is required to perform audio encoding and decoding. Then, the MCU chip repacks the Bluetooth valid data, namely the audio codec content, and sends the Bluetooth data to the Bluetooth chip. The bluetooth chip then sends a message to the corresponding audio application.
Referring to fig. 5, fig. 5 is a schematic diagram of a software architecture for dual-core communication of an electronic device according to an embodiment of the present application. As shown in fig. 5, the master chip and the slave chip of the first electronic device each include an upper layer, a link layer and a physical layer. The channels of Bluetooth communication and dual-core communication are all at 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 physical layer of the slave chip sends the key information in the data packet to the hardware link layer, and then the data packet is sent to the physical layer after the key information in the data packet is extracted by the link layer, and then the data packet is sent to the physical layer of the master chip through the dual-core channel. The physical layer of the master chip then sends the 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 analyzes the data packet, if the data packet is analyzed to be the business which needs the slave chip to participate in the processing, the data which is effective in the slave chip is repackaged into the data packet. The upper layer of the main chip transmits the data packet to the link layer of the main chip, and the link layer of the main chip transmits the data packet to the physical layer of the main chip. The master chip then sends the data packet to the slave chip's physical layer 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 the key information in the data packet is extracted from the chip link layer, the effective data of the service in the data packet is sent to the corresponding service (application layer).
According to the information detection method, the detection of the dual-core communication channel is realized by extracting the related information of the service message from the slave chip of the dual-core communication, the extracted information can be counted and analyzed, and the service can be adjusted according to the counted information. The details of the service adjustment are described below.
In some embodiments, the slave chip may determine a total number of services running on the first electronic device from the first information; the slave chip may schedule the operation of the service running on the first electronic device according to the total number of services running on the first electronic device. And if the total number of the services running on the first electronic equipment exceeds the number threshold, stopping running other services except the first service in the services running on the first electronic equipment from the chip. For example, when the method is applied to the attack of the special service performance, that is, only the first service can be operated, if only one service is provided for the first service, and if the total number of operated services is greater than 1, the operation of other services except the first service in the services operated on the first electronic equipment is stopped from the chip.
For example, when applied to a service performance specific attack, some services need to occupy all channels due to limited channel performance, for example, a service. If the information of the B service is counted in the channel counting information, the total number of the services is 2. Then, a notification can be sent to the application corresponding to the B service, notifying it to make the rectification. And each time the packet information of the running service is recorded, the time point of the service is recorded at the same time. That is, in the attack of the special service performance relying on dual-core communication, the information detection method of the embodiment of the application can check the time point and the reason of influencing the performance, and can know at which time point the B service is running.
When the problem of packet loss is encountered, the information detection method provided by the embodiment of the application can assist in locating the specific position of packet loss. And the slave chip determines the packet loss number of the data packets of the first service according to the first information, and if the packet loss number of the data packets of the first service is larger than the threshold value of the packet loss number, the slave chip reports that the communication between the slave chip and other electronic equipment is abnormal. The number of lost packets refers to the difference between the data of the packet that should be received from the chip and the number of packets currently received. The threshold of the number of lost packets can be set according to the service requirement.
For example, the second electronic device may set, in response to a click operation of a button by a user, to send X packets to the main chip of the first electronic device for a service corresponding to the button. If the service is not successfully executed, the number of the data packets received by the main chip can be determined by checking the log of the main chip. If the log is checked to obtain that the X data packets are not received, the number of the lost packets is considered to be larger than the packet loss data threshold value. At this time, it means that the packet loss occurs during the process of sending the data packet from the second electronic device to the main chip of the first electronic device.
The number of packets sent can then be checked from the information counted by the slave chip, i.e. the traffic structure, to determine whether the message has passed the slave chip. If the number of the sending packets corresponding to the service in the service structure body is not X, the second electronic device can be considered to not send the corresponding data packet to the Bluetooth chip, and the second electronic device can be positioned to receive the click operation of the button by the user but is not effective. If the number of the transmission packets corresponding to the service in the service structure body is X, it can be positioned that packet loss occurs in the process of transmitting the data packet from the chip to the main chip. At this time, the adjustment and improvement can be performed for the specific position of the packet loss, for example, the user's re-touch operation on the service control is received, and whether the confirm button is actually disabled is detected again.
Because the services of dual-core communication between the electronic devices are all transparent transmission services, the information detection method provided by the embodiment of the application can monitor the information source in the data packet. In the case where the message source is an application of the second electronic device, if it is found that the message source is not counted at the time of information counting, the second electronic device itself or communication between the second electronic device and the slave chip may be considered to be problematic.
In the embodiment of the application, the channel state can be monitored, and the channel is prevented from being difficult to position when abnormal. If the channel rate is detected to be seriously reduced within a certain period of time, the statistical information can be used for checking the service of the message in the channel under the abnormal condition, so as to check whether the service can damage the channel or even influence the system operation. In the preset time period, the total sending packet number and the receiving packet number of the statistical information in the chip normally have a threshold value. A significant decrease in channel rate over a period of time means that the total number of transmitted and received packets of the statistics is now much smaller than the threshold.
In the embodiment of the application, most of the services of the slave chip depend on dual-core communication, so that the service busy condition of the slave chip and the message quantity are in positive correlation. The electronic device can dynamically adjust the main frequency of the slave chip according to the use condition of the channel. When the message frequency is high, the main frequency is improved, and the performance is improved; and when the message frequency is low, the main frequency is reduced, and the power consumption is reduced. Compared with the fixed minimum value and maximum value of the main frequency, the embodiment of the application can dynamically adjust the main frequency according to the message frequency or total data flow, and reasonably utilize the system resources. The total data traffic is characterized by at least one of: the total number of data packets received and/or transmitted from the chip, or the total amount of data corresponding to the data packets received and/or transmitted from the chip. The total data traffic is positively correlated with the frequency of the master frequency of the slave chip.
In the embodiment of the application, if the data traffic of the first service is smaller than the traffic threshold, the abnormal information of the first service is reported from the chip. The data traffic of the first service being smaller than the traffic threshold means that: the number of data packets received and/or transmitted by the first service in the preset duration 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 duration is smaller than a data quantity threshold value. For example, if the number of data packets transmitted and received in the statistical information is small for a period of time, for example, 1 or 2 data packets, the electronic device in which the slave chip is located may be considered to be in a standby state. Then the application affecting the power consumption can be turned off in the electronic device and the dominant frequency is adjusted to be the lowest. According to the embodiment of the application, the primary main frequency does not need to be increased when the data packet is received, and the power consumption can be saved.
The embodiment of the present application also provides a chip system, as shown in fig. 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 may be interconnected by wires. For example, the interface circuit 902 may be used to receive signals from other devices (e.g., a memory of an electronic apparatus). For another example, interface circuitry 902 may be used to send signals to other devices (e.g., processor 901). The interface circuit 902 may, for example, read instructions stored in a memory and send the instructions to the processor 901. The instructions, when executed by the processor 901, may cause the electronic device to perform the various steps of the embodiments described above. Of course, the system-on-chip may also include other discrete devices, which are not particularly limited in accordance with embodiments of the present application.
The embodiment of the application also provides a computer storage medium, which comprises computer instructions, when the computer instructions run on the electronic equipment, the electronic equipment is caused to execute the functions or steps executed by the mobile phone in the embodiment of the method.
The embodiment of the application also provides a computer program product which, when run on a computer, causes the computer to execute the functions or steps executed by the mobile phone in the above method embodiment.
It will be apparent to those skilled in the art from this description that, for convenience and brevity of description, only the above-described division of the functional modules is illustrated, and in practical application, the above-described functional allocation may be performed by different functional modules according to needs, i.e. the internal structure of the apparatus is divided into different functional modules to perform all or part of the functions described above.
In the several embodiments provided by the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the modules or units is merely a logical functional division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another apparatus, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and the parts displayed as units may be one physical unit or a plurality of physical units, may be located in one place, or may be distributed in a plurality of different places. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a readable storage medium. Based on such understanding, the technical solution of the embodiments of the present application may be essentially or a part contributing to the prior art or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium, including several instructions for causing a device (may be a single-chip microcomputer, a chip or the like) or a processor (processor) to perform all or part of the steps of the method described in the embodiments of the present application. And the aforementioned storage medium includes: a usb disk, a removable hard disk, a read-only memory (read on ly memory, ROM), a random access memory (random access memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely illustrative of specific embodiments of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions within the technical scope of the present application should be covered by the 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.
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)
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)
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 |
-
2023
- 2023-07-11 CN CN202310851375.8A patent/CN117081949B/en active Active
Patent Citations (2)
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 |
---|---|---|
CN110364151B (en) | Voice awakening method and electronic equipment | |
US11683850B2 (en) | Bluetooth reconnection method and related apparatus | |
CN113382397A (en) | Bluetooth connection method, equipment and system | |
CN114422340B (en) | Log reporting method, electronic equipment and storage medium | |
CN113126948B (en) | Audio playing method and related equipment | |
US20240224357A1 (en) | Data Download Method, Apparatus, and Terminal Device | |
CN110742580A (en) | Sleep state identification method and device | |
CN113676339B (en) | Multicast method, device, terminal equipment and computer readable storage medium | |
CN112469012A (en) | Bluetooth communication method and related device | |
CN113596919B (en) | Data downloading method and device and terminal equipment | |
WO2024087861A1 (en) | Low-power-consumption wake-up circuit, receiver, wake-up sequence sending method, and electronic device | |
CN113678481B (en) | Wireless audio system, audio communication method and equipment | |
CN109285563B (en) | Voice data processing method and device in online translation process | |
CN111935705A (en) | Data service management method and device, computer readable medium and terminal equipment | |
CN113115483B (en) | Method and device for releasing radio resource control connection and user equipment | |
CN117081949B (en) | Information detection method and electronic equipment | |
WO2021197115A1 (en) | Antenna tuning method and apparatus, and electronic device and network device | |
CN114466238B (en) | Frame demultiplexing method, electronic device and storage medium | |
CN116708317B (en) | Data packet MTU adjustment method and device and terminal equipment | |
CN117130952B (en) | Pre-reading method and pre-reading device | |
CN114449492B (en) | Data transmission method and terminal equipment | |
CN116723384B (en) | Process control method, electronic device and readable storage medium | |
WO2023237087A1 (en) | Method for predicting fertile window, apparatus and electronic device | |
CN114258044B (en) | Standby method, standby system and terminal equipment | |
CN113114443A (en) | Method and device for sending and receiving downlink control information, base station and user equipment |
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 |