CN106034346B - Information processing method and electronic equipment - Google Patents

Information processing method and electronic equipment Download PDF

Info

Publication number
CN106034346B
CN106034346B CN201510115291.3A CN201510115291A CN106034346B CN 106034346 B CN106034346 B CN 106034346B CN 201510115291 A CN201510115291 A CN 201510115291A CN 106034346 B CN106034346 B CN 106034346B
Authority
CN
China
Prior art keywords
field
frame information
sub
filtering
items
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201510115291.3A
Other languages
Chinese (zh)
Other versions
CN106034346A (en
Inventor
王海洋
张喆鹏
田超
姜莹
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CN201510115291.3A priority Critical patent/CN106034346B/en
Publication of CN106034346A publication Critical patent/CN106034346A/en
Application granted granted Critical
Publication of CN106034346B publication Critical patent/CN106034346B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Mobile Radio Communication Systems (AREA)

Abstract

The application discloses an information processing method and electronic equipment, wherein the method comprises the following steps: receiving, by a wireless communication module of the electronic device, frame information; acquiring related information of the frame information; judging whether the related information is matched with a preset filtering condition; and when the relevant information is not matched with the preset filtering condition, controlling a processor in the electronic equipment to process the frame information. The method provided by the invention is used for solving the technical problem that in the prior art, when invalid data is received, a processor is required to process the invalid data, so that the power consumption of the electronic equipment is high, and the technical effect of saving the power consumption of the electronic equipment is realized.

Description

Information processing method and electronic equipment
Technical Field
The present invention relates to the field of electronic technologies, and in particular, to an information processing method and an electronic device.
Background
With the continuous progress of science and technology, low power consumption of electronic devices is becoming a hot point of research.
In the prior art, in order to control the overall system power consumption of the electronic device, when the communication module of the electronic device receives data, the processor processes the received data.
In the process of implementing the technical scheme in the embodiment of the present application, the inventor of the present application finds that at least the following technical problems exist in the prior art:
because the communication module in the prior art can directly send the data information to the processor when receiving the data information, so that the processor processes the received data information, but some invalid data often exist in the received data, it can be seen that the prior art also needs the processor to process when receiving the invalid data, thereby causing the technical problem of high power consumption of the electronic device.
Disclosure of Invention
The embodiment of the application provides an information processing method and electronic equipment, and is used for solving the technical problem that in the prior art, when invalid data is received, a processor is required to process the invalid data, so that the power consumption of the electronic equipment is high, and the technical effect of saving the power consumption of the electronic equipment is achieved.
An embodiment of the present application provides an information processing method, including:
receiving, by a wireless communication module of the electronic device, frame information;
acquiring related information of the frame information;
judging whether the related information is matched with a preset filtering condition;
and when the relevant information is not matched with the preset filtering condition, controlling a processor in the electronic equipment to process the frame information.
Optionally, the processor specifically includes a first state and a second state, and a first power consumption of the processor in the first state is smaller than a second power consumption of the processor in the second state;
when the processor is in the first state and the relevant information is not matched with the preset filtering condition, the controlling the processor in the electronic device to process the frame information specifically includes:
controlling the processor to switch from the first state to the second state;
and controlling the processor to process the frame information.
Optionally, after the determining whether the frame information matches a preset filtering condition, the method further includes:
and when the frame information is matched with the preset filtering condition, storing the frame information into a memory, or discarding the frame information.
Optionally, the acquiring the related information of the frame information specifically includes:
and acquiring a first field in the header information of the frame information and acquiring a second field in the load information of the frame information.
Optionally, the wireless communication module is a bluetooth module, the preset filtering condition includes N filtering sub-items, and each filtering sub-item in the N filtering sub-items includes a category field and an operation code field; n is a positive integer.
Optionally, the determining whether the frame information matches a preset filtering condition specifically includes:
determining whether the first field or the second field matches M of the N filter sub-entries; m is an integer of 1 to N.
Optionally, when each filter sub-item includes a valid bit, before the determining whether the frame information matches a preset filter condition, the method further includes:
and determining M filtering sub-items of which the values of the effective bits are preset values in the N filtering sub-items, wherein when the values of the effective bits are the preset values, the filtering sub-items corresponding to the effective bits are in a working state.
Optionally, the determining whether the first field or the second field is matched with M filtering sub-items in the N filtering sub-items specifically includes:
when the transmission channel of the frame information is determined to be an advertisement channel, judging whether the first field is matched with any one of M category fields corresponding to the M filtering sub items, and obtaining M first judgment results; judging whether the first field is matched with the M filtering sub-items or not based on the M first judgment results; or
When the transmission channel of the frame information is determined to be a data channel, judging whether the second field is matched with any one of M operation code fields corresponding to the M filtering sub items to obtain M second judgment results; determining whether the second field matches the M filter sub-entries based on the M second determination results.
Optionally, the determining, based on the M first determination results, whether the first field matches the M filter sub-items specifically includes:
judging whether the M first judgment results are all negative;
if yes, determining that the first field does not match the M filter sub-entries;
if not, determining that the first field is matched with the M filtering sub-items;
correspondingly, the determining whether the second field is matched with the M filter sub-items based on the M second determination results specifically includes:
judging whether the M second judgment results are all negative;
if so, determining that the second field does not match the M filter sub-entries;
if not, determining that the second field is matched with the M filtering sub-items.
An embodiment of the present application further provides an electronic device, including:
a wireless communication module for receiving frame information;
the processing module is used for acquiring related information of the frame information;
the filtering module is used for judging whether the related information is matched with a preset filtering condition;
and the control module is used for controlling a processor in the electronic equipment to process the frame information when the relevant information is not matched with the preset filtering condition.
Optionally, the processor specifically includes a first state and a second state, and a first power consumption of the processor in the first state is smaller than a second power consumption of the processor in the second state;
when the processor is in the first state and the related information does not match the preset filtering condition, the control module is specifically configured to:
controlling the processor to switch from the first state to the second state;
and controlling the processor to process the frame information.
Optionally, the processing module is further configured to:
and when the frame information is matched with the preset filtering condition, storing the frame information into a memory, or discarding the frame information.
Optionally, the processing module specifically includes:
and acquiring a first field in the header information of the frame information and acquiring a second field in the load information of the frame information.
Optionally, the wireless communication module is a bluetooth module, the preset filtering condition includes N filtering sub-items, and each filtering sub-item in the N filtering sub-items includes a category field and an operation code field; n is a positive integer.
Optionally, the filtering module is specifically configured to:
determining whether the first field or the second field matches M of the N filter sub-entries; m is an integer of 1 to N.
Optionally, when each filter sub-item contains a valid bit, the filter module is further configured to:
and determining M filtering sub-items of which the values of the effective bits are preset values in the N filtering sub-items, wherein when the values of the effective bits are the preset values, the filtering sub-items corresponding to the effective bits are in a working state.
Optionally, the filtering module is specifically configured to:
when the transmission channel of the frame information is determined to be an advertisement channel, judging whether the first field is matched with any one of M category fields corresponding to the M filtering sub items, and obtaining M first judgment results; judging whether the first field is matched with the M filtering sub-items or not based on the M first judgment results; or
When the transmission channel of the frame information is determined to be a data channel, judging whether the second field is matched with any one of M operation code fields corresponding to the M filtering sub items to obtain M second judgment results; determining whether the second field matches the M filter sub-entries based on the M second determination results.
Optionally, the filtering module is specifically configured to:
judging whether the M first judgment results are all negative;
if yes, determining that the first field does not match the M filter sub-entries;
if not, determining that the first field is matched with the M filtering sub-items;
correspondingly, the filter module is specifically configured to:
judging whether the M second judgment results are all negative;
if so, determining that the second field does not match the M filter sub-entries;
if not, determining that the second field is matched with the M filtering sub-items.
One or more technical solutions in the embodiments of the present application have at least one or more of the following technical effects:
the scheme in the embodiment of the application filters received frame information, invalid frames or irrelevant frame information are filtered, valid frame information is allowed to pass, only valid frames passing through a filter are sent to a processor to be processed, and in the prior art, the processor is controlled to process the received frame information as long as a wireless communication module receives the frame information.
The scheme in the embodiment of the application can selectively manage the frame information filtered by the filter, discard invalid frame information, store the frame information which is associated with the subsequent processing of the processor but does not need to be processed immediately to a storage space, for example, store the frame information for debugging, so as to avoid the phenomenon of frame loss, and realize the technical effect of ensuring the integrity of the frame information under the condition of low power consumption of the processor.
Thirdly, according to the scheme in the embodiment of the application, various types of frame information can be selected and filtered by configuring the filtering conditions of the filter, and a user can write frame types which do not need to be processed into the filter according to actual needs, so that the technical effect of flexibly configuring the filter is achieved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only the embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of an information processing method according to an embodiment of the present application;
FIG. 2 is a flowchart illustrating an embodiment of step S30 of FIG. 1;
fig. 3 is a block diagram of an electronic device according to a second embodiment of the present application;
fig. 4 is a system structure block diagram of an electronic device according to a second embodiment of the present application.
Detailed Description
The embodiment of the application provides an information processing method and electronic equipment, and is used for solving the technical problem that in the prior art, when invalid data is received, a processor is required to process the invalid data, so that the power consumption of the electronic equipment is high, and the technical effect of saving the power consumption of the electronic equipment is achieved.
In order to solve the technical problems, the general idea of the embodiment of the present application is as follows:
receiving frame information through a wireless communication module of the electronic device; acquiring related information of the frame information; judging whether the related information is matched with a preset filtering condition; and when the relevant information is not matched with the preset filtering condition, controlling a processor in the electronic equipment to process the frame information.
In the above technical solution, by filtering the received frame information, an invalid frame or frame information that is not of interest is filtered out, allowing the valid frame information to pass, and only the valid frame that passes through the filter is sent to the processor for information processing. In the prior art, as long as the wireless communication module receives the frame information, the processor is controlled to process the received frame information, and therefore, the technical problem that the electronic equipment is high in power consumption due to the fact that the processor is controlled to process information when invalid data are received in the prior art is effectively solved by the scheme in the embodiment of the application, and the technical effect of saving the power consumption of the electronic equipment is achieved.
In order to better understand the technical solutions, the technical solutions of the present invention are described in detail below with reference to the drawings and specific embodiments, and it should be understood that the specific features in the embodiments and examples of the present invention are detailed descriptions of the technical solutions of the present invention, and are not limitations of the technical solutions of the present invention, and the technical features in the embodiments and examples of the present invention may be combined with each other without conflict.
Example one
Referring to fig. 1, the present application provides an information processing method applied to an electronic device, the method including:
s10: receiving, by a wireless communication module of the electronic device, frame information;
s20: acquiring related information of the frame information;
s30: judging whether the related information is matched with a preset filtering condition;
s40: and when the relevant information is not matched with the preset filtering condition, controlling a processor in the electronic equipment to process the frame information.
In a specific implementation process, the electronic device may be a mobile phone, a tablet computer, or other electronic devices including a wireless communication module, which is not necessarily exemplified herein. In the embodiment of the present application, an implementation process of the method in the embodiment of the present application will be described in detail by taking the electronic device as a mobile phone as an example.
Specifically, the mobile phone in the embodiment of the present application is provided with a wireless Communication module, such as a bluetooth module, an NFC (Near Field Communication) module, an infrared module, and the like, and in the embodiment of the present application, an implementation process of the method in the embodiment of the present application will be described with the wireless Communication module as the bluetooth module.
Further, the electronic device is further provided with a processor configured to process frame information received by the wireless communication module, where the processor specifically includes a first state and a second state, and first power consumption of the processor in the first state is smaller than second power consumption of the processor in the second state. Generally, when the processor does not receive the frame information, the processor is in a first state, such as a low power state, e.g., a sleep state, and when the processor receives the frame information, the processor is in a second state, i.e., an active state.
In the embodiment of the present application, step S10 is first executed: receiving, by a wireless communication module of the electronic device, frame information. For example, when the bluetooth module is arranged in the mobile phone, the frame information sent by other bluetooth devices can be received.
Next, step S20 is executed: and acquiring related information of the frame information. The specific implementation process is as follows:
and acquiring a first field in the header information of the frame information and acquiring a second field in the load information of the frame information.
Specifically, still taking the above mobile phone with bluetooth module as an example, in the bluetooth transmission protocol, a Data PDU and a Control PDU may be transmitted between bluetooth devices, and in this embodiment, taking filtering Control frame information as an example, the structure of the Control frame includes a header portion (header) and a payload portion (payload), where both the header portion and the payload portion have respective lengths, for example, the header portion is two bytes.
When a bluetooth module of a mobile phone receives frame information, a first field in packet header information of the frame information is obtained, where the first field may be first byte information of a packet header, and if the packet header information is 00010011, the first field corresponds to the first byte 0001; a second field in the payload information of the frame information is obtained, for example, when the payload information is 1001011010100101 …, the second field may be 10010110, which is a first byte of the payload information.
Next, step S30 is executed: and judging whether the related information is matched with a preset filtering condition.
In a specific implementation process, a filter is arranged in the mobile phone, and before frame information is filtered, a filtering condition of the filter can be configured in advance, wherein the preset filtering condition comprises N filtering sub-items, and each filtering sub-item in the N filtering sub-items comprises a category field and an operation code field; n is a positive integer.
Specifically, the bluetooth low energy device transmits information through two channels during communication, one is an advertisement channel, the other is a data channel, if a user wants to filter frame information transmitted from some categories of advertisement channels, such as advertisement channel frame information with a category field of 0101, 0101 is written into a filtering sub-item, if data channel frame information with an operation code field of 1011 is to be filtered, 1011 is written into the filtering sub-item, that is, the category field in the filtering sub-item is specially used for filtering the frame information of the advertisement channel, the operation code field is specially used for filtering the frame information of the data channel, since the filter comprises a plurality of filtering sub-items, each filtering sub-item can be written into a category field and an operation code field, when there are a plurality of frame information to be filtered, the category field or the operation code field corresponding to the frame information can be written into a plurality of filtering sub-items, the number of the filtering sub-items is determined by the maximum number of the frame information types needing to be filtered from the advertising channel and the data channel, for example, the number of the frame information types needing to be filtered from the advertising channel is 5, corresponding category fields need to be written in the 5 filtering sub-items, the number of the frame information types needing to be filtered from the data channel is 6, and corresponding operation code fields need to be written in the 6 filtering sub-items, so that the total number of the filtering sub-items contained in the filter is 6, wherein the category fields and the operation code fields are written in the 5 filtering sub-items, and 1 filtering sub-item is only written in the operation code field.
Next, step 30 is performed: and judging whether the frame information is matched with a preset filtering condition. Referring to fig. 2, the specific implementation process of step S30 is as follows:
s301: determining whether the first field or the second field matches M of the N filter sub-entries; m is an integer of 1 to N.
Step S301 further includes the following steps:
s3011: when the transmission channel of the frame information is determined to be an advertisement channel, judging whether the first field is matched with any one of M category fields corresponding to the M filtering sub items, and obtaining M first judgment results; judging whether the first field is matched with the M filtering sub-items or not based on the M first judgment results; or
S3012: when the transmission channel of the frame information is determined to be a data channel, judging whether the second field is matched with any one of M operation code fields corresponding to the M filtering sub items to obtain M second judgment results; determining whether the second field matches the M filter sub-entries based on the M second determination results.
For step S3011, the specific implementation is as follows:
judging whether the M first judgment results are all negative;
if yes, determining that the first field does not match the M filter sub-entries;
if not, determining that the first field is matched with the M filtering sub-items.
For step S3012, the specific implementation is as follows:
judging whether the M second judgment results are all negative;
if so, determining that the second field does not match the M filter sub-entries;
if not, determining that the second field is matched with the M filtering sub-items.
Specifically, when there are N filter sub-entries in the filter, for example, when N is 3, the maximum numerical values of the category field and the opcode field written in the filter sub-entry are all 3, and it is assumed that 2 category fields and 3 opcode fields are written in 3 filter sub-entries. When frame information received by the bluetooth module is received, it is first determined from which transmission channel the received frame information is coming from, the transmission channel information may be determined by the physical layer, if it is determined that the frame information is transmitted through the advertisement channel, the first byte of the header portion and the first byte of the payload portion of the frame information are obtained, assuming that the first byte of the header portion is 00010001 and the first byte of the payload portion is 00100010, the two bytes are sent to the filter to be matched with the filter sub-entry, since only the first byte of the header is required to be matched for the frame information of the advertisement channel, the first byte of the payload part is not required to be matched, it is also possible to take only the first byte of the header portion and send it to the filter, which, in the embodiment of the present application, in order to simplify the processing steps in a specific implementation, a method for acquiring a first field of a packet header and a second field of a payload is adopted uniformly.
Further, following the above example, when the first byte of the header portion of the frame information packet transmitted by the advertisement channel is 00010001, the byte is compared with the category fields in the 2 filtering sub-entries, at this time, the value of M is 2, if the preset 2 category fields are 00000001 and 00000010 respectively, and since the first byte of the header portion of the frame information is 00010001, which is different from the three category fields, it indicates that the frame information is valid frame information, that is, the first field does not match with the M filtering sub-entries, and needs to be sent to the processor for processing. If the preset 2 category fields are 00010001 and 00010010, since the first byte 00010001 of the header part of the frame packet is the same as one of the category fields, it indicates that the first field matches with the category field, and the frame information is an invalid frame or a useless frame that needs to be filtered out and does not need to be sent to the processor for processing.
Correspondingly, when the received frame information is transmitted by a data channel, the first byte of the header of the frame information and the first byte of the payload are also acquired, and the two bytes are sent to a filter for matching processing.
Still continuing with the above example, when there are 3 filtering sub-entries in the filter, and 2 category fields and 3 opcode fields are written in the 3 filtering sub-entries, at this time, the values of N and M are both 3, if the 3 opcode fields are 10001000, 10011001, and 10011010, respectively, the first byte of the frame information payload portion is 00100010, and the first byte and the 3 opcode fields are matched, respectively, it can be obtained that the first byte and the 3 opcode fields are not matched, that is, the second field is not matched with the M filtering sub-entries, indicating that the frame information is valid frame information, and needs to be sent to the processor for processing. If the 3 operation code fields are 00100010, 00100011 and 00100100100 respectively, since the first byte of the payload part is the same as one of the operation code fields, it indicates that the second field matches the operation code field, and the frame information is an invalid frame or a useless frame that needs to be filtered out and does not need to be sent to the processor for processing.
Further, each filter sub-item in the filter may include a valid bit, and when the value of the valid bit is the preset value, the filter sub-item corresponding to the valid bit is in an active state, so in this case, M filter sub-items whose value of the valid bit is a preset value need to be determined from the N filter sub-items, and then the step of determining whether the frame information matches a preset filter condition is performed.
Specifically, when the filter sub-entry contains a valid bit, each filter sub-entry contains a valid bit, a category field, and an operation code field, and whether the filter sub-entry is in a working state is determined by the valid bit, if the valid bit of one filter sub-entry is 1, the filter sub-entry is in the working state, and when frame information is received, a first field and a second field of the frame information are respectively matched with the category field and the operation code field of the filter sub-entry, that is, frame information of an advertisement channel type and a data channel type written in the filter sub-entry needs to be filtered; if the valid bit of a filter sub-entry is 0, it indicates that the filter sub-entry is in an inactive state, and when receiving frame information, the first field and the second field are not matched with the category field and the operation code field in the filter sub-entry, i.e. the frame information of the advertisement channel type and the data channel type written in the filter sub-entry is not required to be filtered.
Furthermore, when the filtering sub-items contain valid bits, a user can write all the category fields and the operation code fields of common types into the filtering sub-items, and when some types of frame information need to be filtered, the valid bits of the filtering sub-items corresponding to the types are defined as 1, namely preset values, so that the filtering sub-items are in a working state, the valid bits of the remaining filtering sub-items are defined as 0, namely the remaining filtering sub-items are in a non-working state, so that the situation that the user needs to set the operation code fields and the category fields every time according to different types of the filtered frame information is avoided, and the setting of the filter is more concise and convenient.
As described above, when the processor does not receive the frame information, the processor is in the first state, and if the frame information is received by the bluetooth module and does not match with the filtering condition of the filter at this time, the following steps are performed:
controlling the processor to switch from the first state to the second state;
and controlling the processor to process the frame information.
Specifically, when the processor is in a low power consumption state, if the frame information received by the bluetooth module is a valid frame at the moment, the processor is awakened, and the processor is switched to an operating state from the low power consumption state so as to process the frame information; when the processor is in the low power consumption state, if the frame information received by the Bluetooth module is an invalid frame, the processor is still in the low power consumption state, so that the power consumption of the processor is saved.
Further, when the frame information matches the preset filtering condition, the frame information is stored in a memory, or the frame information is discarded.
Specifically, when the first byte of the header part of the frame information of the advertisement channel matches with the category field in the filter sub-item, or the first byte of the payload part of the frame information of the data channel matches with the operation code field in the filter sub-item, it indicates that the frame information matches with the preset filter condition, that is, the frame information is an invalid frame or a useless frame, and the frame information can be discarded, but some invalid frames or useless frames may be related to subsequent debugging.
Example two
Based on the same inventive concept as the information processing method in the first embodiment of the present application, an embodiment of the present application provides an electronic device, please refer to fig. 3, where the electronic device includes:
a wireless communication module 301, configured to receive frame information;
a processing module 302, configured to obtain relevant information of the frame information;
a filtering module 303, configured to determine whether the relevant information matches a preset filtering condition;
a control module 304, configured to control a processor in the electronic device to process the frame information when the related information does not match the preset filtering condition.
Specifically, the processing module 302 is different from the processor, and the processing module 302 may be disposed in the wireless communication module 301, or may be an independent processing module, which is not limited in this application.
In a specific implementation process, the wireless Communication module 301 may be a bluetooth module, an NFC (Near Field Communication) module, an infrared module, or other Communication modules, and in this embodiment, the scheme in this embodiment is explained in detail by taking the wireless Communication module 301 as a bluetooth module as an example.
When the processing module 302 is disposed in the bluetooth module, a system structure block diagram of the electronic device is shown in fig. 4, the bluetooth module is connected to the system main line and the processor respectively. When the frame information is received by the Bluetooth module, the frame information is sent to a filter for matching, when the frame information is matched with a filtering condition set by the filter, the frame information is shown to be frame information needing to be filtered, at the moment, the filter feeds a filtering result back to the Bluetooth module, and the Bluetooth module discards the frame information needing to be filtered or transmits the frame information to a storage unit through a main line for storage; when the frame information is not matched with the filtering condition set by the filter, the frame information is indicated to be an effective frame and needs to be sent to the processor for processing, the filter feeds the filtering result back to the Bluetooth module at the moment, the Bluetooth module sends the frame information to the processor based on the filtering result, and when the processor starts to be in a low power consumption state, the processor needs to be switched to a working state to process the frame information.
The processor specifically comprises a first state and a second state, and first power consumption of the processor in the first state is smaller than second power consumption of the processor in the second state;
when the processor is in the first state and the related information does not match the preset filtering condition, the control module 304 is specifically configured to:
controlling the processor to switch from the first state to the second state;
and controlling the processor to process the frame information.
Further, the processing module 302 is further configured to:
and when the frame information is matched with the preset filtering condition, storing the frame information into a memory, or discarding the frame information.
Further, the processing module 302 specifically includes:
and acquiring a first field in the header information of the frame information and acquiring a second field in the load information of the frame information.
Further, the wireless communication module 301 is a bluetooth module, the preset filtering condition includes N filtering sub-items, and each filtering sub-item in the N filtering sub-items includes a category field and an operation code field; n is a positive integer.
Further, the filtering module 303 is specifically configured to:
determining whether the first field or the second field matches M of the N filter sub-entries; m is an integer of 1 to N.
Further, when each filter sub-item contains a valid bit, the filtering module 303 is further configured to:
and determining M filtering sub-items of which the values of the effective bits are preset values in the N filtering sub-items, wherein when the values of the effective bits are the preset values, the filtering sub-items corresponding to the effective bits are in a working state.
Further, the filtering module 303 is specifically configured to:
when the transmission channel of the frame information is determined to be an advertisement channel, judging whether the first field is matched with any one of M category fields corresponding to the M filtering sub items, and obtaining M first judgment results; judging whether the first field is matched with the M filtering sub-items or not based on the M first judgment results; or
When the transmission channel of the frame information is determined to be a data channel, judging whether the second field is matched with any one of M operation code fields corresponding to the M filtering sub items to obtain M second judgment results; determining whether the second field matches the M filter sub-entries based on the M second determination results.
Further, the filtering module 303 is specifically configured to:
judging whether the M first judgment results are all negative;
if yes, determining that the first field does not match the M filter sub-entries;
if not, determining that the first field is matched with the M filtering sub-items;
correspondingly, the filter module is specifically configured to:
judging whether the M second judgment results are all negative;
if so, determining that the second field does not match the M filter sub-entries;
if not, determining that the second field is matched with the M filtering sub-items.
One or more technical solutions in the embodiments of the present application have at least one or more of the following technical effects:
the scheme in the embodiment of the application filters received frame information, invalid frames or irrelevant frame information are filtered, effective frame information is allowed to pass, only effective frames passing through a filter are sent to a processor to be processed, in the prior art, the processor is awakened as long as a wireless communication module receives the frame information, the received frame information cannot be processed, and therefore the technical problem that power consumption of electronic equipment is high is caused, and the technical effect of saving power consumption of the electronic equipment is achieved.
The scheme in the embodiment of the application can selectively manage the frame information filtered by the filter, discard invalid frame information, store the frame information which is associated with the subsequent processing of the processor but does not need to be processed immediately to a storage space, for example, store the frame information for debugging, so as to avoid the phenomenon of frame loss, and realize the technical effect of ensuring the integrity of the frame information under the condition of low power consumption of the processor.
Thirdly, according to the scheme in the embodiment of the application, various types of frame information can be selected and filtered by configuring the filtering conditions of the filter, and a user can write frame types which do not need to be processed into the filter according to actual needs, so that the technical effect of flexibly configuring the filter is achieved.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (10)

1. An information processing method applied to an electronic device, the method comprising:
receiving, by a wireless communication module of the electronic device, frame information;
acquiring the related information of the frame information, specifically including: acquiring a first field in header information of the frame information and acquiring a second field in load information of the frame information;
judging whether the related information is matched with a preset filtering condition;
when the related information does not match the preset filtering condition, controlling a processor in the electronic equipment to process the frame information,
wherein the wireless communication module is a Bluetooth module, the preset filtering condition comprises N filtering sub-items, each filtering sub-item in the N filtering sub-items comprises a category field and an operation code field, N is a positive integer,
the determining whether the related information matches a preset filtering condition specifically includes:
determining whether the first field or the second field matches M of the N filter sub-entries; m is an integer of 1 to N,
the determining whether the first field or the second field is matched with M filtering sub-items of the N filtering sub-items specifically includes:
when the transmission channel of the frame information is determined to be an advertisement channel, judging whether the first field is matched with any one of M category fields corresponding to the M filtering sub items, and obtaining M first judgment results; judging whether the first field is matched with the M filtering sub-items or not based on the M first judgment results; or
When the transmission channel of the frame information is determined to be a data channel, judging whether the second field is matched with any one of M operation code fields corresponding to the M filtering sub items to obtain M second judgment results; determining whether the second field matches the M filter sub-entries based on the M second determination results.
2. The method of claim 1, wherein the processor comprises a first state and a second state, a first power consumption of the processor in the first state being less than a second power consumption of the processor in the second state;
when the processor is in the first state and the relevant information is not matched with the preset filtering condition, the controlling the processor in the electronic device to process the frame information specifically includes:
controlling the processor to switch from the first state to the second state;
and controlling the processor to process the frame information.
3. The method of claim 1, wherein after said determining whether said frame information matches a predetermined filter condition, said method further comprises:
and when the frame information is matched with the preset filtering condition, storing the frame information into a memory, or discarding the frame information.
4. The method of claim 1, wherein when each of the filter sub-entries includes a valid bit, before the determining whether the frame information matches a predetermined filter condition, the method further comprises:
and determining M filtering sub-items of which the values of the effective bits are preset values in the N filtering sub-items, wherein when the values of the effective bits are the preset values, the filtering sub-items corresponding to the effective bits are in a working state.
5. The method according to claim 1, wherein said determining whether the first field matches the M filter sub-entries based on the M first determination results comprises:
judging whether the M first judgment results are all negative;
if yes, determining that the first field does not match the M filter sub-entries;
if not, determining that the first field is matched with the M filtering sub-items;
correspondingly, the determining whether the second field is matched with the M filter sub-items based on the M second determination results specifically includes:
judging whether the M second judgment results are all negative;
if so, determining that the second field does not match the M filter sub-entries;
if not, determining that the second field is matched with the M filtering sub-items.
6. An electronic device, comprising:
a wireless communication module for receiving frame information;
a processing module, configured to obtain relevant information of the frame information, and specifically include: acquiring a first field in header information of the frame information and acquiring a second field in load information of the frame information;
the filtering module is used for judging whether the related information is matched with a preset filtering condition;
a control module, configured to control a processor in the electronic device to process the frame information when the related information does not match the preset filtering condition,
the wireless communication module is a Bluetooth module, the preset filtering condition comprises N filtering sub-items, and each filtering sub-item in the N filtering sub-items comprises a category field and an operation code field; n is a positive integer, and N is a positive integer,
the filtration module is specifically configured to:
determining whether the first field or the second field matches M of the N filter sub-entries; m is an integer of 1 to N,
when the transmission channel of the frame information is determined to be an advertisement channel, judging whether the first field is matched with any one of M category fields corresponding to the M filtering sub items, and obtaining M first judgment results; judging whether the first field is matched with the M filtering sub-items or not based on the M first judgment results; or
When the transmission channel of the frame information is determined to be a data channel, judging whether the second field is matched with any one of M operation code fields corresponding to the M filtering sub items to obtain M second judgment results; determining whether the second field matches the M filter sub-entries based on the M second determination results.
7. The electronic device of claim 6, wherein the processor includes a first state and a second state, a first power consumption of the processor in the first state being less than a second power consumption of the processor in the second state;
when the processor is in the first state and the related information does not match the preset filtering condition, the control module is specifically configured to:
controlling the processor to switch from the first state to the second state;
and controlling the processor to process the frame information.
8. The electronic device of claim 6, wherein the processing module is further to:
and when the frame information is matched with the preset filtering condition, storing the frame information into a memory, or discarding the frame information.
9. The electronic device of claim 6, wherein when each filter sub-item contains a valid bit, the filter module is further to:
and determining M filtering sub-items of which the values of the effective bits are preset values in the N filtering sub-items, wherein when the values of the effective bits are the preset values, the filtering sub-items corresponding to the effective bits are in a working state.
10. The electronic device of claim 6, wherein the filtering module is specifically configured to:
judging whether the M first judgment results are all negative;
if yes, determining that the first field does not match the M filter sub-entries;
if not, determining that the first field is matched with the M filtering sub-items;
correspondingly, the filter module is specifically configured to:
judging whether the M second judgment results are all negative;
if so, determining that the second field does not match the M filter sub-entries;
if not, determining that the second field is matched with the M filtering sub-items.
CN201510115291.3A 2015-03-16 2015-03-16 Information processing method and electronic equipment Active CN106034346B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510115291.3A CN106034346B (en) 2015-03-16 2015-03-16 Information processing method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510115291.3A CN106034346B (en) 2015-03-16 2015-03-16 Information processing method and electronic equipment

Publications (2)

Publication Number Publication Date
CN106034346A CN106034346A (en) 2016-10-19
CN106034346B true CN106034346B (en) 2019-12-24

Family

ID=57151195

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510115291.3A Active CN106034346B (en) 2015-03-16 2015-03-16 Information processing method and electronic equipment

Country Status (1)

Country Link
CN (1) CN106034346B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110611524A (en) * 2019-09-26 2019-12-24 联想(北京)有限公司 Bluetooth data information transmission method and device
CN112416829B (en) * 2020-11-25 2021-06-29 福州富昌维控电子科技有限公司 Method for transmitting data to HMI (human machine interface) and USB HID (Universal Serial bus) equipment

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7869411B2 (en) * 2005-11-21 2011-01-11 Broadcom Corporation Compact packet operation device and method

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103220695B (en) * 2012-01-20 2017-04-12 华为技术有限公司 Processing method and processing device for network element states
CN103309428B (en) * 2012-03-12 2016-12-14 联想(北京)有限公司 Information processing method and electronic equipment
CN103052135A (en) * 2012-11-30 2013-04-17 东莞宇龙通信科技有限公司 Mobile terminal and method for processing data of wireless fidelity (Wi-Fi) used on mobile terminal

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7869411B2 (en) * 2005-11-21 2011-01-11 Broadcom Corporation Compact packet operation device and method

Also Published As

Publication number Publication date
CN106034346A (en) 2016-10-19

Similar Documents

Publication Publication Date Title
EP3068087B1 (en) Method and system for transmitting data parallelly on wireless link and wired link
US9503964B2 (en) Method and system for parallel transmission of plural types of wireless links
CN106559806B (en) Dual-channel data transmission method and device, network node and mobile terminal
CN110851387B (en) Interface function configuration method and electronic equipment
EP3091699A1 (en) Queue scheduling method and device, and computer storage medium
US9742548B2 (en) Method and apparatus for using serial port in time division multiplexing manner
US10033546B2 (en) Method and system for reprogramming
CN104699504A (en) Method and system for upgrading of batch software of terminal device
CN106034346B (en) Information processing method and electronic equipment
CN111338787B (en) Data processing method and device, storage medium and electronic device
WO2021073054A1 (en) Data processing method, apparatus and device, and storage medium
CN105573711A (en) Data caching methods and apparatuses
WO2015088557A1 (en) Data stream processing based on a boundary parameter
EP2741449B1 (en) Processing of call data records
CN112702311B (en) Port-based message filtering method and device
ATE454787T1 (en) METHOD FOR ADAPTING A NUMBER OF RECEIVER TERMINALS TO A NUMBER M OF CONDITIONAL ACCESS CONTROL CARDS
CN106385450A (en) Data filtering method and system
CN105045756B (en) A kind of serial data processing method and system
CN106714258B (en) Channel switching method and device
CN103558995A (en) Memory control chip and disk message transmission method
CN104053252A (en) AT instruction processing method, device and system
CN108781170B (en) Configuration device and method
US9871867B2 (en) Message processing unit of PLC system
CN108984112B (en) Method and device for realizing storage QoS control strategy
US9699023B2 (en) Initializing a network interface based on stored data

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant