CN111679909B - Data processing method and device and terminal equipment - Google Patents
Data processing method and device and terminal equipment Download PDFInfo
- Publication number
- CN111679909B CN111679909B CN202010424715.5A CN202010424715A CN111679909B CN 111679909 B CN111679909 B CN 111679909B CN 202010424715 A CN202010424715 A CN 202010424715A CN 111679909 B CN111679909 B CN 111679909B
- Authority
- CN
- China
- Prior art keywords
- data
- processed
- data processing
- processing instruction
- memory
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000003672 processing method Methods 0.000 title claims abstract description 25
- 238000012545 processing Methods 0.000 claims abstract description 205
- 230000003068 static effect Effects 0.000 claims abstract description 71
- 238000000034 method Methods 0.000 claims abstract description 46
- 230000004044 response Effects 0.000 claims description 24
- 238000004590 computer program Methods 0.000 claims description 20
- 238000001514 detection method Methods 0.000 claims description 14
- 238000013467 fragmentation Methods 0.000 abstract description 4
- 238000006062 fragmentation reaction Methods 0.000 abstract description 4
- 230000008569 process Effects 0.000 description 9
- 230000006870 function Effects 0.000 description 6
- 238000013500 data storage Methods 0.000 description 5
- 238000010586 diagram Methods 0.000 description 4
- 239000002699 waste material Substances 0.000 description 4
- 230000006854 communication Effects 0.000 description 3
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 230000009286 beneficial effect Effects 0.000 description 2
- 238000004891 communication Methods 0.000 description 2
- 239000012634 fragment Substances 0.000 description 2
- 238000003491 array Methods 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5011—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
- G06F9/5016—Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory
-
- Y—GENERAL 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
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
The application is applicable to the technical field of memory allocation and provides a data processing method, a device and terminal equipment, wherein the data processing method comprises the following steps: acquiring a data processing instruction, and acquiring information of data to be processed according to the data processing instruction; if the information of the data to be processed accords with the preset condition, responding to the data processing instruction according to the statically allocated memory; and if the information of the data to be processed does not accord with the preset condition, responding to the data processing instruction by adopting a dynamic memory allocation mode. By the method, the event of excessive memory occupation caused by excessive memory of static allocation can be reduced, and the event of excessive memory fragmentation caused by excessive frequency of application of dynamic allocation can be reduced.
Description
Technical Field
The application belongs to the technical field of memory allocation, and particularly relates to a data processing method, a data processing device, terminal equipment and a computer readable storage medium.
Background
Memory allocation refers to: memory allocated for storage space is allocated or reclaimed during program execution.
Currently, the memory allocation method includes two modes of static memory allocation and dynamic memory allocation. The static memory allocation mode refers to: the memory to be used is allocated at the time of program initialization. In order to ensure that the memory is enough when in use, the memory is allocated according to the maximum use condition, and the allocation method of static memory allocation inevitably causes the memory waste. The dynamic memory allocation mode refers to: when the program is used, the memory is dynamically allocated according to the size of the memory, and is released after the use. Although the method for dynamically allocating the memory does not cause the waste of the memory, the frequent dynamic application of the memory is easy to generate memory fragments and has lower efficiency.
Therefore, there is a need to provide a new method to solve the above-mentioned problems.
Disclosure of Invention
The embodiment of the application provides a data processing method, which can solve the problems existing in the existing memory allocation process.
In a first aspect, an embodiment of the present application provides a data processing method, including:
acquiring a data processing instruction, and acquiring information of data to be processed according to the data processing instruction;
if the information of the data to be processed accords with the preset condition, responding to the data processing instruction according to the statically allocated memory;
and if the information of the data to be processed does not accord with the preset condition, responding to the data processing instruction by adopting a dynamic memory allocation mode.
Compared with the prior art, the embodiment of the application has the beneficial effects that: in the embodiment of the present application, when the information of the data to be processed accords with a preset condition, the data processing instruction is responded according to the statically allocated memory, otherwise, the data processing instruction is responded by adopting a dynamic memory allocation mode. In other words, in the embodiment of the present application, different memory allocation manners may be executed according to different information of the data to be processed, so that an event of excessive memory occupation caused by excessive memory allocated statically can be reduced, and an event of excessive memory fragmentation caused by excessive frequency of application for dynamic allocation can also be reduced.
Optionally, the information of the data to be processed includes a size of the data to be processed;
correspondingly, if the information of the data to be processed accords with a preset condition, responding to the data processing instruction according to the statically allocated memory, wherein the method specifically comprises the following steps:
if the size of the data to be processed is smaller than or equal to a preset static storage threshold value, responding to the data processing instruction according to the statically allocated memory;
correspondingly, if the information of the data to be processed does not meet the preset condition, responding to the data processing instruction by adopting a dynamic memory allocation mode, and specifically comprises the following steps:
and if the size of the data to be processed is larger than the preset static storage threshold value, responding to the data processing instruction by adopting a dynamic memory allocation mode.
Optionally, if the data processing instruction belongs to a specified instruction type, the preset static storage threshold is determined by:
respectively counting the sizes of the transmitted data to be processed after the histories acquire the data processing instructions belonging to the designated instruction types;
and determining the number of bytes, the size of which is smaller than or equal to half of the transmitted data to be processed, and setting the determined number of bytes as the preset static storage threshold.
Optionally, the information of the data to be processed includes a frequency of use of the data to be processed;
correspondingly, if the information of the data to be processed accords with a preset condition, responding to the data processing instruction according to the statically allocated memory, wherein the method specifically comprises the following steps:
if the use frequency of the data to be processed is greater than or equal to a preset frequency threshold value, responding to the data processing instruction according to the statically allocated memory;
correspondingly, if the information of the data to be processed does not meet the preset condition, responding to the data processing instruction by adopting a dynamic memory allocation mode, and specifically comprises the following steps:
and if the use frequency of the data to be processed is smaller than the preset frequency threshold value, responding to the data processing instruction by adopting a dynamic memory allocation mode.
Optionally, if the data processing instruction belongs to a specified instruction type, the preset frequency threshold is determined by:
respectively counting the use frequency of the transmitted data to be processed after the history obtains the data processing instruction belonging to the designated instruction type;
and determining that the frequency of use of more than half of the transmitted data to be processed is greater than or equal to the frequency value, and setting the determined frequency value as the preset frequency threshold.
Optionally, the acquiring the data processing instruction, according to which information of the data to be processed is acquired, includes:
acquiring a data processing instruction;
and if the current residual memory is smaller than or equal to a preset memory threshold value, acquiring information of the data to be processed according to the data processing instruction.
Optionally, the data processing method further includes:
and if the current residual memory is larger than the preset memory threshold value, responding to the data processing instruction according to the statically allocated memory.
In a second aspect, an embodiment of the present application provides a data processing apparatus, including:
the data processing instruction acquisition unit is used for acquiring a data processing instruction and acquiring information of data to be processed according to the data processing instruction;
the first data processing instruction response unit is used for responding to the data processing instruction according to the statically allocated memory if the information of the data to be processed accords with the preset condition;
and the second data processing instruction response unit is used for responding to the data processing instruction in a dynamic memory allocation mode if the information of the data to be processed does not accord with the preset condition.
The information of the data to be processed comprises the size of the data to be processed;
Optionally, the first data processing instruction response unit is specifically configured to:
if the size of the data to be processed is smaller than or equal to a preset static storage threshold value, responding to the data processing instruction according to the statically allocated memory;
correspondingly, the second data processing instruction response unit is specifically configured to:
and if the size of the data to be processed is larger than the preset static storage threshold value, responding to the data processing instruction by adopting a dynamic memory allocation mode.
Optionally, the information of the data to be processed includes a frequency of use of the data to be processed;
correspondingly, the first data processing instruction response unit is specifically configured to:
if the use frequency of the data to be processed is greater than or equal to a preset frequency threshold value, responding to the data processing instruction according to the statically allocated memory;
correspondingly, the second data processing instruction response unit is specifically configured to:
and if the use frequency of the data to be processed is smaller than the preset frequency threshold value, responding to the data processing instruction by adopting a dynamic memory allocation mode.
Optionally, if different instruction types correspond to different preset frequency thresholds, that is, if the data processing instruction belongs to a specified instruction type, the preset frequency thresholds are determined by:
Respectively counting the use frequency of the transmitted data to be processed after the history obtains the data processing instruction belonging to the designated instruction type; and determining that the frequency of use of more than half of the transmitted data to be processed is greater than or equal to the frequency value, and setting the determined frequency value as the preset frequency threshold.
Optionally, if the information of the data to be processed includes the frequency and the size of use of the data to be processed, the first data processing instruction response unit is specifically configured to: if the use frequency of the data to be processed is greater than or equal to a preset frequency threshold value and the size of the data to be processed is smaller than or equal to a preset static storage threshold value, responding to the data processing instruction according to the static allocated memory;
optionally, the second data processing instruction response unit is specifically configured to: and if the use frequency of the data to be processed is smaller than a preset frequency threshold value or the size of the data to be processed is larger than a preset static storage threshold value, responding to the data processing instruction by adopting a dynamic memory allocation mode.
Wherein, the preset conditions are as follows: the frequency of use is greater than or equal to a preset frequency threshold and the magnitude is less than or equal to a preset static storage threshold.
Optionally, when it is determined that the remaining memory of the terminal is too small, the schemes of allocating memory in a static memory allocation manner and allocating memory in a dynamic memory allocation manner are executed simultaneously, and at this time, the data processing instruction obtaining unit includes:
the instruction acquisition module is used for acquiring a data processing instruction;
and the information acquisition module is used for acquiring the information of the data to be processed according to the data processing instruction if the current residual memory is smaller than or equal to a preset memory threshold value.
Optionally, if the data processing device determines that the current remaining memory is larger, the data processing device further includes:
and the static memory allocation unit is used for responding to the data processing instruction according to the statically allocated memory if the current residual memory is larger than the preset memory threshold value.
In a third aspect, an embodiment of the present application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the method according to the first aspect when executing the computer program.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the method of any one of the first aspects.
In a fifth aspect, embodiments of the present application provide a computer program product for, when run on an in-vehicle detection device, causing the in-vehicle detection device to perform the method of any one of the first aspects.
It will be appreciated that the advantages of the second to fifth aspects may be found in the relevant description of the first aspect, and are not described here again.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings used in the description of the embodiments or the prior art will be briefly described below.
Fig. 1 is a flow chart of a first data processing method according to an embodiment of the present application;
fig. 2 is a flow chart of a second data processing method according to the second embodiment of the present application;
fig. 3 is a flow chart of a third data processing method according to the third embodiment of the present application;
FIG. 4 is a schematic diagram of a data processing apparatus according to a fourth embodiment of the present application;
fig. 5 is a schematic structural diagram of a terminal device provided in a fifth embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system configurations, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It should be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that the term "and/or" as used in this specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
As used in this specification and the appended claims, the term "if" may be interpreted as "when..once" or "in response to a determination" or "in response to detection" depending on the context. Similarly, the phrase "if a determination" or "if a [ described condition or event ] is detected" may be interpreted in the context of meaning "upon determination" or "in response to determination" or "upon detection of a [ described condition or event ]" or "in response to detection of a [ described condition or event ]".
Reference in the specification to "one embodiment" or "some embodiments" or the like means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," and the like in the specification are not necessarily all referring to the same embodiment, but mean "one or more but not all embodiments" unless expressly specified otherwise. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless expressly specified otherwise.
Embodiment one:
in the prior art, the same application scenario generally adopts the same memory allocation mode, for example, a static memory allocation mode is adopted, or a dynamic memory allocation mode is adopted. However, the memory allocated in the static memory allocation mode is not released, so that the terminal needs to have larger memory to ensure the normal operation of the system. In addition, although the memory allocated in the dynamic memory allocation manner can be released, the memory utilization is reduced because the memory fragments are generated by frequently and dynamically applying the memory. In order to solve the above technical problems, the present application proposes a data processing method, which selects a static memory allocation mode or a dynamic memory allocation mode according to information of data to be processed to allocate memory for the data to be processed.
Fig. 1 shows a flowchart of a first data processing method according to an embodiment of the present application, which is described in detail below:
step S11, acquiring a data processing instruction, and acquiring information of data to be processed according to the data processing instruction;
the data processing instruction may be a data acquisition instruction, for example, when the data processing method is applied to a terminal device, such as a vehicle detection device (or an embedded device), the vehicle detection device acquires the data acquisition instruction, and further acquires corresponding data from a vehicle to be detected according to the data acquisition instruction; the data processing instruction may also be a data storage instruction, for example, the vehicle detection apparatus acquires the data storage instruction, and stores data acquired from the vehicle to be detected in accordance with the data storage instruction. Of course, the data processing instruction may be other instructions, which are not limited herein.
In the step, the data processing instruction carries the identification of the data to be processed, and after the data processing instruction is acquired, the corresponding data to be processed is determined according to the identification of the data to be processed carried by the data processing instruction. The information of the data to be processed may include the size of the data to be processed, and may also include the estimated frequency of use of the data to be processed.
Step S12, if the information of the data to be processed accords with a preset condition, responding to the data processing instruction according to the statically allocated memory;
the preset condition is related to information of the data to be processed, for example, if the information of the data to be processed includes a size of the data to be processed, the preset condition may be a byte number; if the information of the data to be processed includes the estimated frequency of use of the data to be processed, the preset condition may be a frequency value.
In the step, if the data processing instruction is a data storage instruction, the data to be processed is stored in a statically allocated memory; if the data processing instruction is a data reading instruction, the data to be processed is read from the statically allocated memory.
And step S13, if the information of the data to be processed does not accord with the preset condition, responding to the data processing instruction by adopting a dynamic memory allocation mode.
For example, if the data processing instruction is a data storage instruction, after judging that the information of the data to be processed does not meet the preset condition, dynamically allocating the memory with the same size to the data to be processed according to the actual size of the data to be processed, and storing the data to be processed into the allocated memory. If the data processing instruction is a data reading instruction, after judging that the information of the data to be processed does not accord with the preset condition, reading the corresponding data to be processed from the dynamically allocated memory.
It should be noted that the existence of the dynamically allocated memory is released after the end of the use, and will be described by way of example, where m_len is the data length, kDataLen is a preset static storage threshold, m_data_long_buf is the memory address used for the dynamic allocation, and m_data is the address of the statically allocated memory (usually using an array):
if m_len is less than or equal to kDataLen, the process ends.
If m_len is greater than kDataLen, release the memory pointed to by m_data_long_buf.
M_data_long_buf is equal to 0.
M_data is equal to 0.
In the embodiment of the present application, when the information of the data to be processed accords with a preset condition, the data processing instruction is responded according to the statically allocated memory, otherwise, the data processing instruction is responded by adopting a dynamic memory allocation mode. In other words, in the embodiment of the present application, different memory allocation manners may be executed according to different information of the data to be processed, so that an event of excessive memory occupation caused by excessive memory allocated statically can be reduced, and an event of excessive memory fragmentation caused by excessive frequency of dynamic allocation can be reduced.
Embodiment two:
fig. 2 is a flow chart of a second data processing method according to an embodiment of the present application, in this embodiment, a method for selecting whether to respond to the data processing instruction according to a static allocation of memory or respond to the data processing instruction by adopting a dynamic allocation of memory according to a size of data to be processed is described in detail as follows:
step S21, acquiring a data processing instruction, and acquiring information of data to be processed according to the data processing instruction, wherein the information of the data to be processed comprises the size of the data to be processed;
in the step, corresponding data to be processed is determined according to the identification of the data to be processed carried by the data processing instruction, so that the size of the data to be processed can be determined.
Step S22, if the size of the data to be processed is smaller than or equal to a preset static storage threshold value, responding to the data processing instruction according to the statically allocated memory;
the preset static storage threshold value may be a fixed value (i.e., different instruction types correspond to the same static storage threshold value); the method can also be combined with the actual situation that the sizes of the data transmitted by different data processing instructions are different, and the user may wish to store the data transmitted by certain instructions for a long time, at this time, different static storage thresholds can be determined according to different instruction types, so as to improve the flexibility of selecting the memory allocation mode.
In some embodiments, if different instruction types correspond to different static storage thresholds, i.e., if the data processing instruction belongs to a specified instruction type, the preset static storage threshold is determined by:
a1, respectively counting the sizes of the transmitted data to be processed after the histories acquire the data processing instructions belonging to the designated instruction types;
a2, determining that more than half of the transmitted data to be processed are smaller than or equal to the byte number, and setting the determined byte number as the preset static storage threshold value.
In this embodiment, assume that the specified instruction type is: the ignition signal acquisition instruction type, the ignition signal acquisition instruction 1, the ignition signal acquisition instruction 2, and the ignition signal acquisition instruction 3 all belong to the ignition signal acquisition instruction type. The sizes of the transmitted data to be processed are counted after the ignition signal acquisition instruction 1, the ignition signal acquisition instruction 2 and the ignition signal acquisition instruction 3 are acquired each time in a preset time period from the current time point. Assuming that the sizes of the transmitted data to be processed are 250 bytes, 255 bytes and 4K bytes respectively, since 2 (more than 50% of the 3 data to be processed) data are smaller than or equal to 255 bytes, 255 is set as a preset static storage threshold corresponding to the type of the ignition signal acquisition instruction.
In some embodiments, since the statically allocated memory is not releasable, in order to avoid memory waste, the size of the statically allocated memory is set according to a preset static storage threshold.
Step S23, if the size of the data to be processed is greater than the preset static storage threshold, responding to the data processing instruction by adopting a dynamic memory allocation mode.
In the embodiment of the application, the memory is allocated to the data to be processed, which is smaller than or equal to the preset static memory threshold, in a static memory allocation mode, and the memory is allocated to the data to be processed, which is larger than the preset static memory threshold, in a dynamic memory allocation mode. Although the size of the data to be processed stored in the memory distributed in the dynamic memory distribution mode is larger, the data to be processed can be released, so that excessive memory is not occupied, and the memory utilization rate is improved; in addition, the size of the data to be processed stored in the memory distributed in the static memory distribution mode is smaller, so that the occupied memory is smaller.
In order to more clearly describe the above-mentioned scheme, a specific application example of storing data to be processed will be described below. Wherein datalen is the size of the data to be processed, kDataLen is a preset static storage threshold, m_data is the address of the statically allocated memory (typically in the form of an array), m_len is the data length, and m_data_long_buf is the memory address for dynamic allocation:
Step one, if datalen is greater than kDataLen, executing step four; otherwise, executing the second step.
And (step two) saving the data to be processed to m_data, wherein m_len is equal to datalen.
And step three, returning the function (namely ending the flow and finishing the function execution).
And step four, applying for a memory with the length of datalen, and storing the address in m_data_long_buf.
Step five saves the data to the address pointed to by m_data_long_buf, and m_len is equal to datalen.
The function returns [ step six ].
Described above is a process of storing data to be processed, and how to read corresponding data from a statically allocated memory or a dynamically allocated memory will be described below:
step one' ] if m_len is greater than or equal to kDataLen, executing step three; otherwise, executing the second step.
And (2) returning m_data. And (5) returning the address to the direct memory, and ending the flow.
And (3) returning m_data_long_buf. The flow ends.
In the above example, if the size of the data to be read is greater than the preset static storage threshold, the required data is read from the memory address of the dynamically allocated memory, otherwise, the required data is read from the memory address of the statically allocated memory.
Embodiment III:
fig. 3 is a flow chart illustrating a third data processing method according to an embodiment of the present application, in this embodiment, according to a usage frequency of data to be processed, selecting whether to respond to the data processing instruction according to a statically allocated memory or respond to the data processing instruction by adopting a dynamic memory allocation manner, which is described in detail below:
step S31, acquiring a data processing instruction, and acquiring information of data to be processed according to the data processing instruction, wherein the information of the data to be processed comprises the use frequency of the data to be processed;
specifically, if the data to be processed corresponding to the data processing instruction is used before the data processing instruction is acquired, the number of times of use of the data to be processed is counted (for example, the number of times of use is increased by 1 every 1 time of reading), and the number of times of use is used as the frequency of use of the data to be processed. Otherwise, if the data to be processed corresponding to the data processing instruction is not used before the data processing instruction is acquired, estimating the number of times of use of the data to be processed according to the determined number of times of use of the data to be processed of the same type, and taking the estimated number of times of use as the frequency of use of the data to be processed.
Step S32, if the use frequency of the data to be processed is greater than or equal to a preset frequency threshold, responding to the data processing instruction according to the statically allocated memory;
the preset frequency threshold may be a fixed value (i.e. different instruction types correspond to the same frequency threshold); the method can also be combined with the actual situation that the sizes of the data transmitted by different data processing instructions are different, and the user may wish to store the data transmitted by certain instructions for a long time, at this time, different frequency thresholds can be determined according to different instruction types, so as to improve the flexibility of selecting the memory allocation mode.
In some embodiments, if different instruction types correspond to different preset frequency thresholds, i.e. if the data processing instruction belongs to a specified instruction type, the preset frequency thresholds are determined by:
b1, respectively counting the use frequency of the transmitted data to be processed after the history acquisition of the data processing instruction belonging to the designated instruction type;
and B2, determining that the frequency of use of more than half of the transmitted data to be processed is greater than or equal to a frequency value, and setting the determined frequency value as the preset frequency threshold.
In this embodiment, assume that the specified instruction type is: the ignition signal acquisition instruction type, the ignition signal acquisition instruction 1, the ignition signal acquisition instruction 2, and the ignition signal acquisition instruction 3 all belong to the ignition signal acquisition instruction type. The usage frequency of the transmitted data to be processed is counted after each acquisition of the ignition signal acquisition instruction 1, the ignition signal acquisition instruction 2 and the ignition signal acquisition instruction 3 in a preset time period from the current time point onward. Assuming that the frequency values of the transmitted data to be processed are 5 times, 6 times and 2 times respectively, since 2 (more than 50% of the proportion) data to be processed exist in the 3 data to be processed, the frequency of use of the data to be processed is greater than or equal to 5 times, the 5 times are set as the preset frequency of use corresponding to the ignition signal acquisition instruction type.
In some embodiments, the statically allocated memory size is the same as in embodiment two.
And step S33, if the use frequency of the data to be processed is smaller than the preset frequency threshold value, responding to the data processing instruction by adopting a dynamic memory allocation mode.
In the embodiment of the application, the memory is allocated to the data to be processed with the use frequency greater than or equal to the preset frequency threshold in a static memory allocation mode, and the memory is allocated to the data to be processed with the use frequency less than the preset frequency threshold in a dynamic memory allocation mode. Because the use frequency of the data to be processed stored in the statically allocated memory is high, the corresponding data can be conveniently and quickly obtained from the statically allocated memory. Meanwhile, the use frequency of the data to be processed stored in the dynamically allocated memory is low, so that even if the dynamically allocated memory is released later, the inconvenience is not brought to the use of the data.
In some embodiments, consider that there are often such usage scenarios during use: in most cases, a small memory is used at a high frequency, and a large memory is used in the middle, which is mixed with a large memory at a low frequency. For example, in the communication process, most of the time, control commands are transmitted, and short commands, with a length of about tens or hundreds of bytes. But there is also a possibility of transmission of a large data packet in the middle, for example, an upgrade packet, a data file, etc. may have a length of several tens or even hundreds of KB or more. At this time, the frequency of use of the data to be processed may be considered in combination with the size of the data to be processed, that is, the information of the data to be processed includes the frequency of use and the size of the data to be processed:
correspondingly, if the information of the data to be processed accords with a preset condition, responding to the data processing instruction according to the statically allocated memory, wherein the method specifically comprises the following steps:
if the use frequency of the data to be processed is greater than or equal to a preset frequency threshold value and the size of the data to be processed is smaller than or equal to a preset static storage threshold value, responding to the data processing instruction according to the static allocated memory; otherwise, a dynamic memory allocation mode is adopted to respond to the data processing instruction.
Wherein, the preset conditions are as follows: the frequency of use is greater than or equal to a preset frequency threshold and the magnitude is less than or equal to a preset static storage threshold.
In this embodiment, the memory is allocated in a static memory allocation manner for the data to be processed, the frequency of which is greater than or equal to a preset frequency threshold and the size of which is less than or equal to a preset static memory threshold, and the memory is allocated in a dynamic memory allocation manner for the rest of the data to be processed, which do not meet preset conditions. The static allocated memory stores the data to be processed which is high in use frequency and occupies small memory, so that the small data used at high frequency can be ensured to be used more conveniently, and in addition, the dynamic allocated memory can be released, so that the use efficiency of the memory is improved.
In some embodiments, when it is determined that the remaining memory of the terminal is too small, the schemes of allocating memory in a static memory allocation manner and allocating memory in a dynamic memory allocation manner are executed simultaneously, where the step S11 or the step S21 or the step S31 includes:
c1, acquiring a data processing instruction;
and C2, if the current residual memory is smaller than or equal to a preset memory threshold value, acquiring information of the data to be processed according to the data processing instruction.
In this embodiment, after the data processing instruction is acquired, it is determined whether the current remaining memory (i.e. memory that is not used) is less than or equal to a preset memory threshold, if yes, information of the data to be processed is acquired, and then according to the acquired information of the data to be processed, whether to respond to the data processing instruction according to the statically allocated memory or respond to the data processing instruction by adopting a dynamic memory allocation mode is selected.
Further, if the current remaining memory is determined to be larger, namely: and if the current residual memory is larger than the preset memory threshold value, responding to the data processing instruction according to the statically allocated memory. Because the static memory allocation can ensure enough memory in use, when judging that the current residual memory is enough, the method of directly selecting the static memory allocation to allocate the memory for the data to be processed is beneficial to the use of the data to be processed subsequently.
It should be understood that the sequence number of each step in the foregoing embodiment does not mean that the execution sequence of each process should be determined by the function and the internal logic of each process, and should not limit the implementation process of the embodiment of the present application in any way.
Embodiment four:
Fig. 4 shows a block diagram of a data processing apparatus according to an embodiment of the present application, corresponding to the data processing method described in the above embodiment, where the data processing apparatus may be applied to a terminal device. For convenience of explanation, only portions relevant to the embodiments of the present application are shown.
Referring to fig. 4, the data processing apparatus 4 includes: a data processing instruction fetch unit 41, a first data processing instruction response unit 42, a second data processing instruction response unit 43. Wherein:
a data processing instruction acquisition unit 41 configured to acquire a data processing instruction according to which information of data to be processed is acquired;
the data processing instruction carries the identification of the data to be processed, and after the data processing instruction is acquired, the corresponding data to be processed is determined according to the identification of the data to be processed carried by the data processing instruction. The information of the data to be processed may include the size of the data to be processed, and may also include the estimated frequency of use of the data to be processed.
A first data processing instruction response unit 42, configured to respond to the data processing instruction according to the statically allocated memory if the information of the data to be processed meets a preset condition;
The preset condition is related to information of the data to be processed, for example, if the information of the data to be processed includes a size of the data to be processed, the preset condition may be a byte number; if the information of the data to be processed includes the estimated frequency of use of the data to be processed, the preset condition may be a frequency value.
The second data processing instruction response unit 43 is configured to respond to the data processing instruction by adopting a dynamic memory allocation manner if the information of the data to be processed does not meet the preset condition.
In the embodiment of the present application, when the information of the data to be processed accords with a preset condition, the data processing instruction is responded according to the statically allocated memory, otherwise, the data processing instruction is responded by adopting a dynamic memory allocation mode. In other words, in the embodiment of the present application, different memory allocation manners may be executed according to different information of the data to be processed, so that an event of excessive memory occupation caused by excessive memory allocated statically can be reduced, and an event of excessive memory fragmentation caused by excessive frequency of dynamic allocation can be reduced.
In some embodiments, the information of the data to be processed includes a size of the data to be processed;
Correspondingly, the first data processing instruction response unit 42 is specifically configured to:
if the size of the data to be processed is smaller than or equal to a preset static storage threshold value, responding to the data processing instruction according to the statically allocated memory;
correspondingly, the second data processing instruction response unit 43 is specifically configured to:
and if the size of the data to be processed is larger than the preset static storage threshold value, responding to the data processing instruction by adopting a dynamic memory allocation mode.
The preset static storage threshold value may be a fixed value (i.e., different instruction types correspond to the same static storage threshold value); the method can also be combined with the actual situation that the sizes of the data transmitted by different data processing instructions are different, and the user may wish to store the data transmitted by certain instructions for a long time, at this time, different static storage thresholds can be determined according to different instruction types, so as to improve the flexibility of selecting the memory allocation mode.
In some embodiments, if different instruction types correspond to different static storage thresholds, i.e., if the data processing instruction belongs to a specified instruction type, the preset static storage threshold is determined by:
Respectively counting the sizes of the transmitted data to be processed after the histories acquire the data processing instructions belonging to the designated instruction types; and determining the number of bytes, the size of which is smaller than or equal to half of the transmitted data to be processed, and setting the determined number of bytes as the preset static storage threshold.
In some embodiments, since the statically allocated memory is not releasable, in order to avoid memory waste, the size of the statically allocated memory is set according to a preset static storage threshold.
In some embodiments, the information of the data to be processed includes a frequency of use of the data to be processed;
correspondingly, the first data processing instruction response unit 42 is specifically configured to:
if the use frequency of the data to be processed is greater than or equal to a preset frequency threshold value, responding to the data processing instruction according to the statically allocated memory;
correspondingly, the second data processing instruction response unit 43 is specifically configured to:
and if the use frequency of the data to be processed is smaller than the preset frequency threshold value, responding to the data processing instruction by adopting a dynamic memory allocation mode.
The preset frequency threshold may be a fixed value (i.e. different instruction types correspond to the same frequency threshold); the method can also be combined with the actual situation that the sizes of the data transmitted by different data processing instructions are different, and the user may wish to store the data transmitted by certain instructions for a long time, at this time, different frequency thresholds can be determined according to different instruction types, so as to improve the flexibility of selecting the memory allocation mode.
In some embodiments, if different instruction types correspond to different preset frequency thresholds, i.e. if the data processing instruction belongs to a specified instruction type, the preset frequency thresholds are determined by:
respectively counting the use frequency of the transmitted data to be processed after the history obtains the data processing instruction belonging to the designated instruction type; and determining that the frequency of use of more than half of the transmitted data to be processed is greater than or equal to the frequency value, and setting the determined frequency value as the preset frequency threshold.
In some embodiments, the statically allocated memory size is the same as in embodiment two.
In some embodiments, if the information of the data to be processed includes the frequency and the size of the data to be processed, the first data processing instruction response unit 42 is specifically configured to: if the use frequency of the data to be processed is greater than or equal to a preset frequency threshold value and the size of the data to be processed is smaller than or equal to a preset static storage threshold value, responding to the data processing instruction according to the static allocated memory;
the second data processing instruction response unit 43 is specifically configured to: and if the use frequency of the data to be processed is smaller than a preset frequency threshold value or the size of the data to be processed is larger than a preset static storage threshold value, responding to the data processing instruction by adopting a dynamic memory allocation mode.
Wherein, the preset conditions are as follows: the frequency of use is greater than or equal to a preset frequency threshold and the magnitude is less than or equal to a preset static storage threshold.
In some embodiments, when it is determined that the remaining memory of the terminal is too small, the scheme of allocating memory in a static memory allocation manner and the scheme of allocating memory in a dynamic memory allocation manner are simultaneously executed, and at this time, the data processing instruction obtaining unit 41 includes:
the instruction acquisition module is used for acquiring a data processing instruction;
and the information acquisition module is used for acquiring the information of the data to be processed according to the data processing instruction if the current residual memory is smaller than or equal to a preset memory threshold value.
In some embodiments, if the data processing apparatus 4 determines that the current remaining memory is larger, the method further includes:
and the static memory allocation unit is used for responding to the data processing instruction according to the statically allocated memory if the current residual memory is larger than the preset memory threshold value.
It should be noted that, because the content of information interaction and execution process between the above devices/units is based on the same concept as the method embodiment of the present application, specific functions and technical effects thereof may be referred to in the method embodiment section, and will not be described herein again.
Fifth embodiment:
fig. 5 is a schematic structural diagram of a terminal device according to an embodiment of the present application. As shown in fig. 5, the terminal device 5 of this embodiment includes: at least one processor 50 (only one processor is shown in fig. 5), a memory 51 and a computer program 52 stored in the memory 51 and executable on the at least one processor 50, the processor 50 implementing the steps in any of the various method embodiments described above when executing the computer program 52:
acquiring a data processing instruction, and acquiring information of data to be processed according to the data processing instruction;
if the information of the data to be processed accords with the preset condition, responding to the data processing instruction according to the statically allocated memory;
and if the information of the data to be processed does not accord with the preset condition, responding to the data processing instruction by adopting a dynamic memory allocation mode.
Optionally, the information of the data to be processed includes a size of the data to be processed;
correspondingly, if the information of the data to be processed accords with a preset condition, responding to the data processing instruction according to the statically allocated memory, wherein the method specifically comprises the following steps:
if the size of the data to be processed is smaller than or equal to a preset static storage threshold value, responding to the data processing instruction according to the statically allocated memory;
Correspondingly, if the information of the data to be processed does not meet the preset condition, responding to the data processing instruction by adopting a dynamic memory allocation mode, and specifically comprises the following steps:
and if the size of the data to be processed is larger than the preset static storage threshold value, responding to the data processing instruction by adopting a dynamic memory allocation mode.
Optionally, if the data processing instruction belongs to a specified instruction type, the preset static storage threshold is determined by:
respectively counting the sizes of the transmitted data to be processed after the histories acquire the data processing instructions belonging to the designated instruction types;
and determining the number of bytes, the size of which is smaller than or equal to half of the transmitted data to be processed, and setting the determined number of bytes as the preset static storage threshold.
Optionally, the information of the data to be processed includes a frequency of use of the data to be processed;
correspondingly, if the information of the data to be processed accords with a preset condition, responding to the data processing instruction according to the statically allocated memory, wherein the method specifically comprises the following steps:
if the use frequency of the data to be processed is greater than or equal to a preset frequency threshold value, responding to the data processing instruction according to the statically allocated memory;
Correspondingly, if the information of the data to be processed does not meet the preset condition, responding to the data processing instruction by adopting a dynamic memory allocation mode, and specifically comprises the following steps:
and if the use frequency of the data to be processed is smaller than the preset frequency threshold value, responding to the data processing instruction by adopting a dynamic memory allocation mode.
Optionally, if the data processing instruction belongs to a specified instruction type, the preset frequency threshold is determined by:
respectively counting the use frequency of the transmitted data to be processed after the history obtains the data processing instruction belonging to the designated instruction type;
and determining that the frequency of use of more than half of the transmitted data to be processed is greater than or equal to the frequency value, and setting the determined frequency value as the preset frequency threshold.
Optionally, the acquiring the data processing instruction, according to which information of the data to be processed is acquired, includes:
acquiring a data processing instruction;
and if the current residual memory is smaller than or equal to a preset memory threshold value, acquiring information of the data to be processed according to the data processing instruction.
Optionally, the data processing method further includes:
And if the current residual memory is larger than the preset memory threshold value, responding to the data processing instruction according to the statically allocated memory.
The terminal device 5 may be a computing device such as a desktop computer, a notebook computer, a palm computer, a cloud server, etc. The terminal device may include, but is not limited to, a processor 50, a memory 51. It will be appreciated by those skilled in the art that fig. 5 is merely an example of the terminal device 5 and is not meant to be limiting as the terminal device 5, and may include more or fewer components than shown, or may combine certain components, or different components, such as may also include input-output devices, network access devices, etc.
The processor 50 may be a central processing unit (Central Processing Unit, CPU), the processor 50 may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), field-programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 51 may in some embodiments be an internal storage unit of the terminal device 5, such as a hard disk or a memory of the terminal device 5. The memory 51 may in other embodiments also be an external storage device of the terminal device 5, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) or the like, which are provided on the terminal device 5. Further, the memory 51 may also include both an internal storage unit and an external storage device of the terminal device 5. The memory 51 is used for storing an operating system, application programs, boot loader (BootLoader), data, other programs, etc., such as program codes of the computer program. The memory 51 may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions. The functional units and modules in the embodiment may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit, where the integrated units may be implemented in a form of hardware or a form of a software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working process of the units and modules in the above system may refer to the corresponding process in the foregoing method embodiment, which is not described herein again.
The embodiment of the application also provides a network device, which comprises: at least one processor, a memory, and a computer program stored in the memory and executable on the at least one processor, which when executed by the processor performs the steps of any of the various method embodiments described above.
Embodiments of the present application also provide a computer readable storage medium storing a computer program which, when executed by a processor, implements steps that may implement the various method embodiments described above.
Embodiments of the present application provide a computer program product which, when run on a mobile terminal, causes the mobile terminal to perform steps that may be performed in the various method embodiments described above.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the present application implements all or part of the flow of the method of the above embodiments, and may be implemented by a computer program to instruct related hardware, where the computer program may be stored in a computer readable storage medium, where the computer program, when executed by a processor, may implement the steps of each of the method embodiments described above. Wherein the computer program comprises computer program code which may be in source code form, object code form, executable file or some intermediate form etc. The computer readable medium may include at least: any entity or device capable of carrying computer program code to a photographing device/terminal apparatus, recording medium, computer Memory, read-Only Memory (ROM), random access Memory (RAM, random Access Memory), electrical carrier signals, telecommunications signals, and software distribution media. Such as a U-disk, removable hard disk, magnetic or optical disk, etc. In some jurisdictions, computer readable media may not be electrical carrier signals and telecommunications signals in accordance with legislation and patent practice.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and in part, not described or illustrated in any particular embodiment, reference is made to the related descriptions of other embodiments.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/network device and method may be implemented in other manners. For example, the apparatus/network device embodiments described above are merely illustrative, e.g., the division of the modules or units is merely a logical functional division, and there may be additional divisions in actual implementation, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection via interfaces, devices or units, which may be in electrical, mechanical or other forms.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
The above embodiments are only for illustrating the technical solution of the present application, and are not limiting; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application, and are intended to be included in the scope of the present application.
Claims (9)
1. A data processing method, characterized by being applied to a vehicle detection apparatus, comprising:
acquiring a data processing instruction, acquiring information of data to be processed according to the data processing instruction, specifically, acquiring a data acquisition instruction by the vehicle detection equipment, and further acquiring corresponding data to be processed from a vehicle to be detected according to the data acquisition instruction;
If the information of the data to be processed accords with the preset condition, responding to the data processing instruction according to the statically allocated memory;
if the information of the data to be processed does not accord with the preset condition, responding to the data processing instruction by adopting a dynamic memory allocation mode;
the information of the data to be processed comprises the frequency of use of the data to be processed, wherein if the data to be processed corresponding to the data processing instruction is not used before the data processing instruction is acquired, the number of times of use of the data to be processed is estimated according to the determined number of times of use of the data to be processed, and the estimated number of times of use is used as the frequency of use of the data to be processed;
correspondingly, if the information of the data to be processed accords with a preset condition, responding to the data processing instruction according to the statically allocated memory, wherein the method specifically comprises the following steps:
if the use frequency of the data to be processed is greater than or equal to a preset frequency threshold value, responding to the data processing instruction according to the statically allocated memory;
correspondingly, if the information of the data to be processed does not meet the preset condition, responding to the data processing instruction by adopting a dynamic memory allocation mode, and specifically comprises the following steps:
And if the use frequency of the data to be processed is smaller than the preset frequency threshold value, responding to the data processing instruction by adopting a dynamic memory allocation mode.
2. The data processing method according to claim 1, wherein the information of the data to be processed includes a size of the data to be processed;
correspondingly, if the information of the data to be processed accords with a preset condition, responding to the data processing instruction according to the statically allocated memory, wherein the method specifically comprises the following steps:
if the size of the data to be processed is smaller than or equal to a preset static storage threshold value, responding to the data processing instruction according to the statically allocated memory;
correspondingly, if the information of the data to be processed does not meet the preset condition, responding to the data processing instruction by adopting a dynamic memory allocation mode, and specifically comprises the following steps:
and if the size of the data to be processed is larger than the preset static storage threshold value, responding to the data processing instruction by adopting a dynamic memory allocation mode.
3. The data processing method according to claim 2, wherein if the data processing instruction belongs to a specified instruction type, the preset static storage threshold is determined by:
Respectively counting the sizes of the transmitted data to be processed after the histories acquire the data processing instructions belonging to the designated instruction types;
and determining the number of bytes, the size of which is smaller than or equal to half of the transmitted data to be processed, and setting the determined number of bytes as the preset static storage threshold.
4. The data processing method of claim 1, wherein if the data processing instruction belongs to a specified instruction type, the preset frequency threshold is determined by:
respectively counting the use frequency of the transmitted data to be processed after the history obtains the data processing instruction belonging to the designated instruction type;
and determining that the frequency of use of more than half of the transmitted data to be processed is greater than or equal to the frequency value, and setting the determined frequency value as the preset frequency threshold.
5. The data processing method according to any one of claims 1 to 4, wherein the acquiring the data processing instruction, acquiring information of the data to be processed according to the data processing instruction, includes:
acquiring a data processing instruction;
and if the current residual memory is smaller than or equal to a preset memory threshold value, acquiring information of the data to be processed according to the data processing instruction.
6. The data processing method of claim 5, wherein the data processing method further comprises:
and if the current residual memory is larger than the preset memory threshold value, responding to the data processing instruction according to the statically allocated memory.
7. A data processing apparatus, characterized by being applied to a vehicle detection device, comprising:
the vehicle detection device comprises a data processing instruction acquisition unit, a data processing instruction acquisition unit and a vehicle detection unit, wherein the data processing instruction acquisition unit is used for acquiring data processing instructions according to information of data to be processed, specifically, the vehicle detection device acquires data acquisition instructions, and further acquires corresponding data to be processed from a vehicle to be detected according to the data acquisition instructions;
the first data processing instruction response unit is used for responding to the data processing instruction according to the statically allocated memory if the information of the data to be processed accords with the preset condition;
the second data processing instruction response unit is used for responding to the data processing instruction in a dynamic memory allocation mode if the information of the data to be processed does not accord with the preset condition;
the same application scene only adopts a static memory allocation mode or a dynamic memory allocation mode;
The information of the data to be processed comprises the frequency of use of the data to be processed, wherein if the data to be processed corresponding to the data processing instruction is not used before the data processing instruction is acquired, the number of times of use of the data to be processed is estimated according to the determined number of times of use of the data to be processed, and the estimated number of times of use is used as the frequency of use of the data to be processed;
correspondingly, if the information of the data to be processed accords with a preset condition, responding to the data processing instruction according to the statically allocated memory, wherein the method specifically comprises the following steps:
if the use frequency of the data to be processed is greater than or equal to a preset frequency threshold value, responding to the data processing instruction according to the statically allocated memory;
correspondingly, if the information of the data to be processed does not meet the preset condition, responding to the data processing instruction by adopting a dynamic memory allocation mode, and specifically comprises the following steps:
and if the use frequency of the data to be processed is smaller than the preset frequency threshold value, responding to the data processing instruction by adopting a dynamic memory allocation mode.
8. A terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the method according to any of claims 1 to 6 when executing the computer program.
9. A computer readable storage medium storing a computer program, characterized in that the computer program when executed by a processor implements the method according to any one of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010424715.5A CN111679909B (en) | 2020-05-19 | 2020-05-19 | Data processing method and device and terminal equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010424715.5A CN111679909B (en) | 2020-05-19 | 2020-05-19 | Data processing method and device and terminal equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111679909A CN111679909A (en) | 2020-09-18 |
CN111679909B true CN111679909B (en) | 2024-02-23 |
Family
ID=72434092
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010424715.5A Active CN111679909B (en) | 2020-05-19 | 2020-05-19 | Data processing method and device and terminal equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111679909B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113536075B (en) * | 2021-07-20 | 2024-06-04 | 锐掣(杭州)科技有限公司 | Data extraction method, device and storage medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1635482A (en) * | 2003-12-29 | 2005-07-06 | 北京中视联数字***有限公司 | A memory management method for embedded system |
CN101414281A (en) * | 2007-10-19 | 2009-04-22 | 大唐移动通信设备有限公司 | Internal memory management method and system |
CN104090848A (en) * | 2014-07-16 | 2014-10-08 | 云南大学 | Memory management method and device for periodic large big data processing |
CN109614240A (en) * | 2018-12-13 | 2019-04-12 | 锐捷网络股份有限公司 | Memory application method, equipment and storage medium |
CN110162483A (en) * | 2018-02-12 | 2019-08-23 | 上海寒武纪信息科技有限公司 | Static memory scrap cleaning method, device, computer equipment and storage medium |
CN110442454A (en) * | 2019-08-02 | 2019-11-12 | 联想(北京)有限公司 | A kind of resource regulating method, device and computer equipment |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7010783B2 (en) * | 2002-03-18 | 2006-03-07 | Sun Microsystems, Inc. | Method and apparatus for deployment of high integrity software using reduced dynamic memory allocation |
-
2020
- 2020-05-19 CN CN202010424715.5A patent/CN111679909B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1635482A (en) * | 2003-12-29 | 2005-07-06 | 北京中视联数字***有限公司 | A memory management method for embedded system |
CN101414281A (en) * | 2007-10-19 | 2009-04-22 | 大唐移动通信设备有限公司 | Internal memory management method and system |
CN104090848A (en) * | 2014-07-16 | 2014-10-08 | 云南大学 | Memory management method and device for periodic large big data processing |
CN110162483A (en) * | 2018-02-12 | 2019-08-23 | 上海寒武纪信息科技有限公司 | Static memory scrap cleaning method, device, computer equipment and storage medium |
CN109614240A (en) * | 2018-12-13 | 2019-04-12 | 锐捷网络股份有限公司 | Memory application method, equipment and storage medium |
CN110442454A (en) * | 2019-08-02 | 2019-11-12 | 联想(北京)有限公司 | A kind of resource regulating method, device and computer equipment |
Non-Patent Citations (1)
Title |
---|
杨正宏.《数据结构》.中国铁道出版社,2001,15-18页. * |
Also Published As
Publication number | Publication date |
---|---|
CN111679909A (en) | 2020-09-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111679921B (en) | Memory sharing method, memory sharing device and terminal equipment | |
US20220121495A1 (en) | Memory reclamation method, electronic device and storage medium | |
CN110727607B (en) | Memory recovery method and device and electronic equipment | |
CN113489653B (en) | Message sending method and device and computer equipment | |
US20140006668A1 (en) | Performing Emulated Message Signaled Interrupt Handling | |
CN111597040A (en) | Resource allocation method, device, storage medium and electronic equipment | |
CN114915457A (en) | Message transmission method, dynamic encryption method, device, electronic equipment and medium | |
CN111679728B (en) | Data reading method and device | |
CN111679909B (en) | Data processing method and device and terminal equipment | |
CN109857553B (en) | Memory management method and device | |
CN109639555B (en) | Link layer message generation method, link layer message generation device and terminal equipment | |
CN106776393B (en) | uninterrupted serial port data receiving method and device | |
CN111162792A (en) | Compression method and device for power load data | |
CN111708715B (en) | Memory allocation method, memory allocation device and terminal equipment | |
CN116401045A (en) | Method and device for elastic pooling management of MSIX interrupt vector | |
CN114697440B (en) | Network management method and mobile terminal | |
CN113051077A (en) | User request processing method and device, terminal equipment and storage medium | |
CN108667951B (en) | Virtual MAC address mapping method and device, storage medium and relay equipment | |
CN108629175B (en) | Access control method and access control device of USB mass storage equipment | |
CN111625358A (en) | Resource allocation method and device, electronic equipment and storage medium | |
CN113568349B (en) | Data processing method, device, terminal equipment and readable storage medium | |
CN111078405A (en) | Memory allocation method and device, storage medium and electronic equipment | |
CN112199042B (en) | Storage space management method, device, chip, equipment and storage medium | |
CN112579207B (en) | Data loading method, device and equipment | |
CN113641304B (en) | Method, device, terminal equipment and storage medium for managing data blocks |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |