Information collection method and device and storage medium

By using sliding window method in the mobile terminal system to count the number of device information collection times in real time, control the device information collection behavior, the impact of excessive frequent device information collection on device performance is solved, and more accurate frequency control and improved user experience is achieved.

CN119597566APending Publication Date: 2025-03-11BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311168115.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-11
Publication Date
2025-03-11

AI Technical Summary

Technical Problem

In mobile systems, excessively collecting device information will affect device performance and user experience.

Method used

By determining a first time interval and counting the number of equipment information collection times in the time interval in a sliding window, the equipment information collection behavior is controlled, including pausing or continuing to collect equipment information.

Benefits of technology

It realizes more accurately controlling the frequency of equipment information collection, avoiding the impact of equipment performance due to excessive information collection and improving user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119597566A_ABST
    Figure CN119597566A_ABST
Patent Text Reader

Abstract

The invention relates to an information collection method and device and a storage medium. The information collection method comprises the following steps: determining a first time interval, wherein the first time interval is a time range used for collecting and determining equipment information collection times; based on the first time interval, carrying out real-time statistics on equipment information collection times in the first time interval in a sliding window mode; based on the device information collection times counted in real time, a device information collection behavior is controlled, and the control device information collection behavior comprises continuous collection of the device information or pause of collection of the device information. According to the invention, the information collection frequency can be controlled more accurately, equipment information collection behaviors generated in a large amount in a short time are limited, and smoother and more fair equipment information collection control is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of terminal technology, and in particular to an information collection method, device and storage medium. Background Art

[0002] With the popularity of mobile devices and the continuous development of Internet technology, mobile system applications and frameworks need to collect a large amount of device information. However, in the process of collecting device information, there is a phenomenon of too frequent information collection in a short period of time, which affects device performance and user experience. Summary of the invention

[0003] In order to overcome the problems existing in the related art, the present disclosure provides an information collection method, device and storage medium.

[0004] According to a first aspect of an embodiment of the present disclosure, there is provided an information collection method, including:

[0005] Determine a first time interval, where the first time interval is a time range for collecting and determining the number of times device information is collected; based on the first time interval, count the number of times device information is collected within the first time interval in real time in a sliding window manner; based on the real-time count of the number of times device information is collected, control the device information collection behavior, where the collection behavior includes continuing to collect device information or pausing the collection of device information.

[0006] In one implementation, the controlling of the device information collection behavior based on the real-time statistics of the number of device information collections includes:

[0007] In response to the real-time statistical number of device information collection being greater than a number threshold, suspending the collection of device information; in response to the real-time statistical number of device information collection being less than or equal to the number threshold, continuing to slide the sliding window to continue collecting device information, and counting the number of device information collections within the sliding window in real time; wherein the number threshold is used to determine the threshold for suspending the collection of device information within the first time interval.

[0008] In one implementation, the counting of the number of times the device information is collected in the first time interval in a sliding window manner based on the first time interval includes:

[0009] The first time interval is divided into n second time intervals of the same length, where n is an integer greater than 1; the sliding window is slid with the second time interval as the sliding step until the sliding of the first time interval is completed, and the sliding window includes m second time intervals, where m is a positive integer less than or equal to n; during the sliding of the sliding window, the number of times device information is collected in the sliding window is counted in real time.

[0010] In one implementation, the real-time counting of the number of times the device information is collected within the sliding window includes:

[0011] Obtain the number of times device information is collected as counted by a counter in each of the m second time intervals, wherein different counters are used to count the number of times device information is collected in different second time intervals; and take the sum of the counters in the m second time intervals as the number of times device information is collected in the sliding window.

[0012] In one embodiment, the method further comprises:

[0013] In response to the number of device information collection times counted by the counter at the i-th moment in the k-th second time interval exceeding the number threshold, the number of device information collection times counted after the i-th moment in the k-th second time interval is ignored, where k is a positive integer less than or equal to m.

[0014] According to a second aspect of an embodiment of the present disclosure, there is provided an information collection device, including:

[0015] A determination unit is used to determine a first time interval, where the first time interval is a time range for collecting and determining the number of times device information is collected; a processing unit is used to count the number of times device information is collected within the first time interval in real time in a sliding window manner based on the first time interval; and a control unit is used to control the device information collection behavior based on the real-time count of the number of times device information is collected, where the collection behavior includes continuing to collect device information or pausing the collection of device information.

[0016] In one embodiment, the control unit controls the device information collection behavior based on the real-time statistics of the number of device information collections in the following manner:

[0017] In response to the real-time statistical number of device information collection being greater than a number threshold, suspending the collection of device information; in response to the real-time statistical number of device information collection being less than or equal to the number threshold, continuing to slide the sliding window to continue collecting device information, and counting the number of device information collections within the sliding window in real time; wherein the number threshold is used to determine the threshold for suspending the collection of device information within the first time interval.

[0018] In one implementation, the processing unit uses the following method to count the number of times the device information is collected within the first time interval in a sliding window manner based on the first time interval:

[0019] The first time interval is divided into n second time intervals of the same length, where n is an integer greater than 1; the sliding window is slid with the second time interval as the sliding step until the sliding of the first time interval is completed, and the sliding window includes m second time intervals, where m is a positive integer less than or equal to n; during the sliding of the sliding window, the number of times device information is collected in the sliding window is counted in real time.

[0020] In one implementation, the processing unit uses the following method to count the number of times the device information is collected in the sliding window in real time:

[0021] Obtain the number of times device information is collected as counted by a counter in each of the m second time intervals, wherein different counters are used to count the number of times device information is collected in different second time intervals; and take the sum of the counters in the m second time intervals as the number of times device information is collected in the sliding window.

[0022] In one embodiment, the control unit is further used for:

[0023] In response to the number of device information collection times counted by the counter at the i-th moment in the k-th second time interval exceeding the number threshold, the number of device information collection times counted after the i-th moment in the k-th second time interval is ignored, where k is a positive integer less than or equal to m.

[0024] According to a third aspect of an embodiment of the present disclosure, there is provided an information collection device, including:

[0025] A processor; a memory for storing processor executable instructions; wherein the processor is configured to: execute the information collection method described in the first aspect or any one of the embodiments of the first aspect.

[0026] According to a fourth aspect of an embodiment of the present disclosure, a storage medium is provided, in which instructions are stored. When the instructions in the storage medium are executed by a processor of a terminal, the terminal can perform the method described in the first aspect or any one of the implementations of the first aspect.

[0027] The technical solution provided by the embodiments of the present disclosure may include the following beneficial effects: the electronic device uses a sliding window to monitor and control the device information collection behavior, which can more accurately control the frequency of electronic device information collection, avoiding the situation where a large amount of information collection cannot be discovered at the moment of window switching when using a fixed window to monitor the information collection behavior. The electronic device can limit the frequency of device information collection more smoothly and fairly, avoiding the performance impact caused by too frequent device information collection.

[0028] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0030] Figure 1 The present invention is a flowchart of an information collection method according to an exemplary embodiment.

[0031] Figure 2 The present invention is a flowchart showing a method of controlling device information collection behavior according to an exemplary embodiment.

[0032] Figure 3 The figure is a flow chart of a sliding window sliding method according to an exemplary embodiment.

[0033] Figure 4 The present invention is a flowchart of an information collection method according to an exemplary embodiment.

[0034] Figure 5 The present invention is a flowchart of an information collection method according to an exemplary embodiment.

[0035] Figure 6 The invention is a block diagram of an information collection device according to an exemplary embodiment.

[0036] Figure 7 The invention is a block diagram of a device for collecting information according to an exemplary embodiment. DETAILED DESCRIPTION

[0037] Here, exemplary embodiments will be described in detail, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present disclosure.

[0038] In the accompanying drawings, the same or similar reference numerals throughout represent the same or similar elements or elements with the same or similar functions. The described embodiments are part of the embodiments of the present disclosure, rather than all of the embodiments. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present disclosure, and should not be construed as limitations on the present disclosure. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present disclosure. The embodiments of the present disclosure are described in detail below in conjunction with the accompanying drawings.

[0039] The information collection method provided by the embodiment of the present disclosure can be applied to application scenarios that restrict the behavior of system applications and frameworks to collect a large amount of device information. Among them, the device information includes data or attributes that describe the characteristics and status of the device, such as firmware model, device power, device location, and central processing unit (CPU) status. By using a sliding time window method to detect whether the number of device information collection behaviors within the time window exceeds the threshold, the device information collection behavior is restricted, solving the problem of device performance degradation due to too frequent information collection.

[0040] In the related art, time is divided into multiple fixed time windows, and a counter is set for each time window to count the number of information collection behaviors in each time window. If the number exceeds the limit threshold, the information collection behaviors after the moment when the threshold is exceeded in the fixed window are ignored. For example, for terminal devices of the Android system, if the size of the fixed time window is one second, the collection threshold is 100 device information collection behaviors, the time of a certain collection behavior is used as the start time of the first window, and a counter is used to represent the number of requests. When each subsequent collection behavior arrives: if the interval time is greater than one second, the request is passed, the counter is reset, and the current time is set to the interval start time; if the interval time is less than one second, the counter is incremented by one, and if the counter is greater than the collection threshold, no collection behavior is performed, and if it is less than or equal to the collection threshold, collection behavior is performed.

[0041] However, if a large amount of information collection occurs in a short period of time when the fixed window is switched, the detection of the number of times device information is collected will become inaccurate, and it will be impossible to detect information collection behaviors that exceed the collection threshold in a short period of time. The "window boundary effect" caused by such a large amount of information collection in a short period of time will also cause the system to be overloaded instantaneously and cause the device performance to degrade. For example, for Android terminal devices, if the size of the fixed time window is one second, and the collection threshold is 100 device information collection behaviors, there is no access in the first 900ms of the first second, and 100 collection behaviors are generated in the second 100ms, and 100 collection behaviors are generated in the first 100ms of the second second. In this case, the number of collection behaviors actually reaches 200 in a certain second, which exceeds the collection threshold, causing the device performance to degrade and affecting the user experience.

[0042] In view of this, an embodiment of the present disclosure provides an information collection method. In the information collection method provided by the present disclosure, by designing a first time interval, the information collection behavior issued by the system or application is counted in a sliding window manner, the number of device information collection times within the first time interval is obtained, and the device information collection behavior is controlled according to the number of device information collection times.

[0043] Figure 1 is a flow chart of an information collection method according to an exemplary embodiment. Figure 1 As shown, the information collection method is used in a terminal and includes the following steps.

[0044] In step S11, a first time interval is determined.

[0045] In the embodiment of the present disclosure, the first time interval is a time range for collecting and determining the number of times device information is collected. It should be understood that the first time interval can also be called a sliding time window.

[0046] In an exemplary embodiment, the first time interval can be represented by setting a fixed duration, or by setting two pointers to point to two times respectively to represent the left and right boundaries of the first time interval, and the difference between the left and right boundaries is the duration represented by the first time interval.

[0047] In step S12, based on the first time interval, the number of times the device information is collected within the first time interval is counted in real time in a sliding window manner.

[0048] In the embodiment of the present disclosure, the first time interval is slid along time in a sliding window manner, so that the number of times the device information is collected within the time length represented by any first time interval can be detected.

[0049] In step S13, based on the real-time statistics of the number of times the device information is collected, the device information collection behavior is controlled, and the collection behavior includes continuing to collect the device information or pausing the collection of the device information.

[0050] In the disclosed embodiment, according to the number of device information collection times acquired in the first time interval, the device information collection behavior of the system application and framework in the device is controlled to avoid the impact on the device performance due to too frequent information collection.

[0051] In the embodiment of the present disclosure, controlling the device information collection behavior may include continuing to collect device information or pausing the collection of device information.

[0052] Figure 2 is a flow chart showing a control device information collection behavior according to an exemplary embodiment. Figure 2 As shown, controlling device information collection behavior is used in a terminal, including the following steps.

[0053] because Figure 2 Step S12 in Figure 1 The process is the same as step S11 in , which will not be described in detail here, and reference may be made to the relevant description of the above embodiment.

[0054] In step S13a, in response to the real-time statistical number of device information collection being greater than a threshold number, the collection of device information is suspended.

[0055] In the disclosed embodiment, the statistics of the number of times the device information is collected are performed in real time. By performing the real-time statistics of the number of times the device information is collected, it is ensured that the electronic device can immediately perform control operations according to the number of times the device information is collected.

[0056] In the embodiment of the present disclosure, the number threshold is used to determine the threshold for suspending the collection of device information within the first time interval, that is, the maximum number of times that device information collection is allowed within the first time interval, and the number threshold can be set according to the actual usage scenario. When the electronic device performs real-time statistics on the number of times device information is collected, if the number of times the device information is collected exceeds the number threshold, the collection of device information is suspended. For example, if the length of the first time interval is set to 1 second and the counting threshold is 100, when the number of times the device information is collected reaches the threshold at the 0.5th second in the first time interval, the electronic device will suspend the behavior. Assuming that an application wants to collect device information at the 0.6th second in the first time interval, the electronic device will not transmit any device information to the application at this time. It should be understood that the above-mentioned electronic device will not transmit any device information to the application only for illustration, and the embodiment of the present disclosure does not specifically limit the response of the electronic device to the application of collecting device information after the number of times the device information is collected in the first time interval reaches the threshold.

[0057] In step S13b, in response to the real-time counted number of device information collection times being less than or equal to the times threshold, a sliding window is set, and the first time interval is continued to slide to continue collecting device information, and the real-time count of the device information collection times within the first time interval is made.

[0058] In the embodiment of the present disclosure, if the real-time count of device information collection times is less than or equal to the times threshold, it means that the device collection times in the current first time interval does not affect the device performance. By sliding the sliding window, the device information collection times in the next time period are counted.

[0059] In the embodiment of the present disclosure, if the frequency of device information collection is to be counted in a sliding window manner in the first time interval, the first time interval can be divided again to obtain multiple second time intervals of equal length within the first time interval, and sliding can be performed with the second time interval as the sliding step.

[0060] In the disclosed embodiment, after the first time interval is divided into a plurality of second time intervals, it is still necessary to solve how to make the time interval corresponding to the sliding window change continuously to achieve a sliding effect.

[0061] Figure 3is a flow chart of a sliding window sliding method according to an exemplary embodiment. Figure 3 As shown, the sliding window sliding method is used in a terminal, and includes the following steps.

[0062] In step S21, the first time interval is divided into n second time intervals of the same length, where n is an integer greater than 1.

[0063] In the disclosed embodiment, the first time interval is divided into a plurality of second time intervals of equal length, wherein the second time interval can also be referred to as a sub-window, and the second time interval can be used to indicate the unit length of each sliding of the sliding window, and can also be used to count the number of times device information is collected within the second time interval, providing higher statistical accuracy, thereby more accurately controlling the frequency of device information collection. Among them, the statistical accuracy is used to indicate the accuracy of the statistical results. It should be understood that the number n of divided sub-windows can be set according to the specific situation. The larger n is, the smaller the time length of each sliding of the first time interval is, and the higher the statistical accuracy is; the smaller n is, the larger the time length of each sliding of the first time interval is, and the lower the statistical accuracy is.

[0064] In step S22, the sliding window is slid with the second time interval as the sliding step until the sliding of the first time interval is completed.

[0065] In the embodiment of the present disclosure, the sliding window includes m second time intervals, where m is a positive integer less than or equal to n. That is, the time length included in the sliding window is less than or equal to the time length of the first time interval.

[0066] In step S23, during the sliding process of the sliding window, the number of times the device information is collected within the sliding window is counted in real time.

[0067] In the embodiment of the present disclosure, when the sliding window slides with the sliding step length as a unit, in response to the occurrence of device information collection behavior, the number of device information collection times within the sliding window is updated.

[0068] In the embodiment of the present disclosure, an independent counter may be maintained for each second time interval included in the sliding window to record the number of times the device information is collected in each second time interval.

[0069] Figure 4 is a flow chart of an information collection method according to an exemplary embodiment. Figure 4 As shown, the information collection method is used in a terminal and includes the following steps.

[0070] In step S31, the number of times device information is collected counted by a counter in each of the m second time intervals is obtained.

[0071] In the embodiment of the present disclosure, different second time intervals use different counters to count the number of times device information is collected in the second time interval, that is, the counters of each second time interval are independent of each other, and each counter is used to record the number of times device information is collected in the corresponding second time interval, and the default value of the counter is 0. In response to each device information collection behavior, the counter in the corresponding second time interval will add one to the original count. Through the embodiment of the present disclosure, it is possible to count the number of times device information is collected in each sub-window, and avoid affecting the number of times device information is collected in other sub-windows due to changes in the number of times device information is collected in a certain sub-window.

[0072] In step S32, the sum of the counters in the m second time intervals is used as the number of times the device information is collected in the sliding window.

[0073] In the disclosed embodiment, the second time intervals included in the sliding window are summed up, and if the current sliding window contains unrecorded counters, the unrecorded counter contents are set to 0. For example, if the length of the sliding window is 1 second, the length of the second time interval is 0.1 second, and each second time interval maintains an independent counter, that is, the sliding window contains 10 second time intervals and counters. Assuming that the start time of the current self-recording device information collection times has passed 0.65 seconds, there is 1 second time interval in which statistics have not been completed and 3 second time intervals in which information collection times have not been completed in the sliding window, then the number of device information collection times in the current sliding window is the sum of the counters corresponding to 6 second time intervals in which statistics have been completed and 1 second time interval in which statistics have not been completed.

[0074] In the disclosed embodiment, the number of times device information is collected within the sliding window can be counted at any time.

[0075] In the embodiment of the present disclosure, when the number of times of device information collection reaches a threshold, in addition to suspending the collection of device information, it is also necessary to suspend the counter from recording the number of times of device information collection behavior.

[0076] Figure 5 is a flow chart of an information collection method according to an exemplary embodiment. Figure 5 As shown, the information collection method is used in a terminal and includes the following steps.

[0077] because Figure 5 Step S42, step S43 and Figure 4 Steps S31 and S32 are the same and will not be repeated here. Please refer to the relevant description of the above embodiment.

[0078] In step S41 , in response to the number of times of device information collection counted by the counter at the i-th moment in the k-th second time interval exceeding the number threshold, the number of times of device information collection counted after the i-th moment in the k-th second time interval is ignored.

[0079] In the embodiment of the present disclosure, k is a positive integer less than or equal to m, and in response to the number of times the device information is collected by the counter at the i-th moment in the k-th second time interval exceeding the number threshold, that is, when the device information collection is suspended, the counting of each second time interval in the sliding window is synchronously stopped, providing higher statistical accuracy, thereby more accurately controlling the frequency of information collection.

[0080] In an exemplary embodiment, taking the first time interval of 1 second as an example, it is divided into 10 100 millisecond sub-windows, then at any time, the sum of the counters of the latest 10 sub-windows represents the number of device information collected in the last 1 second. If the total count exceeds the limit, the newly collected device information will be ignored until any sub-window in the sliding window slides out so that the total number of device information collection times is reduced to below the threshold.

[0081] In the embodiment of the present disclosure, by setting a first time interval and counting the number of times device information is collected in the first time interval in real time in a sliding window manner, the frequency of mobile device information collection can be more accurately controlled to avoid the situation where a large amount of information is collected at the moment of window switching. It can also achieve smoother and fairer frequency restrictions to avoid the performance of electronic devices being affected by too frequent information collection. In addition, the embodiment of the present disclosure is highly flexible and can be customized according to specific needs to better adapt to the scenario of mobile device information collection.

[0082] Based on the same concept, an embodiment of the present disclosure also provides an information collection device.

[0083] It is understandable that the information collection device provided by the embodiment of the present disclosure includes hardware structures and / or software modules corresponding to the execution of each function in order to realize the above functions. In combination with the units and algorithm steps of each example disclosed in the embodiment of the present disclosure, the embodiment of the present disclosure can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art may use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the technical solution of the embodiment of the present disclosure.

[0084] Figure 6 is a block diagram of an information collection device 100 according to an exemplary embodiment. Figure 6The device includes a determining unit 101, a processing unit 102 and a control unit 103.

[0085] The determining unit 101 is used to determine a first time interval, where the first time interval is a time range for collecting and determining the number of times device information is collected.

[0086] The processing unit 102 is configured to count the number of times the device information is collected in the first time interval in real time in a sliding window manner based on the first time interval.

[0087] The control unit 103 is used to control the device information collection behavior based on the real-time statistics of the number of device information collections, and the collection behavior includes continuing to collect device information or suspending the collection of device information.

[0088] In one embodiment, the control unit controls the device information collection behavior based on the real-time statistics of the number of device information collections, in the following manner: in response to the real-time statistics of the number of device information collections being greater than a number threshold, suspending the collection of device information; in response to the real-time statistics of the number of device information collections being less than or equal to the number threshold, continuing to slide the sliding window to continue collecting device information, and real-time statistics of the number of device information collections within the sliding window; wherein the number threshold is used to determine the threshold for suspending the collection of device information within the first time interval.

[0089] In one embodiment, the processing unit uses the following method to count the number of device information collection times within the first time interval in a sliding window manner based on the first time interval: divide the first time interval into n second time intervals of equal length, where n is an integer greater than 1; slide the sliding window with the second time interval as the sliding step until the sliding of the first time interval is completed, and the sliding window includes m second time intervals, where m is a positive integer less than or equal to n; during the sliding process of the sliding window, count the number of device information collection times within the sliding window in real time.

[0090] In one embodiment, the processing unit uses the following method to count the number of device information collection times within the sliding window in real time: obtain the number of device information collection times counted by the counter in each of the m second time intervals, wherein different second time intervals use different counters to count the number of device information collection times within the second time interval; and take the sum of the counters in the m second time intervals as the number of device information collection times within the sliding window.

[0091] In one embodiment, the control unit is further used to: in response to the number of device information collection counted by the counter at the i-th moment in the k-th second time interval exceeding the number threshold, ignore the device information collection count after the i-th moment in the k-th second time interval, where k is a positive integer less than or equal to m.

[0092] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0093] Figure 7 2 is a block diagram of an apparatus 200 for information collection according to an exemplary embodiment. For example, the apparatus 200 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0094] Reference Figure 2 , the device 200 may include one or more of the following components: a processing component 202 , a memory 204 , a power component 206 , a multimedia component 208 , an audio component 210 , an input / output (I / O) interface 212 , a sensor component 214 , and a communication component 216 .

