WO2023051270A1 - Memory occupation amount pre-estimation method and apparatus, and storage medium - Google Patents

Memory occupation amount pre-estimation method and apparatus, and storage medium Download PDF

Info

Publication number
WO2023051270A1
WO2023051270A1 PCT/CN2022/119102 CN2022119102W WO2023051270A1 WO 2023051270 A1 WO2023051270 A1 WO 2023051270A1 CN 2022119102 W CN2022119102 W CN 2022119102W WO 2023051270 A1 WO2023051270 A1 WO 2023051270A1
Authority
WO
WIPO (PCT)
Prior art keywords
unit data
data
memory usage
standard unit
memory
Prior art date
Application number
PCT/CN2022/119102
Other languages
French (fr)
Chinese (zh)
Inventor
冯旭
邬春会
赵光跃
Original Assignee
中兴通讯股份有限公司
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 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2023051270A1 publication Critical patent/WO2023051270A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/34Recording or statistical evaluation of computer activity, e.g. of down time, of input/output operation ; Recording or statistical evaluation of user activity, e.g. usability assessment
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • G06F18/232Non-hierarchical techniques
    • G06F18/2321Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions
    • G06F18/23213Non-hierarchical techniques using statistics or function optimisation, e.g. modelling of probability density functions with fixed number of clusters, e.g. K-means clustering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/40Transformation of program code
    • G06F8/41Compilation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]

Definitions

  • the present invention relates to the technical field of data processing, in particular to a memory usage estimation method, device and storage medium.
  • terminal devices need to process a large number of data request messages, frequently read and write disks and perform corresponding interactive operations, which pose a great challenge to the stable operation and performance of the software system, and easily lead to overloaded operation of terminal devices .
  • it is necessary to estimate the memory capacity to be occupied by the received data request message, and perform corresponding follow-up processing after the estimation.
  • the amount of business data requested by different data request messages is different, and the data processing capabilities of terminal devices for different types of business data are also different. Therefore, it is accurate for related technologies to estimate the memory resources required by data request messages. Sex is not high.
  • Embodiments of the present invention provide a method, device, and storage medium for estimating memory usage, aiming at improving the accuracy of estimating the memory usage required by a data request message.
  • an embodiment of the present invention provides a method for estimating memory usage, including: acquiring a plurality of unit data, and performing aggregation processing on the plurality of unit data to obtain a plurality of standard unit data; determining each of the The memory usage corresponding to the standard unit data; obtaining the data request message to be responded to, and determining the target data to be obtained according to the data request message; determining the standard matching the target data from a plurality of the standard unit data Unit data: Estimate the memory capacity occupied by responding to the data request message according to the memory usage corresponding to the standard unit data matching the target data.
  • an embodiment of the present invention further provides a terminal device, the terminal device includes a processor, a memory, a computer program stored on the memory and executable by the processor, and a computer program for implementing the processor A data bus communicating with the connection between the memories, wherein when the computer program is executed by the processor, the steps of any method for estimating memory usage provided by the embodiments of the present invention are realized.
  • the embodiment of the present invention also provides a storage medium for computer-readable storage, the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors , so as to realize the steps of any method for estimating memory usage provided by the embodiments of the present invention.
  • FIG. 1 is a schematic flowchart of steps of a method for estimating memory usage provided by an embodiment of the present invention
  • Fig. 2 is a schematic flow chart of the sub-steps of the memory usage estimation method in Fig. 1;
  • FIG. 3 is a schematic diagram of a scene implementing data aggregation provided by an embodiment of the present invention.
  • FIG. 4 is a schematic flowchart of steps of another method for estimating memory usage provided by an embodiment of the present invention.
  • FIG. 5 is a schematic structural block diagram of a terminal device provided by an embodiment of the present invention.
  • Embodiments of the present invention provide a memory usage estimation method, device and storage medium.
  • the method for estimating memory usage can be applied to terminal equipment, and the terminal equipment can be electronic equipment such as mobile phones, tablet computers, notebook computers, desktop computers, personal digital assistants, and wearable equipment.
  • the terminal device can be a network management system (Network Management System), which is used to adjust the network status by combining software and hardware to ensure that the network system can run normally and efficiently, so that the network system can The resources are better utilized, which is to realize the collection of various network management functions on the basis of the network management platform.
  • Network Management System Network Management System
  • FIG. 1 is a schematic flowchart of steps of a method for estimating memory usage provided by an embodiment of the present invention.
  • the memory usage estimation method includes steps S101 to S105.
  • Step S101 acquiring a plurality of unit data, and performing aggregation processing on the plurality of unit data to obtain a plurality of standard unit data.
  • the unit data is the representation of various attributes of things that can be accepted and processed by computers, including integers, real numbers, characters, text, tables, graphics, images, and sounds.
  • Multiple unit data can be the full amount of data in the network management system.
  • Multiple unit data can include unit data with different data volumes and types. Therefore, selecting multiple universal and representative unit data from multiple unit data as standard unit data is beneficial for subsequent reference to standard unit data. The accuracy and efficiency of estimating the memory capacity occupied by the target data requested by the data request message.
  • the unit data can be 5GNR (5G New Radio, 5G new air interface), UMTS (Universal Mobile Telecommunications System, universal mobile communication system), GSM (Global System for Mobile Communications, Global System for Mobile Communications), LTE FDD (Long Term Evolution FDD, Long Term Evolution Frequency Division Duplex), NB IoT (Narrow Band Internet of Things, Narrowband Internet of Things) and other base station at least one business data .
  • 5GNR 5G New Radio, 5G new air interface
  • UMTS Universal Mobile Telecommunications System, universal mobile communication system
  • GSM Global System for Mobile Communications, Global System for Mobile Communications
  • LTE FDD Long Term Evolution FDD, Long Term Evolution Frequency Division Duplex
  • NB IoT Narrow Band Internet of Things, Narrowband Internet of Things
  • other base station at least one business data .
  • performing aggregation processing on a plurality of unit data to obtain a plurality of standard unit data includes: sub-step S1011 to sub-step S1012 .
  • Sub-step S1011 performing clustering processing on multiple unit data to obtain multiple unit data groups.
  • Unit data of the same type are aggregated to obtain multiple unit data groups, and the unit data groups include multiple unit data.
  • clustering processing is performed on multiple unit data by using a preset clustering algorithm to obtain multiple unit data groups.
  • the preset clustering algorithm includes but not limited to K-MEANS clustering algorithm, mean shift clustering algorithm, DBSCAN clustering algorithm, hierarchical clustering algorithm and Gaussian mixture model clustering algorithm, etc.
  • Multiple unit data are first clustered by a preset clustering algorithm to obtain multiple data clusters, and multiple unit data in each data cluster are used as a unit data group.
  • multiple unit data groups are obtained by clustering the multiple unit data through the preset K-MEANS clustering algorithm.
  • the data of multiple units is the record data stored in the base station data of the whole network.
  • the value of K is The grouping number of cell data groups.
  • multiple unit data include business data of various base stations such as 5GNR, GU, GSM, LTE, NB, etc.
  • K central points black in Figure 3 Shaded mark points
  • the K center points are virtual points, and the distance between multiple unit data and K center points is calculated; the center points corresponding to the shortest distance are selected as a group, and the center point of each group of unit data is recalculated ;Execute the process of grouping according to the distance between multiple unit data and the center point, and stop until the result of regrouping is consistent with the result of the last grouping, multiple unit data are divided into K categories, and K unit data are obtained group, the difference between multiple unit data in each unit data group is within a certain range.
  • the K value of the K-MEANS clustering algorithm can be set according to the actual situation of the software system on the terminal device.
  • the K value is set with reference to the data, which is not specifically limited in this embodiment.
  • the plurality of unit data are classified according to the data types of the plurality of unit data to obtain a plurality of unit data groups.
  • the unit data carries the tag information of the data type, and multiple unit data can be accurately classified according to the data type of the unit data, so that the unit data of the same data type are divided into a unit data group.
  • the multiple unit data are classified according to the data types and data volumes of the multiple unit data to obtain multiple unit data groups. It should be noted that, according to the data type and data volume of multiple unit data, multiple unit data are classified, so that unit data with similar data volume and unit data with the same data type are divided into one unit data group, and multiple unit data are obtained.
  • the unit data group is beneficial to subsequently determine the standard unit data from the unit data group, and improve the universality and representativeness of the standard unit data.
  • Sub-step S1012 perform aggregation processing on multiple unit data in the unit data group, so as to obtain standard unit data corresponding to the unit data group.
  • a secondary aggregation process is performed on the plurality of unit data in each unit data group, so as to select at least one unit data from the plurality of unit data in each unit data group as standard unit data.
  • the process of selecting standard unit data can also be regarded as the process of data aggregation. After the standard unit data is determined, the standard unit data can be marked.
  • the standard unit data is universal and representative in each unit data group, which is convenient for subsequent
  • the memory capacity is estimated with reference to the standard unit data, which improves the accuracy of the estimation, and does not need to calculate or process all the unit data, thereby improving the estimation efficiency.
  • a plurality of unit data in the unit data group is sorted to obtain a unit data queue; according to the arrangement order of the plurality of unit data in the unit data queue, at least one unit data is selected from the unit data queue as a standard cell data.
  • multiple unit data are sorted in each unit data group, and standard unit data is selected from the sorted multiple unit data according to the preset quantiles and the arrangement order of the multiple unit data, and the standard unit data Can be one or more.
  • the data structure of the standard unit data is uncertain, for example, the data structure of the base station data is a standard tree data, and the cell data is a node in the standard tree data.
  • the quantile is the quantile point, which is used to divide the sorted multiple unit data into multiple equal parts.
  • the quantile is, for example, the median, that is, the 50th quantile.
  • the number of bits can be flexibly set according to the actual situation of the unit data. By adjusting the quantile size to select standard unit data from multiple sorted unit data, the representativeness of standard unit data can be improved.
  • the target service optimism is selected from the preset service optimism range; the corresponding target quantile is determined according to the selected target service optimism; according to the target quantile, the sorted multiple unit data Select the standard cell data.
  • service optimism is used to characterize the size of the allowable error of the software system.
  • the service optimism is proportional to the risk of the software system.
  • the optional setting of the service optimism is 1-100, corresponding to the quantile 100-1, that is, the higher the service optimism, the lower the quantile, and the greater the tolerance error of the software system, the greater the throughput.
  • the target service optimism can be set and selected by technicians according to the actual situation, and can also be determined after multiple experiments and adjustments.
  • the service optimism can better balance the memory capacity required by the data request message in the embodiment of this application. estimation accuracy and efficiency.
  • the target service optimism of 10 can be selected from the range of 1-100 service optimism; 90 points can be selected according to the target service optimism of 10
  • the quantile of the position is used as the target quantile; the unit data corresponding to the target quantile of the 90th quantile is selected from the sorted multiple unit data as the standard unit data.
  • the multiple unit data in the unit data group are sorted according to the service characteristic data of the multiple unit data to obtain the unit data queue.
  • the unit data can include service feature data
  • the service feature data can be flexibly set according to the actual situation of the unit data. For example, if the unit data is base station data in the network management system, representative cell number information can be selected as the service feature data.
  • representative cell number information can be selected as the service feature data.
  • commodity prices may be selected as service feature data, which is not specifically limited in this embodiment.
  • Step S102 determining the memory usage corresponding to each standard unit data.
  • Link the standard unit data aggregated from the data with the memory capacity occupied by the standard unit data for example, establish a linear model between the standard unit data and the memory usage, so that the data request message can be sent according to the memory usage corresponding to the standard unit data
  • the memory capacity occupied by the corresponding target data is estimated to improve the accuracy of the estimation.
  • the data volume of the standard unit data is obtained, and the data volume is used as the memory usage corresponding to the standard unit data.
  • the standard unit data information includes a data amount, and the data amount is used as the memory usage corresponding to the standard unit data, so that the memory usage corresponding to the standard unit data can be quickly determined.
  • the standard unit data is loaded to obtain the memory usage corresponding to the standard unit data.
  • the standard unit data is loaded into the software system of the terminal device, and the memory usage corresponding to the standard unit data is determined according to the change of the memory capacity after the standard unit data is loaded, which is more accurate.
  • loading the standard unit data to obtain the memory usage corresponding to the standard unit data includes: repeatedly loading the standard unit data; when the total memory capacity occupied by the loaded standard unit data is greater than or equal to the preset When the capacity threshold is reached, stop loading the standard unit data; calculate the memory usage corresponding to the standard unit data according to the total memory capacity and the loading times of the standard unit data.
  • the preset capacity threshold can be set according to the actual situation, for example, the preset capacity threshold is 70% or 80% of the total memory capacity of the terminal device, by repeatedly loading the same standard unit data, and according to the total memory capacity of the standard unit data Calculate the memory usage corresponding to a standard unit data based on the number of loading times, which is more in line with the actual situation, and the measurement accuracy of the memory capacity occupied by the standard unit data is higher.
  • Step S103 acquiring the data request message to be responded to, and determining the target data to be acquired according to the data request message.
  • the data request messages include a request message for data addition, a request message for data query, a request message for data modification, and a request message for data deletion.
  • request line request header
  • blank line request data.
  • the target data to be acquired is determined according to the data request message, so that the memory capacity that the data request message will occupy after the terminal device responds to the data request message can be estimated based on the target data.
  • the terminal device includes a network management system, and the network management system can accept data request messages sent by multiple base stations.
  • the terminal device receives multiple data request messages to be responded to, it determines the target data corresponding to each data request message.
  • the target data is determined according to the identification information requested by the data request message. There may be one or more target data.
  • Step S104 determining standard unit data matching the target data from a plurality of standard unit data.
  • the standard unit data as representative unit data, can also be used to represent the target data, so it is necessary to determine the standard unit data that matches the target data, so that it is convenient to refer to the memory usage corresponding to the standard unit data to evaluate the target data. memory footprint.
  • At least one standard unit data is selected from a plurality of standard unit data as the standard unit data matching the target data. For example, according to the data type and data volume of the target data, the matching degree between the target data and each standard unit data is calculated, and the standard unit data corresponding to the maximum matching degree is selected as the standard unit data matching the target data. It should be noted that, according to the data type and data volume of the target data, selecting at least one standard unit data with a similar data volume and the same data type can greatly improve the estimation of the memory usage required by the data request message. accuracy.
  • the target data is added to a plurality of standard unit data to obtain a target data set; the target data set is clustered to obtain the clustering information of the target data; according to the clustering information of the target data, the target data is determined
  • the standard unit data aggregated in one group is used as the standard unit data matching the target data.
  • the distance between each data in the target data set is calculated, and multiple data in the target data set are clustered according to multiple distances; the closest distance to the target data is obtained from the clustering information of the target data
  • the standard unit data of use the standard unit data with the closest distance as the standard unit data matching the target data.
  • Step S105 estimating the memory capacity occupied by the response data request message according to the memory usage corresponding to the standard unit data matching the target data.
  • the memory usage corresponding to multiple standard unit data matching the target data is added, and the total memory usage obtained is the memory capacity occupied by responding to the data request message.
  • the average value of the memory usage corresponding to the multiple standard unit data matching the target data is calculated, and based on the average value, it is estimated The amount of memory used in response to data request messages. Specifically, the average value corresponding to multiple target data is added, and the total memory usage obtained is the memory capacity occupied by the response data request message.
  • the unit data is aggregated to obtain universal standard unit data, so that the memory capacity occupied by the response data request message can be estimated by referring to the memory usage corresponding to the standard unit data, which is extremely The accuracy and efficiency of the estimation are greatly improved.
  • the remaining memory capacity is obtained to determine whether the memory capacity is greater than or equal to the remaining memory capacity; Filter out the target request message from the request message; generate a request message queue according to the target request message, and perform queuing operations on the request message queue.
  • the remaining memory capacity is the idle memory capacity of the terminal device, and the remaining memory capacity may be preset, or may be calculated by subtraction from the total memory capacity of the terminal device and the current memory capacity.
  • Filter out target request messages according to the memory capacity corresponding to each data request message for example, filter out a preset number of target request messages, or filter out target request messages with a memory capacity greater than the preset memory capacity, to reduce the processing pressure on terminal devices and avoid The software system is overloaded with processing.
  • the memory capacity is greater than or equal to the remaining memory capacity, it will exceed the data processing capability of the software system of the terminal device and easily cause the software system to crash. Therefore, multiple target request messages can be selected from multiple data request messages to form The request message queue and the queuing operation of the request message queue can reduce the data processing pressure of the software system and ensure the stability of the software system.
  • the method for estimating the memory usage obtains multiple standard unit data by acquiring multiple unit data and aggregates the multiple unit data; determines the memory usage corresponding to each standard unit data; obtains the pending Respond to the data request message, and determine the target data to be acquired according to the data request message; determine the standard unit data matching the target data from multiple standard unit data; according to the memory usage corresponding to the standard unit data matching the target data Quantity, to estimate the memory capacity occupied by responding to data request messages.
  • universal standard unit data can be obtained, so that the memory capacity corresponding to the standard unit data can be referred to, and the memory capacity occupied by the response data request message can be estimated, which can greatly improve the data request.
  • the memory footprint required by the message is estimated for accuracy.
  • FIG. 4 is a schematic flowchart of steps of another method for estimating memory usage provided by an embodiment of the present invention.
  • the memory usage estimation method includes steps S201 to S206.
  • Step S201 acquiring a plurality of unit data, and performing aggregation processing on the plurality of unit data to obtain a plurality of standard unit data.
  • Unit data can be business data of various base stations such as 5GNR, UMTS, and GSMNB IoT. Select multiple universal and representative unit data from multiple unit data as standard unit data, without calculating or processing all unit data, and improve the efficiency of memory capacity estimation.
  • Step S202 determining the memory usage corresponding to each standard unit data.
  • the standard unit data aggregated from the data is associated with the memory capacity occupied by the standard unit data, so that the memory capacity occupied by the target data corresponding to the data request message can be estimated according to the memory occupation corresponding to the standard unit data, Improve forecast accuracy.
  • the memory usage corresponding to the standard unit data can be obtained directly from the standard unit data, and the speed of direct acquisition is faster; it can also be measured by loading the standard unit data into the software system of the terminal device, and the measured The accuracy is higher.
  • Step S203 acquiring the data request message to be responded to, and determining the target data to be acquired according to the data request message.
  • the terminal device obtains multiple data request messages, and determines the target data corresponding to each data request message according to the multiple data request messages.
  • the target data can be unit data to be responded, so that based on the target data and standard unit data, the After the terminal device responds to the multiple data request messages, the memory capacity that the target data will occupy.
  • Step S204 determining standard unit data that matches the target data from a plurality of standard unit data.
  • the target data corresponding to each data request message is matched with a plurality of standard unit data, so as to determine the matching degree between each target data and each standard unit data;
  • Step S205 accumulating the memory usage corresponding to the standard unit data matching the target data to obtain the total memory usage.
  • the memory usage corresponding to the standard unit data matching multiple target data is accumulated to obtain the total memory usage, and the total memory usage is the memory capacity that will be occupied by the target data to be acquired.
  • each target data if there are multiple standard unit data matching each target data. Calculate the average value of memory usage corresponding to multiple standard unit data matching each target data, and the average value corresponds to the target data; accumulate the average values corresponding to multiple target data to obtain the total memory usage.
  • Step S206 according to the total memory usage, estimate the memory capacity occupied by the response data request message.
  • the memory capacity may be adjusted to obtain the memory capacity to be occupied by the response data request message.
  • the adjustment coefficient or the adjustment formula may be set according to the actual situation, which is not specifically limited in this embodiment.
  • the method for estimating the memory usage obtains multiple standard unit data by acquiring multiple unit data and aggregates the multiple unit data; determines the memory usage corresponding to each standard unit data; obtains the pending Response to the data request message, and determine the target data to be acquired according to the data request message; determine the standard unit data that matches the target data from multiple standard unit data; the memory usage corresponding to the standard unit data that matches the target data The amount is accumulated to obtain the total memory usage; according to the total memory usage, the memory capacity occupied by the response data request message is estimated.
  • FIG. 5 is a schematic block diagram of a terminal device provided by an embodiment of the present invention.
  • the terminal device 300 includes a processor 301 and a memory 302, and the processor 301 and the memory 302 are connected through a bus 303, such as an I2C (Inter-integrated Circuit) bus.
  • a bus 303 such as an I2C (Inter-integrated Circuit) bus.
  • the processor 301 is used to provide computing and control capabilities to support the operation of the entire terminal device.
  • the processor 301 can be a central processing unit (Central Processing Unit, CPU), and the processor 301 can also be other general processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC) ), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • the general-purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
  • the memory 302 may be a Flash chip, a read-only memory (ROM, Read-Only Memory) disk, an optical disk, a U disk, or a mobile hard disk.
  • FIG. 5 is only a block diagram of a partial structure related to the embodiment of the present invention, and does not constitute a limitation on the terminal equipment to which the embodiment of the present invention is applied.
  • the specific terminal Devices may include more or fewer components than shown in the figures, or combine certain components, or have a different arrangement of components.
  • the processor is configured to run a computer program stored in the memory, and implement any one of the methods for estimating memory usage provided by the embodiments of the present invention when executing the computer program.
  • the processor is configured to run a computer program stored in the memory, and implement the following steps when executing the computer program: acquiring multiple unit data, and performing aggregation processing on the multiple unit data, Obtain a plurality of standard unit data; determine the memory usage corresponding to each of the standard unit data; obtain a data request message to be responded to, and determine the target data to be acquired according to the data request message; from a plurality of the standard unit Determining the standard unit data matching the target data in the data; estimating the memory capacity occupied by responding to the data request message according to the memory usage corresponding to the standard unit data matching the target data.
  • the processor when the processor implements the aggregation process on the plurality of unit data to obtain a plurality of standard unit data, it is used to implement: clustering the plurality of unit data to obtain A plurality of unit data groups; performing aggregation processing on the plurality of unit data in the unit data groups to obtain standard unit data corresponding to the unit data groups.
  • the processor when the processor implements the clustering process on the plurality of unit data to obtain a plurality of unit data groups, it is used to implement: through a preset clustering algorithm, cluster the plurality of unit data The unit data is clustered to obtain a plurality of unit data groups; or the plurality of unit data are classified according to the data types of the plurality of unit data to obtain a plurality of unit data groups.
  • the processor when the processor implements the aggregation processing of multiple unit data in the unit data group to obtain the standard unit data corresponding to the unit data group, it is used to implement: sorting a plurality of unit data in the unit data group to obtain a unit data queue; according to the arrangement order of the plurality of unit data in the unit data queue, select at least one unit data from the unit data queue as standard unit data.
  • the processor when the processor implements the determination of the memory usage corresponding to each of the standard unit data, it is configured to: obtain the data amount of the standard unit data, and use the data amount as The memory usage corresponding to the standard unit data; or loading the standard unit data to obtain the memory usage corresponding to the standard unit data.
  • the processor when the processor implements the loading of the standard unit data to obtain the memory usage corresponding to the standard unit data, it is configured to: repeatedly load the standard unit data; When the total memory capacity occupied by the loaded standard unit data is greater than or equal to the preset capacity threshold, stop loading the standard unit data; according to the total memory capacity and the loading times of the standard unit data, calculate The memory usage corresponding to the standard unit data.
  • the processor when the processor estimates the memory capacity occupied by responding to the data request message according to the memory usage corresponding to the standard unit data matching the target data, it is used to implement : Accumulate the memory usage corresponding to the standard unit data matching the target data to obtain the total memory usage; estimate the memory capacity occupied by responding to the data request message according to the total memory usage.
  • the processor further uses Implementation: obtain the remaining capacity of the memory, and judge whether the memory capacity is greater than or equal to the remaining capacity of the memory; if the capacity of the memory is greater than or equal to the remaining capacity of the memory, then filter out the target request message from a plurality of the data request messages; according to The target request message generates a request message queue, and queues the request message queue.
  • An embodiment of the present invention also provides a storage medium for computer-readable storage, the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the following: The steps of any method for estimating memory usage provided by the embodiments of the present invention.
  • the storage medium may be an internal storage unit of the terminal device described in the foregoing embodiments, such as a hard disk or a memory of the terminal device.
  • the storage medium may also be an external storage device of the terminal device, such as a plug-in hard disk equipped on the terminal device, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, Flash card (Flash Card), etc.
  • the functional modules/units in the system, and the device can be implemented as software, firmware, hardware, and an appropriate combination thereof.
  • the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be composed of several physical components. Components cooperate to execute.
  • Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit .
  • Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media).
  • computer storage media includes both volatile and nonvolatile media implemented in any method or technology for storage of information, such as computer readable instructions, data structures, program modules, or other data. permanent, removable and non-removable media.
  • Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cartridges, tape, magnetic disk storage or other magnetic storage devices, or can Any other medium used to store desired information and which can be accessed by a computer.
  • communication media typically embodies computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media .

Abstract

Embodiments of the present invention relate to the field of data processing, and provide a memory occupation amount pre-estimation method and apparatus, and a storage medium. The method comprises: obtaining a plurality of pieces of unit data, and performing aggregation processing on the plurality of pieces of unit data to obtain a plurality of pieces of standard unit data; determining a memory occupation amount corresponding to each standard unit data; obtaining a data request message to be responded, and according to the data request message, determining target data to be obtained; determining, from the plurality of pieces of standard unit data, standard unit data matched with the target data; and according to the memory occupation amount corresponding to the standard unit data matched with the target data, pre-estimating an occupied memory capacity in response to the data request message.

Description

内存占用量预估方法、装置及存储介质Memory usage estimation method, device and storage medium 技术领域technical field
本发明涉及数据处理的技术领域,尤其涉及一种内存占用量预估方法、装置及存储介质。The present invention relates to the technical field of data processing, in particular to a memory usage estimation method, device and storage medium.
背景技术Background technique
在一些情况下,终端设备需要处理大量的数据请求消息,需要频繁的读写磁盘并执行相应的交互操作,这对软件系统的稳定运行及性能造成很大的挑战,容易导致终端设备超负荷运行。为避免终端设备超负荷,就需要对接收的数据请求消息将要占用的内存容量进行预估,并在预估后进行相应的后续处理。然而,不同数据请求消息所请求的业务数据的数据量不相同,终端设备对不同种类的业务数据的数据处理能力也不相同,因此相关技术对数据请求消息所需的内存资源进行预估的准确性不高。In some cases, terminal devices need to process a large number of data request messages, frequently read and write disks and perform corresponding interactive operations, which pose a great challenge to the stable operation and performance of the software system, and easily lead to overloaded operation of terminal devices . In order to avoid the overload of the terminal device, it is necessary to estimate the memory capacity to be occupied by the received data request message, and perform corresponding follow-up processing after the estimation. However, the amount of business data requested by different data request messages is different, and the data processing capabilities of terminal devices for different types of business data are also different. Therefore, it is accurate for related technologies to estimate the memory resources required by data request messages. Sex is not high.
发明内容Contents of the invention
本发明实施例提供一种内存占用量预估方法、装置及存储介质,旨在提高数据请求消息所需的内存占用量进行预估的准确性。Embodiments of the present invention provide a method, device, and storage medium for estimating memory usage, aiming at improving the accuracy of estimating the memory usage required by a data request message.
第一方面,本发明实施例提供一种内存占用量预估方法,包括:获取多个单元数据,并对所述多个单元数据进行聚合处理,得到多个标准单元数据;确定每个所述标准单元数据对应的内存占用量;获取待响应的数据请求消息,并根据所述数据请求消息确定待获取的目标数据;从多个所述标准单元数据中确定与所述目标数据相匹配的标准单元数据;根据与所述目标数据相匹配的标准单元数据对应的内存占用量,预估响应所述数据请求消息所占用的内存容量。In the first aspect, an embodiment of the present invention provides a method for estimating memory usage, including: acquiring a plurality of unit data, and performing aggregation processing on the plurality of unit data to obtain a plurality of standard unit data; determining each of the The memory usage corresponding to the standard unit data; obtaining the data request message to be responded to, and determining the target data to be obtained according to the data request message; determining the standard matching the target data from a plurality of the standard unit data Unit data: Estimate the memory capacity occupied by responding to the data request message according to the memory usage corresponding to the standard unit data matching the target data.
第二方面,本发明实施例还提供一种终端设备,所述终端设备包括处理器、存储器、存储在所述存储器上并可被所述处理器执行的计算机程序以及用于实现所述处理器和所述存储器之间的连接通信的数据总线,其中所述计算机程序被所述处理器执行时,实现如本发明实施例提供的任一项内存占用量预估方法的步骤。In the second aspect, an embodiment of the present invention further provides a terminal device, the terminal device includes a processor, a memory, a computer program stored on the memory and executable by the processor, and a computer program for implementing the processor A data bus communicating with the connection between the memories, wherein when the computer program is executed by the processor, the steps of any method for estimating memory usage provided by the embodiments of the present invention are realized.
第三方面,本发明实施例还提供一种存储介质,用于计算机可读存储,所述存储介质存储有一个或者多个程序,所述一个或者多个程序可被一个或者多个处理器执行,以实现如本发明实施例提供的任一项内存占用量预估方法的步骤。In the third aspect, the embodiment of the present invention also provides a storage medium for computer-readable storage, the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors , so as to realize the steps of any method for estimating memory usage provided by the embodiments of the present invention.
附图说明Description of drawings
图1为本发明实施例提供的一种内存占用量预估方法的步骤流程示意图;FIG. 1 is a schematic flowchart of steps of a method for estimating memory usage provided by an embodiment of the present invention;
图2为图1中的内存占用量预估方法的子步骤流程示意图;Fig. 2 is a schematic flow chart of the sub-steps of the memory usage estimation method in Fig. 1;
图3为实施本发明实施例提供的数据聚合的一场景示意图;FIG. 3 is a schematic diagram of a scene implementing data aggregation provided by an embodiment of the present invention;
图4为本发明实施例提供的另一种内存占用量预估方法的步骤流程示意图;FIG. 4 is a schematic flowchart of steps of another method for estimating memory usage provided by an embodiment of the present invention;
图5为本发明实施例提供的一种终端设备的结构示意框图。FIG. 5 is a schematic structural block diagram of a terminal device provided by an embodiment of the present invention.
具体实施方式Detailed ways
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present invention with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some of the embodiments of the present invention, but not all of them. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.
附图中所示的流程图仅是示例说明,不是必须包括所有的内容和操作/步骤,也不是必须按所描述的顺序执行。例如,有的操作/步骤还可以分解、组合或部分合并,因此实际执行的顺序有可能根据实际情况改变。The flow charts shown in the drawings are just illustrations, and do not necessarily include all contents and operations/steps, nor must they be performed in the order described. For example, some operations/steps can be decomposed, combined or partly combined, so the actual order of execution may be changed according to the actual situation.
应当理解,在此本发明说明书中所使用的术语仅仅是出于描述特定实施例的目的而并不意在限制本发明。如在本发明说明书和所附权利要求书中所使用的那样,除非上下文清楚地指明其它情况,否则单数形式的“一”、“一个”及“该”意在包括复数形式。It should be understood that the terminology used in the description of the present invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the present invention. As used in this specification and the appended claims, the singular forms "a", "an" and "the" are intended to include plural referents unless the context clearly dictates otherwise.
本发明实施例提供一种内存占用量预估方法、装置及存储介质。其中,该内存占用量预估方法可应用于终端设备中,该终端设备可以为手机、平板电脑、笔记本电脑、台式电脑、个人数字助理和穿戴式设备等电子设备。Embodiments of the present invention provide a memory usage estimation method, device and storage medium. Wherein, the method for estimating memory usage can be applied to terminal equipment, and the terminal equipment can be electronic equipment such as mobile phones, tablet computers, notebook computers, desktop computers, personal digital assistants, and wearable equipment.
在一些实施例中,终端设备可以为网管系统(Network Management System),该网管系统通过结合软件和硬件用来对网络状态进行调整的系统,以保障网络系统能够正常、高效运行,使网络系统中的资源得到更好的利用,是在网络管理平台的基础上实现各种网络管理功能的集合。In some embodiments, the terminal device can be a network management system (Network Management System), which is used to adjust the network status by combining software and hardware to ensure that the network system can run normally and efficiently, so that the network system can The resources are better utilized, which is to realize the collection of various network management functions on the basis of the network management platform.
下面结合附图,对本发明的一些实施方式作详细说明。在不冲突的情况下,下述的实施例及实施例中的特征可以相互组合。Some embodiments of the present invention will be described in detail below in conjunction with the accompanying drawings. In the case of no conflict, the following embodiments and features in the embodiments can be combined with each other.
请参照图1,图1为本发明实施例提供的一种内存占用量预估方法的步骤流程示意图。Please refer to FIG. 1 . FIG. 1 is a schematic flowchart of steps of a method for estimating memory usage provided by an embodiment of the present invention.
如图1所示,该内存占用量预估方法包括步骤S101至步骤S105。As shown in FIG. 1 , the memory usage estimation method includes steps S101 to S105.
步骤S101、获取多个单元数据,并对多个单元数据进行聚合处理,得到多个标准单元数据。Step S101 , acquiring a plurality of unit data, and performing aggregation processing on the plurality of unit data to obtain a plurality of standard unit data.
其中,单元数据为能被计算机接受和处理的各种描述事物属性的表示,包括整数、实数、字符、文字、表格、图形、图像和声音等。多个单元数据可以是网管系统中的全量数据。多个单元数据可以包括数据量不同、数量类型不同的单元数据,因此从多个单元数据中选取多个具备普适性和代表性的单元数据作为标准单元数据,有利于后续参照标准单元数据对数据请求消息所请求的目标数据所占用的内存容量进行预估的准确性和效率。Among them, the unit data is the representation of various attributes of things that can be accepted and processed by computers, including integers, real numbers, characters, text, tables, graphics, images, and sounds. Multiple unit data can be the full amount of data in the network management system. Multiple unit data can include unit data with different data volumes and types. Therefore, selecting multiple universal and representative unit data from multiple unit data as standard unit data is beneficial for subsequent reference to standard unit data. The accuracy and efficiency of estimating the memory capacity occupied by the target data requested by the data request message.
示例性的,在5G(5 th Generation,第五代)网管系统中,单元数据可以是5GNR(5G New Radio,5G新空口),UMTS(Universal Mobile Telecommunications System,通用移动通信系统),GSM(Global System for Mobile Communications,全球移动通信系统),LTE FDD(Long Term Evolution FDD,长期演进频分双工),NB IoT(Narrow Band Internet of Things,窄带物联网)等多种基站的至少一种业务数据。 Exemplarily, in the 5G ( 5th Generation, fifth generation) network management system, the unit data can be 5GNR (5G New Radio, 5G new air interface), UMTS (Universal Mobile Telecommunications System, universal mobile communication system), GSM (Global System for Mobile Communications, Global System for Mobile Communications), LTE FDD (Long Term Evolution FDD, Long Term Evolution Frequency Division Duplex), NB IoT (Narrow Band Internet of Things, Narrowband Internet of Things) and other base station at least one business data .
在一实施例中,如图2所示,对多个单元数据进行聚合处理,得到多个标准单元数据包括:子步骤S1011至子步骤S1012。In an embodiment, as shown in FIG. 2 , performing aggregation processing on a plurality of unit data to obtain a plurality of standard unit data includes: sub-step S1011 to sub-step S1012 .
子步骤S1011、对多个单元数据进行聚类处理,得到多个单元数据组。Sub-step S1011, performing clustering processing on multiple unit data to obtain multiple unit data groups.
需要说明的是,单元数据的数据量不相同,终端设备对不同种类的单元数据的数据处理能力也不相同,因此,对多个单元数据进行聚类处理,将数据量相近的单元数据、数据类型相同的单元数据进行聚合,得到多个单元数据组,单元数据组包括多个单元数据。It should be noted that the data volume of unit data is different, and the data processing capabilities of terminal equipment for different types of unit data are also different. Unit data of the same type are aggregated to obtain multiple unit data groups, and the unit data groups include multiple unit data.
在一实施例中,通过预设聚类算法,对多个单元数据进行聚类处理,得到多个单元数据组。其中,预设聚类算法包括但不限于K-MEANS聚类算法、均值偏移聚类算法、DBSCAN聚类算法、层次聚类算法和高斯混合模型聚类算法等。通过预设聚类算法对多个单元数据进行初次聚类,得到多个数据簇,并将每个数据簇中的多个单元数据作为一个单元数据组。In an embodiment, clustering processing is performed on multiple unit data by using a preset clustering algorithm to obtain multiple unit data groups. Among them, the preset clustering algorithm includes but not limited to K-MEANS clustering algorithm, mean shift clustering algorithm, DBSCAN clustering algorithm, hierarchical clustering algorithm and Gaussian mixture model clustering algorithm, etc. Multiple unit data are first clustered by a preset clustering algorithm to obtain multiple data clusters, and multiple unit data in each data cluster are used as a unit data group.
示例性的,通过预设的K-MEANS聚类算法对多个单元数据进行聚类处理,得到多个单元数据组。对于网管系统,多个单元数据为全网基站数据存储的记录数据,可选的根据基站种类和基站规格设置K值,例如K=基站种类的数量N1*基站规格的数量N2,该K值为单元数据组的分组数量。Exemplarily, multiple unit data groups are obtained by clustering the multiple unit data through the preset K-MEANS clustering algorithm. For the network management system, the data of multiple units is the record data stored in the base station data of the whole network. The K value can be set optionally according to the type of base station and the specification of the base station. For example, K=the number N1 of the type of base station*the number N2 of the specification of the base station. The value of K is The grouping number of cell data groups.
如图3所示,多个单元数据包括5GNR,GU,GSM,LTE,NB等多种基站的业务数据,在呈散状分布的多个单元数据中设置K个中心点(图3中的黑色阴影标记点),该K个中心点为虚拟点,计算多个单元数据与K个中心点之间的距离;选取最短距离对应的中心点归为一组,重新计算每组单元数据的中心点;执行根据多个单元数据与中心点之间的距离进行分组的过程,直到重新分组的结果与上次分组的结果一致时停止,多个单元数据就被分为K类,得到K个单元数据组,每个单元数据组中的多个单元数据之间的差异在一定范围内。As shown in Figure 3, multiple unit data include business data of various base stations such as 5GNR, GU, GSM, LTE, NB, etc. K central points (black in Figure 3 Shaded mark points), the K center points are virtual points, and the distance between multiple unit data and K center points is calculated; the center points corresponding to the shortest distance are selected as a group, and the center point of each group of unit data is recalculated ;Execute the process of grouping according to the distance between multiple unit data and the center point, and stop until the result of regrouping is consistent with the result of the last grouping, multiple unit data are divided into K categories, and K unit data are obtained group, the difference between multiple unit data in each unit data group is within a certain range.
需要说明的是,K-MEANS聚类算法的K值可以根据终端设备上的软件系统的实际情况进行设置,例如若终端设备上的软件系统为电商系统,则可以根据商品种类、商品价格等参照数据设置K值,本实施例对此不做具体限定。It should be noted that the K value of the K-MEANS clustering algorithm can be set according to the actual situation of the software system on the terminal device. The K value is set with reference to the data, which is not specifically limited in this embodiment.
在一实施例中,根据多个单元数据的数据类型,对多个单元数据进行分类,得到多个单元数据组。其中,单元数据携带有数据类型的标记信息,根据单元数据的数据类型可以准确的对多个单元数据进行分类,从而将数据类型相同的单元数据划分至一个单元数据组。In an embodiment, the plurality of unit data are classified according to the data types of the plurality of unit data to obtain a plurality of unit data groups. Wherein, the unit data carries the tag information of the data type, and multiple unit data can be accurately classified according to the data type of the unit data, so that the unit data of the same data type are divided into a unit data group.
在一实施例中,根据多个单元数据的数据类型和数据量,对多个单元数据进行分类,得到多个单元数据组。需要说明的是,根据多个单元数据的数据类型和数据量,对多个单元数据进行分类,从而将数据量相近的单元数据、数据类型相同的单元数据划分至一个单元数据组,得到多个单元数据组,有利于后续从单元数据组中确定标准单元数据,提高标准单元数据的普适性和代表性。In an embodiment, the multiple unit data are classified according to the data types and data volumes of the multiple unit data to obtain multiple unit data groups. It should be noted that, according to the data type and data volume of multiple unit data, multiple unit data are classified, so that unit data with similar data volume and unit data with the same data type are divided into one unit data group, and multiple unit data are obtained. The unit data group is beneficial to subsequently determine the standard unit data from the unit data group, and improve the universality and representativeness of the standard unit data.
子步骤S1012、对单元数据组中的多个单元数据进行聚合处理,以获取单元数据组对应的标准单元数据。Sub-step S1012, perform aggregation processing on multiple unit data in the unit data group, so as to obtain standard unit data corresponding to the unit data group.
对每个单元数据组中的多个单元数据进行二次聚合处理,以从每个单元数据组中的多个单元数据中选取至少一个单元数据作为标准单元数据。选取标准单元数据的过程也可以视为数据聚合的过程,在确定标准单元数据之后可以标记该标准单元数据,该标准单元数据在每个单元数据组中具备普适性和代表性,便于后续能够参照标准单元数据进行内存容量预估,提高预估的准确性,且无需对全部的单元数据进行计算或者处理,提高预估效率。A secondary aggregation process is performed on the plurality of unit data in each unit data group, so as to select at least one unit data from the plurality of unit data in each unit data group as standard unit data. The process of selecting standard unit data can also be regarded as the process of data aggregation. After the standard unit data is determined, the standard unit data can be marked. The standard unit data is universal and representative in each unit data group, which is convenient for subsequent The memory capacity is estimated with reference to the standard unit data, which improves the accuracy of the estimation, and does not need to calculate or process all the unit data, thereby improving the estimation efficiency.
在一实施例中,对单元数据组中的多个单元数据进行排序,得到单元数据队列;根据 单元数据队列中的多个单元数据的排列顺序,从单元数据队列中选取至少一个单元数据作为标准单元数据。其中,在每个单元数据组中对多个单元数据进行排序,并根据预先设置的分位数和多个单元数据的排列顺序,从排序的多个单元数据中选取标准单元数据,标准单元数据可以是一个或者多个。标准单元数据的数据结构不定,例如基站数据的数据结构为标准树状数据,小区数据为标准树状数据中的一个节点。In one embodiment, a plurality of unit data in the unit data group is sorted to obtain a unit data queue; according to the arrangement order of the plurality of unit data in the unit data queue, at least one unit data is selected from the unit data queue as a standard cell data. Among them, multiple unit data are sorted in each unit data group, and standard unit data is selected from the sorted multiple unit data according to the preset quantiles and the arrangement order of the multiple unit data, and the standard unit data Can be one or more. The data structure of the standard unit data is uncertain, for example, the data structure of the base station data is a standard tree data, and the cell data is a node in the standard tree data.
需要说明的是,分位数即分位点,用于将排序后的多个单元数据分为多个等份后的数值点,分位数例如为中位数,即50分位数,分位数能够根据单元数据的实际情况进行灵活设置。通过调整分位数大小从排序的多个单元数据中选取标准单元数据,能够提高标准单元数据的代表性。It should be noted that the quantile is the quantile point, which is used to divide the sorted multiple unit data into multiple equal parts. The quantile is, for example, the median, that is, the 50th quantile. The number of bits can be flexibly set according to the actual situation of the unit data. By adjusting the quantile size to select standard unit data from multiple sorted unit data, the representativeness of standard unit data can be improved.
在一实施例中,从预设的服务乐观度区间中选取目标服务乐观度;根据选取的目标服务乐观度确定对应的目标分位数;根据目标分位数,从排序后的多个单元数据中选取标准单元数据。其中,服务乐观度(Service optimism)用于表征软件系统允许误差的大小,服务乐观度与软件系统风险成正比,服务乐观度与分位数之间存在对应关系,服务乐观度可选的设置为1-100,与分位数100-1相对应,即服务乐观度越高,分位数越低,且软件系统的容忍误差越大,吞吐越大。目标服务乐观度可以由技术人员根据实际情况进行设置和选取,也可以通过多次实验调整后确定,通过服务乐观度能够较好的平衡本申请实施例对数据请求消息所需的内存容量进行预估的准确性和效率。In one embodiment, the target service optimism is selected from the preset service optimism range; the corresponding target quantile is determined according to the selected target service optimism; according to the target quantile, the sorted multiple unit data Select the standard cell data. Among them, service optimism is used to characterize the size of the allowable error of the software system. The service optimism is proportional to the risk of the software system. There is a corresponding relationship between the service optimism and the quantile. The optional setting of the service optimism is 1-100, corresponding to the quantile 100-1, that is, the higher the service optimism, the lower the quantile, and the greater the tolerance error of the software system, the greater the throughput. The target service optimism can be set and selected by technicians according to the actual situation, and can also be determined after multiple experiments and adjustments. The service optimism can better balance the memory capacity required by the data request message in the embodiment of this application. estimation accuracy and efficiency.
示例性的,由于终端设备的软件系统对系统稳定要求较高,服务乐观度较低,因此可以从1-100服务乐观度区间中选取目标服务乐观度10;根据目标服务乐观度10选择90分位的分位数作为目标分位数;从排序的多个单元数据中选取90分位的目标分位数对应的单元数据作为标准单元数据。Exemplarily, since the software system of the terminal device has high requirements on system stability and low service optimism, the target service optimism of 10 can be selected from the range of 1-100 service optimism; 90 points can be selected according to the target service optimism of 10 The quantile of the position is used as the target quantile; the unit data corresponding to the target quantile of the 90th quantile is selected from the sorted multiple unit data as the standard unit data.
在一实施例中,根据多个单元数据的业务特征数据,对单元数据组中的多个单元数据进行排序,得到单元数据队列。其中,单元数据可以包括业务特征数据,业务特征数据可以根据单元数据的实际情况进行灵活设置,例如,若单元数据为网管系统中的基站数据,则可以选择具备代表性的小区数量信息作为业务特征数据。例如,若软件系统为电商系统等,可以选取商品价格作为业务特征数据,本实施例对此不做具体限定。In an embodiment, the multiple unit data in the unit data group are sorted according to the service characteristic data of the multiple unit data to obtain the unit data queue. Among them, the unit data can include service feature data, and the service feature data can be flexibly set according to the actual situation of the unit data. For example, if the unit data is base station data in the network management system, representative cell number information can be selected as the service feature data. For example, if the software system is an e-commerce system, etc., commodity prices may be selected as service feature data, which is not specifically limited in this embodiment.
步骤S102、确定每个标准单元数据对应的内存占用量。Step S102, determining the memory usage corresponding to each standard unit data.
将数据聚合出的标准单元数据与标准单元数据占用的内存容量建立联系,例如建立标准单元数据和内存占用量之间的线性模型,从而能够根据标准单元数据对应的内存占用量,对数据请求消息对应的目标数据所占用的内存容量进行预估,提高预估准确性。Link the standard unit data aggregated from the data with the memory capacity occupied by the standard unit data, for example, establish a linear model between the standard unit data and the memory usage, so that the data request message can be sent according to the memory usage corresponding to the standard unit data The memory capacity occupied by the corresponding target data is estimated to improve the accuracy of the estimation.
在一实施例中,获取标准单元数据的数据量,并将数据量作为标准单元数据对应的内存占用量。其中,标准单元数据息包括数据量,将数据量作为标准单元数据对应的内存占用量,能够快速确定标准单元数据对应的内存占用量。In an embodiment, the data volume of the standard unit data is obtained, and the data volume is used as the memory usage corresponding to the standard unit data. Wherein, the standard unit data information includes a data amount, and the data amount is used as the memory usage corresponding to the standard unit data, so that the memory usage corresponding to the standard unit data can be quickly determined.
在一实施例中,载入标准单元数据,以获取标准单元数据对应的内存占用量。其中,将标准单元数据载入终端设备的软件系统,并根据标准单元数据载入之后内存容量的变化,确定标准单元数据对应的内存占用量,准确性更高。In one embodiment, the standard unit data is loaded to obtain the memory usage corresponding to the standard unit data. Among them, the standard unit data is loaded into the software system of the terminal device, and the memory usage corresponding to the standard unit data is determined according to the change of the memory capacity after the standard unit data is loaded, which is more accurate.
在一实施例中,载入标准单元数据,以获取标准单元数据对应的内存占用量,包括:重复载入标准单元数据;当载入的标准单元数据所占用的内存总容量大于或等于预设容量 阈值时,停止载入标准单元数据;根据内存总容量和标准单元数据的载入次数,计算标准单元数据对应的内存占用量。其中,预设容量阈值可以根据实际情况进行设置,例如预设容量阈值为终端设备的内存总容量的70%或者80%,通过重复载入同一标准单元数据,并根据标准单元数据的内存总容量和载入次数,计算一个标准单元数据对应的内存占用量,更加贴合实际情况,标准单元数据所占用的内存容量的测量准确性更高。In one embodiment, loading the standard unit data to obtain the memory usage corresponding to the standard unit data includes: repeatedly loading the standard unit data; when the total memory capacity occupied by the loaded standard unit data is greater than or equal to the preset When the capacity threshold is reached, stop loading the standard unit data; calculate the memory usage corresponding to the standard unit data according to the total memory capacity and the loading times of the standard unit data. Among them, the preset capacity threshold can be set according to the actual situation, for example, the preset capacity threshold is 70% or 80% of the total memory capacity of the terminal device, by repeatedly loading the same standard unit data, and according to the total memory capacity of the standard unit data Calculate the memory usage corresponding to a standard unit data based on the number of loading times, which is more in line with the actual situation, and the measurement accuracy of the memory capacity occupied by the standard unit data is higher.
步骤S103、获取待响应的数据请求消息,并根据数据请求消息确定待获取的目标数据。Step S103, acquiring the data request message to be responded to, and determining the target data to be acquired according to the data request message.
其中,数据请求消息可以是一个或者多个,数据请求消息包括数据增加的请求消息、数据查询的请求消息、数据修改的请求消息和数据删除的请求消息,示例性的,数据请求消息由请求行(request line)、请求头部(header)、空行和请求数据四个部分组成。根据数据请求消息确定待获取的目标数据,从而能够基于目标数据预估终端设备响应该数据请求消息之后,数据请求消息将会占用的内存容量。Among them, there may be one or more data request messages, and the data request messages include a request message for data addition, a request message for data query, a request message for data modification, and a request message for data deletion. (request line), request header (header), blank line and request data. The target data to be acquired is determined according to the data request message, so that the memory capacity that the data request message will occupy after the terminal device responds to the data request message can be estimated based on the target data.
示例性的,终端设备包括网管系统,网管系统能够接受多个基站发送的数据请求消息。终端设备在接收到多个待响应的数据请求消息时,确定每个数据请求消息对应的目标数据,目标数据根据数据请求消息所请求的标识信息确定,目标数据可以是一个或者多个。Exemplarily, the terminal device includes a network management system, and the network management system can accept data request messages sent by multiple base stations. When the terminal device receives multiple data request messages to be responded to, it determines the target data corresponding to each data request message. The target data is determined according to the identification information requested by the data request message. There may be one or more target data.
步骤S104、从多个标准单元数据中确定与目标数据相匹配的标准单元数据。Step S104 , determining standard unit data matching the target data from a plurality of standard unit data.
其中,标准单元数据作为具备代表性的单元数据,同样能够用于代表目标数据,因此需要确定与目标数据相匹配的标准单元数据,便于参照标准单元数据对应的内存占用量,评估目标数据对应的内存占用量。Among them, the standard unit data, as representative unit data, can also be used to represent the target data, so it is necessary to determine the standard unit data that matches the target data, so that it is convenient to refer to the memory usage corresponding to the standard unit data to evaluate the target data. memory footprint.
在一实施例中,根据目标数据的数据类型和数据量,从多个标准单元数据中选取至少一个标准单元数据作为与目标数据相匹配的标准单元数据。例如,根据目标数据的数据类型和数据量,计算目标数据与每个标准单元数据之间的匹配度,并选取最大匹配度对应的标准单元数据作为与目标数据相匹配的标准单元数据。需要说明的是,根据目标数据的数据类型和数据量,选取出数据量相近的、数据类型相同的至少一个标准单元数据,能够极大提高对数据请求消息所需的内存占用量进行预估的准确性。In an embodiment, according to the data type and data volume of the target data, at least one standard unit data is selected from a plurality of standard unit data as the standard unit data matching the target data. For example, according to the data type and data volume of the target data, the matching degree between the target data and each standard unit data is calculated, and the standard unit data corresponding to the maximum matching degree is selected as the standard unit data matching the target data. It should be noted that, according to the data type and data volume of the target data, selecting at least one standard unit data with a similar data volume and the same data type can greatly improve the estimation of the memory usage required by the data request message. accuracy.
在一实施例中,将目标数据加入至多个标准单元数据,得到目标数据集合;对目标数据集合进行聚类处理,得到目标数据的聚类信息;根据目标数据的聚类信息,确定与目标数据聚合在一组的标准单元数据作为与目标数据相匹配的标准单元数据。In one embodiment, the target data is added to a plurality of standard unit data to obtain a target data set; the target data set is clustered to obtain the clustering information of the target data; according to the clustering information of the target data, the target data is determined The standard unit data aggregated in one group is used as the standard unit data matching the target data.
示例性的,计算目标数据集合中的每个数据之间的距离,并根据多个距离对目标数据集合中的多个数据进行聚类;从目标数据的聚类信息中获取与目标数据距离最近的标准单元数据;将该距离最近的标准单元数据作为与目标数据相匹配的标准单元数据。Exemplarily, the distance between each data in the target data set is calculated, and multiple data in the target data set are clustered according to multiple distances; the closest distance to the target data is obtained from the clustering information of the target data The standard unit data of ; use the standard unit data with the closest distance as the standard unit data matching the target data.
步骤S105、根据与目标数据相匹配的标准单元数据对应的内存占用量,预估响应数据请求消息所占用的内存容量。Step S105 , estimating the memory capacity occupied by the response data request message according to the memory usage corresponding to the standard unit data matching the target data.
其中,目标数据可以是一个或者多个,与每个目标数据相匹配的标准单元数据也可以是一个或者多个。将与目标数据相匹配的多个标准单元数据对应的内存占用量相加,得到的内存占用总量即为响应数据请求消息所占用的内存容量。Wherein, there may be one or more target data, and one or more standard unit data matching each target data. The memory usage corresponding to multiple standard unit data matching the target data is added, and the total memory usage obtained is the memory capacity occupied by responding to the data request message.
在一实施例中,若与目标数据相匹配的标准单元数据为多个,则计算与目标数据相匹配的多个标准单元数据对应的内存占用量的平均值,并根据该平均值,预估作为响应数据 请求消息所占用的内存容量。具体的,将多个目标数据对应的平均值相加,得到的内存占用总量即为响应数据请求消息所占用的内存容量。相比于现有技术,通过对单元数据进行聚合处理,得到具备普适性的标准单元数据,从而能够参照标准单元数据对应的内存占用量,预估响应数据请求消息所占用的内存容量,极大提高了预估的准确性和效率。In one embodiment, if there are multiple standard unit data matching the target data, the average value of the memory usage corresponding to the multiple standard unit data matching the target data is calculated, and based on the average value, it is estimated The amount of memory used in response to data request messages. Specifically, the average value corresponding to multiple target data is added, and the total memory usage obtained is the memory capacity occupied by the response data request message. Compared with the existing technology, the unit data is aggregated to obtain universal standard unit data, so that the memory capacity occupied by the response data request message can be estimated by referring to the memory usage corresponding to the standard unit data, which is extremely The accuracy and efficiency of the estimation are greatly improved.
在一实施例中,预估响应数据请求消息所占用的内存容量之后,获取内存剩余容量,判断内存容量是否大于或等于内存剩余容量;若内存容量大于或等于内存剩余容量,则从多个数据请求消息中筛选出目标请求消息;根据目标请求消息生成请求消息队列,并对请求消息队列进行排队操作。其中,内存剩余容量为终端设备空闲的内存容量,内存剩余容量可以预先设置,也可以根据终端设备的内存总容量和当前内存容量进行减法计算得到。根据每个数据请求消息对应的内存容量筛选出目标请求消息,例如筛选出预设数量的目标请求消息,或者筛选出内存容量大于预设内存容量的目标请求消息,减轻终端设备的处理压力,避免软件系统超负荷处理。In one embodiment, after estimating the memory capacity occupied by the response data request message, the remaining memory capacity is obtained to determine whether the memory capacity is greater than or equal to the remaining memory capacity; Filter out the target request message from the request message; generate a request message queue according to the target request message, and perform queuing operations on the request message queue. Wherein, the remaining memory capacity is the idle memory capacity of the terminal device, and the remaining memory capacity may be preset, or may be calculated by subtraction from the total memory capacity of the terminal device and the current memory capacity. Filter out target request messages according to the memory capacity corresponding to each data request message, for example, filter out a preset number of target request messages, or filter out target request messages with a memory capacity greater than the preset memory capacity, to reduce the processing pressure on terminal devices and avoid The software system is overloaded with processing.
需要说明的是,若内存容量大于或等于内存剩余容量,会超出终端设备的软件系统的数据处理能力,容易造成软件系统崩溃,因此可以从多个数据请求消息中筛选出多个目标请求消息组成请求消息队列,并对请求消息队列进行排队操作,能够减轻软件系统的数据处理压力,保证软件系统的稳定性。It should be noted that if the memory capacity is greater than or equal to the remaining memory capacity, it will exceed the data processing capability of the software system of the terminal device and easily cause the software system to crash. Therefore, multiple target request messages can be selected from multiple data request messages to form The request message queue and the queuing operation of the request message queue can reduce the data processing pressure of the software system and ensure the stability of the software system.
上述实施例提供的内存占用量预估方法,通过获取多个单元数据,并对多个单元数据进行聚合处理,得到多个标准单元数据;确定每个标准单元数据对应的内存占用量;获取待响应的数据请求消息,并根据数据请求消息确定待获取的目标数据;从多个标准单元数据中确定与目标数据相匹配的标准单元数据;根据与目标数据相匹配的标准单元数据对应的内存占用量,预估响应数据请求消息所占用的内存容量。通过对单元数据进行聚合处理,得到具备普适性的标准单元数据,从而能够参照标准单元数据对应的内存占用量,预估响应数据请求消息所占用的内存容量,能够极大的提高对数据请求消息所需的内存占用量进行预估的准确性。The method for estimating the memory usage provided by the above embodiment obtains multiple standard unit data by acquiring multiple unit data and aggregates the multiple unit data; determines the memory usage corresponding to each standard unit data; obtains the pending Respond to the data request message, and determine the target data to be acquired according to the data request message; determine the standard unit data matching the target data from multiple standard unit data; according to the memory usage corresponding to the standard unit data matching the target data Quantity, to estimate the memory capacity occupied by responding to data request messages. Through the aggregation processing of unit data, universal standard unit data can be obtained, so that the memory capacity corresponding to the standard unit data can be referred to, and the memory capacity occupied by the response data request message can be estimated, which can greatly improve the data request. The memory footprint required by the message is estimated for accuracy.
请参照图4,图4为本发明实施例提供的另一种内存占用量预估方法的步骤流程示意图。Please refer to FIG. 4 , which is a schematic flowchart of steps of another method for estimating memory usage provided by an embodiment of the present invention.
如图4所示,该内存占用量预估方法包括步骤S201至S206。As shown in FIG. 4 , the memory usage estimation method includes steps S201 to S206.
步骤S201、获取多个单元数据,并对多个单元数据进行聚合处理,得到多个标准单元数据。Step S201, acquiring a plurality of unit data, and performing aggregation processing on the plurality of unit data to obtain a plurality of standard unit data.
其中,单元数据的数据量不相同,终端设备对不同种类的单元数据的数据处理能力也不相同,单元数据可以是5GNR,UMTS,GSMNB IoT等多种基站的业务数据。从多个单元数据中选取多个具备普适性和代表性的单元数据作为标准单元数据,无需对全部的单元数据进行计算或者处理,提高内存容量的预估效率。Among them, the data volume of unit data is different, and the data processing capabilities of terminal equipment for different types of unit data are also different. Unit data can be business data of various base stations such as 5GNR, UMTS, and GSMNB IoT. Select multiple universal and representative unit data from multiple unit data as standard unit data, without calculating or processing all unit data, and improve the efficiency of memory capacity estimation.
步骤S202、确定每个标准单元数据对应的内存占用量。Step S202, determining the memory usage corresponding to each standard unit data.
其中,将数据聚合出的标准单元数据与标准单元数据占用的内存容量建立联系,从而能够根据标准单元数据对应的内存占用量,对数据请求消息对应的目标数据所占用的内存容量进行预估,提高预估准确性。Among them, the standard unit data aggregated from the data is associated with the memory capacity occupied by the standard unit data, so that the memory capacity occupied by the target data corresponding to the data request message can be estimated according to the memory occupation corresponding to the standard unit data, Improve forecast accuracy.
需要说明的是,标准单元数据对应的内存占用量可以直接从标准单元数据中获取得到, 直接获取得到的速度较快;也可以将标准单元数据载入终端设备的软件系统进行测量得到,测量得到的准确度较高。It should be noted that the memory usage corresponding to the standard unit data can be obtained directly from the standard unit data, and the speed of direct acquisition is faster; it can also be measured by loading the standard unit data into the software system of the terminal device, and the measured The accuracy is higher.
步骤S203、获取待响应的数据请求消息,并根据数据请求消息确定待获取的目标数据。Step S203, acquiring the data request message to be responded to, and determining the target data to be acquired according to the data request message.
其中,终端设备获取多个数据请求消息,并根据多个数据请求消息确定各数据请求消息对应的目标数据,目标数据可以是待响应的单元数据,从而能够基于目标数据和标准单元数据,预估终端设备响应该多个数据请求消息之后,目标数据将会占用的内存容量。Wherein, the terminal device obtains multiple data request messages, and determines the target data corresponding to each data request message according to the multiple data request messages. The target data can be unit data to be responded, so that based on the target data and standard unit data, the After the terminal device responds to the multiple data request messages, the memory capacity that the target data will occupy.
步骤S204、从多个标准单元数据中确定与目标数据相匹配的标准单元数据。Step S204, determining standard unit data that matches the target data from a plurality of standard unit data.
在一实施例中,将每个数据请求消息对应的目标数据与多个标准单元数据进行匹配,从而确定每个目标数据与每个标准单元数据之间的匹配度;根据每个目标数据与每个标准单元数据之间的匹配度,从多个标准单元数据中确定每个目标数据相匹配的标准单元数据。便于参照标准单元数据对应的内存占用量,评估目标数据对应的内存占用量。In an embodiment, the target data corresponding to each data request message is matched with a plurality of standard unit data, so as to determine the matching degree between each target data and each standard unit data; The matching degree between the standard unit data, and determine the matching standard unit data for each target data from multiple standard unit data. It is convenient to evaluate the memory usage corresponding to the target data by referring to the memory usage corresponding to the standard unit data.
步骤S205、对与目标数据相匹配的标准单元数据对应的内存占用量进行累加,得到内存占用总量。Step S205, accumulating the memory usage corresponding to the standard unit data matching the target data to obtain the total memory usage.
将与多个目标数据相匹配的标准单元数据对应的内存占用量进行累加,得到内存占用总量,该内存占用总量为待获取的目标数据将占用的内存容量。The memory usage corresponding to the standard unit data matching multiple target data is accumulated to obtain the total memory usage, and the total memory usage is the memory capacity that will be occupied by the target data to be acquired.
在一实施例中,若与每个目标数据相匹配的标准单元数据为多个。计算每个目标数据相匹配的多个标准单元数据对应的内存占用量的平均值,平均值与目标数据相对应;将多个目标数据相对应的平均值进行累加,得到内存占用总量。In an embodiment, if there are multiple standard unit data matching each target data. Calculate the average value of memory usage corresponding to multiple standard unit data matching each target data, and the average value corresponds to the target data; accumulate the average values corresponding to multiple target data to obtain the total memory usage.
步骤S206、根据内存占用总量,预估响应数据请求消息所占用的内存容量。Step S206 , according to the total memory usage, estimate the memory capacity occupied by the response data request message.
在一实施例中,获取目标数据将占用的内存容量之后,可以对该内存容量进行调整,得到响应数据请求消息将占用的内存容量。其中,调整系数或者调整公式可以根据实际情况进行设置,本实施例对此不做具体限定。In an embodiment, after the memory capacity to be occupied by the target data is acquired, the memory capacity may be adjusted to obtain the memory capacity to be occupied by the response data request message. Wherein, the adjustment coefficient or the adjustment formula may be set according to the actual situation, which is not specifically limited in this embodiment.
上述实施例提供的内存占用量预估方法,通过获取多个单元数据,并对多个单元数据进行聚合处理,得到多个标准单元数据;确定每个标准单元数据对应的内存占用量;获取待响应的数据请求消息,并根据数据请求消息确定待获取的目标数据;从多个标准单元数据中确定与目标数据相匹配的标准单元数据;对与目标数据相匹配的标准单元数据对应的内存占用量进行累加,得到内存占用总量;根据内存占用总量,预估响应数据请求消息所占用的内存容量。通过对单元数据进行聚合处理,得到具备普适性的标准单元数据,从而能够参照标准单元数据对应的内存占用量,预估响应数据请求消息所占用的内存容量,能够极大的提高对数据请求消息所需的内存占用量进行预估的准确性。The method for estimating the memory usage provided by the above embodiment obtains multiple standard unit data by acquiring multiple unit data and aggregates the multiple unit data; determines the memory usage corresponding to each standard unit data; obtains the pending Response to the data request message, and determine the target data to be acquired according to the data request message; determine the standard unit data that matches the target data from multiple standard unit data; the memory usage corresponding to the standard unit data that matches the target data The amount is accumulated to obtain the total memory usage; according to the total memory usage, the memory capacity occupied by the response data request message is estimated. Through the aggregation processing of unit data, universal standard unit data can be obtained, so that the memory capacity corresponding to the standard unit data can be referred to, and the memory capacity occupied by the response data request message can be estimated, which can greatly improve the data request. The memory footprint required by the message is estimated for accuracy.
请参阅图5,图5为本发明实施例提供的一种终端设备的结构示意性框图。Referring to FIG. 5 , FIG. 5 is a schematic block diagram of a terminal device provided by an embodiment of the present invention.
如图5所示,终端设备300包括处理器301和存储器302,处理器301和存储器302通过总线303连接,该总线比如为I2C(Inter-integrated Circuit)总线。As shown in FIG. 5, the terminal device 300 includes a processor 301 and a memory 302, and the processor 301 and the memory 302 are connected through a bus 303, such as an I2C (Inter-integrated Circuit) bus.
具体地,处理器301用于提供计算和控制能力,支撑整个终端设备的运行。处理器301可以是中央处理单元(Central Processing Unit,CPU),该处理器301还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现场可编程门阵列(Field-Programmable Gate Array, FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。其中,通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。Specifically, the processor 301 is used to provide computing and control capabilities to support the operation of the entire terminal device. The processor 301 can be a central processing unit (Central Processing Unit, CPU), and the processor 301 can also be other general processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC) ), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Wherein, the general-purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
具体地,存储器302可以是Flash芯片、只读存储器(ROM,Read-Only Memory)磁盘、光盘、U盘或移动硬盘等。Specifically, the memory 302 may be a Flash chip, a read-only memory (ROM, Read-Only Memory) disk, an optical disk, a U disk, or a mobile hard disk.
本领域技术人员可以理解,图5中示出的结构,仅仅是与本发明实施例相关的部分结构的框图,并不构成对本发明实施例所应用于其上的终端设备的限定,具体的终端设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。Those skilled in the art can understand that the structure shown in Figure 5 is only a block diagram of a partial structure related to the embodiment of the present invention, and does not constitute a limitation on the terminal equipment to which the embodiment of the present invention is applied. The specific terminal Devices may include more or fewer components than shown in the figures, or combine certain components, or have a different arrangement of components.
其中,所述处理器用于运行存储在存储器中的计算机程序,并在执行所述计算机程序时实现本发明实施例提供的任意一种所述的内存占用量预估方法。Wherein, the processor is configured to run a computer program stored in the memory, and implement any one of the methods for estimating memory usage provided by the embodiments of the present invention when executing the computer program.
在一实施例中,所述处理器用于运行存储在存储器中的计算机程序,并在执行所述计算机程序时实现如下步骤:获取多个单元数据,并对所述多个单元数据进行聚合处理,得到多个标准单元数据;确定每个所述标准单元数据对应的内存占用量;获取待响应的数据请求消息,并根据所述数据请求消息确定待获取的目标数据;从多个所述标准单元数据中确定与所述目标数据相匹配的标准单元数据;根据与所述目标数据相匹配的标准单元数据对应的内存占用量,预估响应所述数据请求消息所占用的内存容量。In one embodiment, the processor is configured to run a computer program stored in the memory, and implement the following steps when executing the computer program: acquiring multiple unit data, and performing aggregation processing on the multiple unit data, Obtain a plurality of standard unit data; determine the memory usage corresponding to each of the standard unit data; obtain a data request message to be responded to, and determine the target data to be acquired according to the data request message; from a plurality of the standard unit Determining the standard unit data matching the target data in the data; estimating the memory capacity occupied by responding to the data request message according to the memory usage corresponding to the standard unit data matching the target data.
在一实施例中,所述处理器在实现所述对所述多个单元数据进行聚合处理,得到多个标准单元数据时,用于实现:对多个所述单元数据进行聚类处理,得到多个单元数据组;对所述单元数据组中的多个单元数据进行聚合处理,以获取所述单元数据组对应的标准单元数据。In an embodiment, when the processor implements the aggregation process on the plurality of unit data to obtain a plurality of standard unit data, it is used to implement: clustering the plurality of unit data to obtain A plurality of unit data groups; performing aggregation processing on the plurality of unit data in the unit data groups to obtain standard unit data corresponding to the unit data groups.
在一实施例中,所述处理器在实现所述对多个所述单元数据进行聚类处理,得到多个单元数据组时,用于实现:通过预设聚类算法,对多个所述单元数据进行聚类处理,得到多个单元数据组;或者根据多个所述单元数据的数据类型,对多个所述单元数据进行分类,得到多个单元数据组。In one embodiment, when the processor implements the clustering process on the plurality of unit data to obtain a plurality of unit data groups, it is used to implement: through a preset clustering algorithm, cluster the plurality of unit data The unit data is clustered to obtain a plurality of unit data groups; or the plurality of unit data are classified according to the data types of the plurality of unit data to obtain a plurality of unit data groups.
在一实施例中,所述处理器在实现所述对所述单元数据组中的多个单元数据进行聚合处理,以获取所述单元数据组对应的标准单元数据时,用于实现:对所述单元数据组中的多个所述单元数据进行排序,得到单元数据队列;根据所述单元数据队列中的多个所述单元数据的排列顺序,从所述单元数据队列中选取至少一个单元数据作为标准单元数据。In an embodiment, when the processor implements the aggregation processing of multiple unit data in the unit data group to obtain the standard unit data corresponding to the unit data group, it is used to implement: sorting a plurality of unit data in the unit data group to obtain a unit data queue; according to the arrangement order of the plurality of unit data in the unit data queue, select at least one unit data from the unit data queue as standard unit data.
在一实施例中,所述处理器在实现所述确定每个所述标准单元数据对应的内存占用量时,用于实现:获取所述标准单元数据的数据量,并将所述数据量作为所述标准单元数据对应的内存占用量;或者载入所述标准单元数据,以获取所述标准单元数据对应的内存占用量。In an embodiment, when the processor implements the determination of the memory usage corresponding to each of the standard unit data, it is configured to: obtain the data amount of the standard unit data, and use the data amount as The memory usage corresponding to the standard unit data; or loading the standard unit data to obtain the memory usage corresponding to the standard unit data.
在一实施例中,所述处理器在实现所述载入所述标准单元数据,以获取所述标准单元数据对应的内存占用量时,用于实现:重复载入所述标准单元数据;当载入的所述标准单元数据所占用的内存总容量大于或等于预设容量阈值时,停止载入所述标准单元数据;根据所述内存总容量和所述标准单元数据的载入次数,计算所述标准单元数据对应的内存占用量。In an embodiment, when the processor implements the loading of the standard unit data to obtain the memory usage corresponding to the standard unit data, it is configured to: repeatedly load the standard unit data; When the total memory capacity occupied by the loaded standard unit data is greater than or equal to the preset capacity threshold, stop loading the standard unit data; according to the total memory capacity and the loading times of the standard unit data, calculate The memory usage corresponding to the standard unit data.
在一实施例中,所述处理器在实现所述根据与所述目标数据相匹配的标准单元数据对应的内存占用量,预估响应所述数据请求消息所占用的内存容量时,用于实现:对与所述 目标数据相匹配的标准单元数据对应的内存占用量进行累加,得到内存占用总量;根据所述内存占用总量,预估响应所述数据请求消息所占用的内存容量。In an embodiment, when the processor estimates the memory capacity occupied by responding to the data request message according to the memory usage corresponding to the standard unit data matching the target data, it is used to implement : Accumulate the memory usage corresponding to the standard unit data matching the target data to obtain the total memory usage; estimate the memory capacity occupied by responding to the data request message according to the total memory usage.
在一实施例中,所述处理器在实现所述根据与所述目标数据相匹配的标准单元数据对应的内存占用量,预估响应所述数据请求消息所占用的内存容量之后,还用于实现:获取内存剩余容量,并判断所述内存容量是否大于或等于内存剩余容量;若所述内存容量大于或等于内存剩余容量,则从多个所述数据请求消息中筛选出目标请求消息;根据所述目标请求消息生成请求消息队列,并对所述请求消息队列进行排队操作。In an embodiment, after the processor implements the estimation of the memory capacity occupied by responding to the data request message according to the memory usage corresponding to the standard unit data matching the target data, the processor further uses Implementation: obtain the remaining capacity of the memory, and judge whether the memory capacity is greater than or equal to the remaining capacity of the memory; if the capacity of the memory is greater than or equal to the remaining capacity of the memory, then filter out the target request message from a plurality of the data request messages; according to The target request message generates a request message queue, and queues the request message queue.
需要说明的是,所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,上述描述的终端设备的具体工作过程,可以参考前述内存占用量预估方法实施例中的对应过程,在此不再赘述。It should be noted that those skilled in the art can clearly understand that for the convenience and brevity of the description, the specific working process of the terminal device described above can refer to the corresponding process in the aforementioned embodiment of the method for estimating memory usage. This will not be repeated here.
本发明实施例还提供一种存储介质,用于计算机可读存储,所述存储介质存储有一个或者多个程序,所述一个或者多个程序可被一个或者多个处理器执行,以实现如本发明实施例提供的任一项内存占用量预估方法的步骤。An embodiment of the present invention also provides a storage medium for computer-readable storage, the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the following: The steps of any method for estimating memory usage provided by the embodiments of the present invention.
其中,所述存储介质可以是前述实施例所述的终端设备的内部存储单元,例如所述终端设备的硬盘或内存。所述存储介质也可以是所述终端设备的外部存储设备,例如所述终端设备上配备的插接式硬盘,智能存储卡(Smart Media Card,SMC),安全数字(Secure Digital,SD)卡,闪存卡(Flash Card)等。Wherein, the storage medium may be an internal storage unit of the terminal device described in the foregoing embodiments, such as a hard disk or a memory of the terminal device. The storage medium may also be an external storage device of the terminal device, such as a plug-in hard disk equipped on the terminal device, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, Flash card (Flash Card), etc.
本领域普通技术人员可以理解,上文中所公开方法中的全部或某些步骤、系统、装置中的功能模块/单元可以被实施为软件、固件、硬件及其适当的组合。在硬件实施方式中,在以上描述中提及的功能模块/单元之间的划分不一定对应于物理组件的划分;例如,一个物理组件可以具有多个功能,或者一个功能或步骤可以由若干物理组件合作执行。某些物理组件或所有物理组件可以被实施为由处理器,如中央处理器、数字信号处理器或微处理器执行的软件,或者被实施为硬件,或者被实施为集成电路,如专用集成电路。这样的软件可以分布在计算机可读介质上,计算机可读介质可以包括计算机存储介质(或非暂时性介质)和通信介质(或暂时性介质)。如本领域普通技术人员公知的,术语计算机存储介质包括在用于存储信息(诸如计算机可读指令、数据结构、程序模块或其他数据)的任何方法或技术中实施的易失性和非易失性、可移除和不可移除介质。计算机存储介质包括但不限于RAM、ROM、EEPROM、闪存或其他存储器技术、CD-ROM、数字多功能盘(DVD)或其他光盘存储、磁盒、磁带、磁盘存储或其他磁存储装置、或者可以用于存储期望的信息并且可以被计算机访问的任何其他的介质。此外,本领域普通技术人员公知的是,通信介质通常包含计算机可读指令、数据结构、程序模块或者诸如载波或其他传输机制之类的调制数据信号中的其他数据,并且可包括任何信息递送介质。Those of ordinary skill in the art can understand that all or some of the steps in the methods disclosed above, the functional modules/units in the system, and the device can be implemented as software, firmware, hardware, and an appropriate combination thereof. In a hardware implementation, the division between functional modules/units mentioned in the above description does not necessarily correspond to the division of physical components; for example, one physical component may have multiple functions, or one function or step may be composed of several physical components. Components cooperate to execute. Some or all of the physical components may be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit . Such software may be distributed on computer readable media, which may include computer storage media (or non-transitory media) and communication media (or transitory media). As known to those of ordinary skill in the art, the term computer storage media includes both volatile and nonvolatile media implemented in any method or technology for storage of information, such as computer readable instructions, data structures, program modules, or other data. permanent, removable and non-removable media. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cartridges, tape, magnetic disk storage or other magnetic storage devices, or can Any other medium used to store desired information and which can be accessed by a computer. In addition, as is well known to those of ordinary skill in the art, communication media typically embodies computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media .
上述本发明实施例序号仅仅为了描述,不代表实施例的优劣。以上所述,仅为本发明的具体实施方式,但本发明的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本发明揭露的技术范围内,可轻易想到各种等效的修改或替换,这些修改或替换都应涵盖在本发明的保护范围之内。因此,本发明的保护范围应以权利要求的保护范围为准。The serial numbers of the above embodiments of the present invention are for description only, and do not represent the advantages and disadvantages of the embodiments. The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person familiar with the technical field can easily think of various equivalents within the technical scope disclosed in the present invention. Modifications or replacements shall all fall within the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims (10)

  1. 一种内存占用量预估方法,其中,包括:A method for estimating memory usage, including:
    获取多个单元数据,并对所述多个单元数据进行聚合处理,得到多个标准单元数据;Acquiring a plurality of unit data, and performing aggregation processing on the plurality of unit data to obtain a plurality of standard unit data;
    确定每个所述标准单元数据对应的内存占用量;determining the memory usage corresponding to each of the standard unit data;
    获取待响应的数据请求消息,并根据所述数据请求消息确定待获取的目标数据;Obtain the data request message to be responded to, and determine the target data to be obtained according to the data request message;
    从多个所述标准单元数据中确定与所述目标数据相匹配的标准单元数据;determining standard unit data matching the target data from a plurality of standard unit data;
    根据与所述目标数据相匹配的标准单元数据对应的内存占用量,预估响应所述数据请求消息所占用的内存容量。Estimating the memory capacity occupied by responding to the data request message according to the memory usage corresponding to the standard unit data matching the target data.
  2. 根据权利要求1所述的内存占用量预估方法,其中,所述对所述多个单元数据进行聚合处理,得到多个标准单元数据,包括:The method for estimating memory usage according to claim 1, wherein said aggregating said plurality of unit data to obtain a plurality of standard unit data comprises:
    对多个所述单元数据进行聚类处理,得到多个单元数据组;performing clustering processing on a plurality of unit data to obtain a plurality of unit data groups;
    对所述单元数据组中的多个单元数据进行聚合处理,以获取所述单元数据组对应的标准单元数据。Aggregating multiple unit data in the unit data group to obtain standard unit data corresponding to the unit data group.
  3. 根据权利要求2所述的内存占用量预估方法,其中,所述对多个所述单元数据进行聚类处理,得到多个单元数据组,包括:The method for estimating memory usage according to claim 2, wherein said performing clustering processing on a plurality of said unit data to obtain a plurality of unit data groups, comprising:
    通过预设聚类算法,对多个所述单元数据进行聚类处理,得到多个单元数据组;或者Perform clustering processing on a plurality of unit data through a preset clustering algorithm to obtain a plurality of unit data groups; or
    根据多个所述单元数据的数据类型,对多个所述单元数据进行分类,得到多个单元数据组。Classifying the plurality of unit data according to the data types of the plurality of unit data to obtain a plurality of unit data groups.
  4. 根据权利要求2所述的内存占用量预估方法,其中,所述对所述单元数据组中的多个单元数据进行聚合处理,以获取所述单元数据组对应的标准单元数据,包括:The method for estimating memory usage according to claim 2, wherein said aggregating a plurality of unit data in said unit data group to obtain standard unit data corresponding to said unit data group comprises:
    对所述单元数据组中的多个所述单元数据进行排序,得到单元数据队列;Sorting a plurality of unit data in the unit data group to obtain a unit data queue;
    根据所述单元数据队列中的多个所述单元数据的排列顺序,从所述单元数据队列中选取至少一个单元数据作为标准单元数据。Selecting at least one unit data from the unit data queue as standard unit data according to the arrangement sequence of the plurality of unit data in the unit data queue.
  5. 根据权利要求1-4中任一项所述的内存占用量预估方法,其中,所述确定每个所述标准单元数据对应的内存占用量,包括:The method for estimating memory usage according to any one of claims 1-4, wherein said determining the memory usage corresponding to each of said standard unit data includes:
    获取所述标准单元数据的数据量,并将所述数据量作为所述标准单元数据对应的内存占用量;或者Acquire the data volume of the standard unit data, and use the data volume as the memory usage corresponding to the standard unit data; or
    载入所述标准单元数据,以获取所述标准单元数据对应的内存占用量。Load the standard unit data to obtain the memory usage corresponding to the standard unit data.
  6. 根据权利要求5所述的内存占用量预估方法,其中,所述载入所述标准单元数据,以获取所述标准单元数据对应的内存占用量,包括:The memory usage estimation method according to claim 5, wherein said loading the standard unit data to obtain the memory usage corresponding to the standard unit data comprises:
    重复载入所述标准单元数据;Repeatedly loading the standard cell data;
    当载入的所述标准单元数据所占用的内存总容量大于或等于预设容量阈值时,停止载入所述标准单元数据;When the total memory capacity occupied by the loaded standard unit data is greater than or equal to a preset capacity threshold, stop loading the standard unit data;
    根据所述内存总容量和所述标准单元数据的载入次数,计算所述标准单元数据对应的内存占用量。Calculate the memory usage corresponding to the standard unit data according to the total memory capacity and the loading times of the standard unit data.
  7. 根据权利要求1-4中任一项所述的内存占用量预估方法,其中,所述根据与所述目标数据相匹配的标准单元数据对应的内存占用量,预估响应所述数据请求消息所占用的 内存容量,包括:The method for estimating memory usage according to any one of claims 1-4, wherein the estimated response to the data request message is based on the memory usage corresponding to the standard unit data matching the target data The amount of memory used, including:
    对与所述目标数据相匹配的标准单元数据对应的内存占用量进行累加,得到内存占用总量;Accumulate the memory usage corresponding to the standard unit data matching the target data to obtain the total memory usage;
    根据所述内存占用总量,预估响应所述数据请求消息所占用的内存容量。Estimate the memory capacity occupied by responding to the data request message according to the total memory usage.
  8. 根据权利要求1-4中任一项所述的内存占用量预估方法,其中,所述根据与所述目标数据相匹配的标准单元数据对应的内存占用量,预估响应所述数据请求消息所占用的内存容量之后,还包括:The method for estimating memory usage according to any one of claims 1-4, wherein the estimated response to the data request message is based on the memory usage corresponding to the standard unit data matching the target data After the amount of memory used, it also includes:
    获取内存剩余容量,并判断所述内存容量是否大于或等于内存剩余容量;Obtaining the remaining memory capacity, and judging whether the memory capacity is greater than or equal to the remaining memory capacity;
    若所述内存容量大于或等于内存剩余容量,则从多个所述数据请求消息中筛选出目标请求消息;If the memory capacity is greater than or equal to the remaining capacity of the memory, then filter out the target request message from a plurality of the data request messages;
    根据所述目标请求消息生成请求消息队列,并对所述请求消息队列进行排队操作。A request message queue is generated according to the target request message, and a queuing operation is performed on the request message queue.
  9. 一种终端设备,其中,所述终端设备包括处理器、存储器、存储在所述存储器上并可被所述处理器执行的计算机程序以及用于实现所述处理器和所述存储器之间的连接通信的数据总线,其中所述计算机程序被所述处理器执行时,实现如权利要求1至8中任一项所述的内存占用量预估方法的步骤。A terminal device, wherein the terminal device includes a processor, a memory, a computer program stored on the memory and executable by the processor, and a computer program for realizing the connection between the processor and the memory A data bus for communication, wherein when the computer program is executed by the processor, the steps of the memory usage estimation method according to any one of claims 1 to 8 are implemented.
  10. 一种存储介质,用于计算机可读存储,其中,所述存储介质存储有一个或者多个程序,所述一个或者多个程序可被一个或者多个处理器执行,以实现权利要求1至8中任一项所述的内存占用量预估方法的步骤。A storage medium for computer-readable storage, wherein the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement claims 1 to 8 The steps of any one of the method for estimating memory usage.
PCT/CN2022/119102 2021-09-30 2022-09-15 Memory occupation amount pre-estimation method and apparatus, and storage medium WO2023051270A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111166621.3 2021-09-30
CN202111166621.3A CN115904859A (en) 2021-09-30 2021-09-30 Memory occupancy estimation method and device and storage medium

Publications (1)

Publication Number Publication Date
WO2023051270A1 true WO2023051270A1 (en) 2023-04-06

Family

ID=85746879

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/119102 WO2023051270A1 (en) 2021-09-30 2022-09-15 Memory occupation amount pre-estimation method and apparatus, and storage medium

Country Status (2)

Country Link
CN (1) CN115904859A (en)
WO (1) WO2023051270A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110078106A1 (en) * 2009-09-30 2011-03-31 International Business Machines Corporation Method and system for it resources performance analysis
CN106502918A (en) * 2016-09-19 2017-03-15 上海华为技术有限公司 A kind of scheduling memory method and device
CN107391257A (en) * 2017-06-30 2017-11-24 北京奇虎科技有限公司 Predictor method, device and the server of memory size needed for business
CN110134738A (en) * 2019-05-21 2019-08-16 中国联合网络通信集团有限公司 Distributed memory system resource predictor method, device
CN113268243A (en) * 2021-05-11 2021-08-17 网易(杭州)网络有限公司 Memory prediction method and device, storage medium and electronic equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110078106A1 (en) * 2009-09-30 2011-03-31 International Business Machines Corporation Method and system for it resources performance analysis
CN106502918A (en) * 2016-09-19 2017-03-15 上海华为技术有限公司 A kind of scheduling memory method and device
CN107391257A (en) * 2017-06-30 2017-11-24 北京奇虎科技有限公司 Predictor method, device and the server of memory size needed for business
CN110134738A (en) * 2019-05-21 2019-08-16 中国联合网络通信集团有限公司 Distributed memory system resource predictor method, device
CN113268243A (en) * 2021-05-11 2021-08-17 网易(杭州)网络有限公司 Memory prediction method and device, storage medium and electronic equipment

Also Published As

Publication number Publication date
CN115904859A (en) 2023-04-04

Similar Documents

Publication Publication Date Title
CN107122369B (en) Service data processing method, device and system
US9009157B2 (en) Apparatus and method for processing a data stream
JP2015530666A (en) Data indexing method and apparatus
WO2019071959A1 (en) Channel addition method, application server, and computer readable storage medium
CN112328688B (en) Data storage method, device, computer equipment and storage medium
CN111507479A (en) Feature binning method, device, equipment and computer-readable storage medium
CN110335061B (en) Transaction mode portrait establishing method, device, medium and electronic equipment
WO2019119635A1 (en) Seed user development method, electronic device and computer-readable storage medium
WO2019056496A1 (en) Method for generating picture review probability interval and method for picture review determination
CN112308345A (en) Communication network load prediction method, device and server
WO2021218063A1 (en) Method and apparatus for assigning parameter with value on the basis of name mapping, and computer device
WO2023051270A1 (en) Memory occupation amount pre-estimation method and apparatus, and storage medium
CN112333291B (en) File retransmission prevention method
CN106850822B (en) Load balancing method, equipment and distributed system
CN111414395B (en) Data processing method, system and computer equipment
CN111221827B (en) Database table connection method and device based on graphic processor, computer equipment and storage medium
JP7098735B2 (en) Optimization of large-scale data analysis
US10983888B1 (en) System and method for generating dynamic sparse exponential histograms
CN111752734A (en) Abnormal data classification method, abnormal data analysis method, abnormal data classification device and abnormal data analysis device, and storage medium
CN115145587A (en) Product parameter checking method and device, electronic equipment and storage medium
CN114138622A (en) Service processing method, system, equipment and computer readable storage medium
WO2024060620A1 (en) Communication method, device and storage medium
CN117640541B (en) Cloud server resource allocation method, device, equipment and medium
CN114254599A (en) Form merging method, processing chip and electronic equipment
CN109344043A (en) A kind of method for analyzing performance and relevant apparatus

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22874657

Country of ref document: EP

Kind code of ref document: A1