Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Buffer array maintenance method, device, terminal and readable medium

A maintenance strategy and frequency technology, applied in the computer field, can solve the problems of large buffer array memory size, waste of system memory resources, buffer array overflow, etc., and achieve the effect of avoiding waste.

Active Publication Date: 2019-01-29
WUHAN DOUYU NETWORK TECH CO LTD
View PDF8 Cites 1 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

At this time, if the flow rate of the data stream changes greatly, the problem of system memory resource waste will occur due to the relatively large size of the buffer array memory, or the problem of buffer array overflow will occur due to the relatively small size of the buffer array memory, resulting in data stream buffer exception

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Buffer array maintenance method, device, terminal and readable medium
  • Buffer array maintenance method, device, terminal and readable medium
  • Buffer array maintenance method, device, terminal and readable medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0045] figure 1 It is a flow chart of a method for maintaining a buffer array provided by Embodiment 1 of the present invention. This embodiment is applicable to the maintenance of a buffer array. The method can be implemented by a terminal, specifically by software and / or hardware in the terminal. see figure 1 , the buffer array maintenance method includes the following steps:

[0046] S110. When the loop timer times out, sequentially scan the buffer array from the start position to the end position, and update the occupied value when the scan result is not empty.

[0047] Wherein, specifically, the Timer mTimer=new Timer () function can be called to build a cyclic timer; wherein, mTimer is the name of a cyclic timer, which can represent a cyclic timer, and the name of a cyclic timer is not limited to mTimer; wherein, a new one can be created by the new function A cyclic timer of type Timer. Wherein, the R&D personnel can set the period T of the loop timer according to the...

Embodiment 2

[0083] figure 2 It is a structural schematic diagram of a buffer array maintenance device provided in Embodiment 2 of the present invention, and this embodiment is applicable to buffer array maintenance.

[0084] see figure 2 , the buffer array maintenance device in this embodiment includes:

[0085] Occupancy value update module 210, for when the cycle timer overtime, scan the starting position to the end position of the buffer array sequentially, update the occupancy value when the scanning result is not empty;

[0086] The number of times update module 220 is used to determine the occupancy rate of the buffer array according to the occupancy value after the scan and the length of the buffer array, determine the state of the occupancy rate according to the numerical value of the occupancy rate, and determine the state of the occupancy rate according to the state of the occupancy rate and when the previous cycle timer expires. Occupancy status, update high occupancy times...

Embodiment 3

[0105] This embodiment provides a terminal that can be used for buffer array maintenance. image 3 It is a schematic structural diagram of a terminal provided in Embodiment 3 of the present invention. see image 3 , the terminal includes:

[0106] one or more processors 310;

[0107] memory 320, for storing one or more programs;

[0108] When the one or more programs are executed by the one or more processors 310, the one or more processors 310 implement the buffer array maintenance method as proposed in Embodiment 1.

[0109] image 3 Take a processor 310 as an example; the processor 310 and the memory 320 can be connected through a bus or in other ways, image 3 Take connection via bus as an example.

[0110] As a computer-readable storage medium, the memory 320 can be used to store software programs, computer-executable programs and modules, such as program instructions / modules corresponding to the buffer array maintenance method in the embodiment of the present inven...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The embodiment of the invention discloses a buffer array maintenance method, a device, a terminal and a readable medium, wherein, the method comprises the following steps: when the cycle timer expires, scanning the starting position to the ending position of the buffer array in turn, and updating the occupying value when the scanning result is not empty; determining the occupancy rate of the buffer array according to the occupancy value after scanning and the length of the buffer array, determining the occupancy rate state according to the occupancy rate value, and updating the high occupancyrate times and the low occupancy rate times according to the occupancy rate state and the timeout occupancy rate state of the previous cycle timer; determining the maintenance strategy of buffer arrayaccording to the high occupancy or low occupancy, and maintaining the buffer array according to the maintenance strategy. The embodiment of the invention provides a buffer array maintenance method, device, a terminal and a readable medium, which realizes the dynamic maintenance of the buffer array and avoids the waste of system memory resources while ensuring that the buffer array size meets therequirements.

Description

technical field [0001] The embodiments of the present invention relate to computer technology, and in particular to a buffer array maintenance method, device, terminal and readable medium. Background technique [0002] In the Android terminal, it is often necessary to open up a data stream buffer area (such as a buffer array) to buffer the data stream. Currently, developers often set the buffer array as an area of ​​fixed memory size. At this time, if the flow rate of the data stream changes greatly, the problem of system memory resource waste will occur due to the relatively large size of the buffer array memory, or the problem of buffer array overflow will occur due to the relatively small size of the buffer array memory, resulting in data Stream buffer exception. Contents of the invention [0003] In view of this, the embodiments of the present invention provide a buffer array maintenance method, device, terminal, and readable medium, which realize dynamic maintenance...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Applications(China)
IPC IPC(8): G06F9/50
CPCG06F9/5016
Inventor 张磊
Owner WUHAN DOUYU NETWORK TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products