[0095] The processing component 202 generally controls the overall operation of the device 200, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 202 may include one or more processors 220 to execute instructions to perform all or part of the steps of the above-described method. In addition, the processing component 202 may include one or more modules to facilitate interaction between the processing component 202 and other components. For example, the processing component 202 may include a multimedia module to facilitate interaction between the multimedia component 208 and the processing component 202.

[0096] The memory 204 is configured to store various types of data to support operations on the device 200. Examples of such data include instructions for any application or method operating on the device 200, contact data, phone book data, messages, pictures, videos, etc. The memory 204 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0097] The power component 206 provides power to the various components of the device 200. The power component 206 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 200.

[0098] The multimedia component 208 includes a screen that provides an output interface between the device 200 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 208 includes a front camera and / or a rear camera. When the device 200 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0099] The audio component 210 is configured to output and / or input audio signals. For example, the audio component 210 includes a microphone (MIC), and when the device 200 is in an operation mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 204 or sent via the communication component 216. In some embodiments, the audio component 210 also includes a speaker for outputting audio signals.

[0100] I / O interface 212 provides an interface between processing component 202 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.

[0101] The sensor assembly 214 includes one or more sensors for providing various aspects of the status assessment of the device 200. For example, the sensor assembly 214 can detect the open / closed state of the device 200, the relative positioning of components, such as the display and keypad of the device 200, the sensor assembly 214 can also detect the position change of the device 200 or a component of the device 200, the presence or absence of user contact with the device 200, the orientation or acceleration / deceleration of the device 200 and the temperature change of the device 200. The sensor assembly 214 can include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 214 can also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 214 can also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor or a temperature sensor.

[0102] The communication component 216 is configured to facilitate wired or wireless communication between the device 200 and other devices. The device 200 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 216 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 216 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0103] In an exemplary embodiment, the apparatus 200 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above method.

[0104] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 204 including instructions, and the instructions can be executed by the processor 220 of the device 200 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0105] It is to be understood that in the present disclosure, "plurality" refers to two or more than two, and other quantifiers are similar. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are in an "or" relationship. The singular forms "a", "the" and "the" are also intended to include plural forms, unless the context clearly indicates other meanings.

[0106] It is further understood that the terms "first", "second", etc. are used to describe various information, but such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other, and do not indicate a specific order or degree of importance. In fact, the expressions "first", "second", etc. can be used interchangeably. For example, without departing from the scope of the present disclosure, the first information can also be referred to as the second information, and similarly, the second information can also be referred to as the first information.

[0107] It should be further understood that the terms "center", "longitudinal", "lateral", "lower", "left", "right", "vertical", "horizontal", "top", "bottom", "inside", "outside", etc., indicating the orientation or position relationship are based on the orientation or position relationship shown in the drawings, and are only for the convenience of describing the present embodiment and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation.

[0108] It can be further understood that, unless otherwise specified, “connection” includes a direct connection without other components between the two, and also includes an indirect connection with other components between the two.

[0109] It is further understood that, although the operations are described in a specific order in the drawings in the embodiments of the present disclosure, it should not be understood as requiring the operations to be performed in the specific order shown or in a serial order, or requiring the execution of all the operations shown to obtain the desired results. In certain environments, multitasking and parallel processing may be advantageous.

[0110] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any modifications, uses or adaptations of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure.

[0111] It should be understood that the present disclosure is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the scope of the appended claims.

Claims

1. An information collection method, characterized in that: include: Determine a first time interval, where the first time interval is a time range for collecting and determining a number of times device information is collected; Based on the first time interval, count the number of times the device information is collected within the first time interval in real time in a sliding window manner; Based on the real-time statistics of the number of times the device information is collected, the device information collection behavior is controlled, and the controlling of the device information collection behavior includes continuing to collect the device information or pausing the collection of the device information.

2. The information collection method according to claim 1, characterized in that: The device information collection times based on real-time statistics and the control of device information collection behavior include: In response to the real-time statistical number of device information collection being greater than a number threshold, suspending the collection of device information; In response to the real-time counted number of times of device information collection being less than or equal to a number threshold, setting a sliding window, sliding the sliding window to continue collecting device information, and counting the real-time count of the number of times of device information collection within the sliding window; The number threshold is used to determine the threshold for suspending the collection of device information within the first time interval.

3. The information collection method according to claim 1 or 2, characterized in that: The counting, based on the first time interval, of the number of times the device information is collected in the first time interval in a sliding window manner includes: Divide the first time interval into n second time intervals of equal length, where n is an integer greater than 1; Sliding the sliding window with the second time interval as the sliding step until the sliding of the first time interval is completed, the sliding window includes m second time intervals, and m is a positive integer less than or equal to n; During the sliding process of the sliding window, the number of times the device information is collected within the sliding window is counted in real time.

4. The information collection method according to claim 3, characterized in that: The real-time counting of the number of times the device information is collected within the sliding window includes: Obtaining the number of times device information is collected counted by a counter in each of the m second time intervals, wherein different counters are used to count the number of times device information is collected in different second time intervals; The sum of the counters in the m second time intervals is used as the number of times the device information is collected in the sliding window.

5. The information collection method according to claim 4, characterized in that: The method further comprises: In response to the number of device information collection times counted by the counter at the i-th moment in the k-th second time interval exceeding the number threshold, the number of device information collection times counted after the i-th moment in the k-th second time interval is ignored, where k is a positive integer less than or equal to m.

6. An information collection device, characterized in that: include: a determining unit, configured to determine a first time interval, wherein the first time interval is a time range for collecting and determining a number of times device information is collected; A processing unit, configured to count the number of times device information is collected in the first time interval in real time in a sliding window manner based on the first time interval; The control unit is used to control the device information collection behavior based on the real-time statistics of the number of device information collection times, wherein the control of the device information collection behavior includes continuing to collect device information or suspending the collection of device information.

7. The information collection device according to claim 6, characterized in that: The control unit controls the device information collection behavior based on the real-time statistics of the number of device information collections in the following manner: In response to the real-time statistical number of device information collection being greater than a number threshold, suspending the collection of device information; In response to the real-time counted number of times of device information collection being less than or equal to a number threshold, setting a sliding window, sliding the sliding window to continue collecting device information, and counting the real-time count of the number of times of device information collection within the sliding window; The number threshold is used to determine the threshold for suspending the collection of device information within the first time interval.

8. The information collection device according to claim 6 or 7, characterized in that: The processing unit uses the following method to count the number of times the device information is collected in the first time interval in a sliding window manner based on the first time interval: Divide the first time interval into n second time intervals of equal length, where n is an integer greater than 1; Sliding the sliding window with the second time interval as the sliding step until the sliding of the first time interval is completed, the sliding window includes m second time intervals, and m is a positive integer less than or equal to n; During the sliding process of the sliding window, the number of times the device information is collected within the sliding window is counted in real time.

9. The information collection device according to claim 8, characterized in that: The processing unit uses the following method to count the number of times the device information is collected in the sliding window in real time: Obtaining the number of times device information is collected counted by a counter in each of the m second time intervals, wherein different counters are used to count the number of times device information is collected in different second time intervals; The sum of the counters in the m second time intervals is used as the number of times the device information is collected in the sliding window.

10. The information collection device according to claim 9, characterized in that: The control unit is also used for: In response to the number of device information collection times counted by the counter at the i-th moment in the k-th second time interval exceeding the number threshold, the number of device information collection times counted after the i-th moment in the k-th second time interval is ignored, where k is a positive integer less than or equal to m.

11. An information collection device, characterized in that: include: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to: Wherein, the processor is configured to: execute the method described in any one of claims 1 to 5.

12. A storage medium, characterized in that: The storage medium stores instructions, and when the instructions in the storage medium are executed by a processor of an electronic device, the terminal is enabled to execute the method described in any one of claims 1 to 5.