Data updating and reading method, device and equipment and storage medium

A data update and data reading technology, applied in the field of data processing, can solve problems such as read-write conflicts, achieve the effect of avoiding read-write conflicts and improving program performance

Active Publication Date: 2019-07-05
BIGO TECH PTE LTD
View PDF11 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004]However, there are at least the following problems in the prior art: reading and writing conflicts may still occur in the way of delayed update, the reason is that there is no read and write within the delay threshold The thread reads the data block currently being read, and when the write thread updates the data block currently being read, since the read pointer obtained by the read thread still points to the data block currently being read, Therefore, the data block described in the read operation performed by the read thread on the data block is exactly the data block currently being read, resulting in a read-write conflict
Therefore, the delayed update method cannot fundamentally avoid read and write conflicts

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
  • Data updating and reading method, device and equipment and storage medium
  • Data updating and reading method, device and equipment and storage medium
  • Data updating and reading method, device and equipment and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment

[0044] During the running of the program in the computer device, application scenarios of concurrent reading and writing of data are often encountered, for example, such as updating gift configurations. Among them, the updated gift configuration can appear on the live broadcast platform, and is used to provide gifts to users, so that users can send gifts to anchors according to actual conditions. Such as figure 1 As shown in FIG. 1 , a schematic diagram of a display interface of a live broadcast platform is given. Among them, the anchor is live broadcasting about outdoor content. For users who watch the live broadcast content performed by the anchor, if they are satisfied with the live broadcast content, they can express themselves by sending gifts to the anchor and interact with the anchor. Specifically, it can be as figure 2 As shown, by triggering the gift control on the display interface to enter such as image 3 As shown in the gift selection interface, the gift selec...

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 data updating and reading method, device and equipment and a storage medium. The method comprises the steps that a writing thread determines a first data block currently pointed by a reading pointer and a second data block not pointed by the reading pointer; the writing thread updates the data in the second data block and modifies the current direction of the reading pointer to point to the second data block; and if the thread lock state of the reading thread used for reading the first data block is not locked, the writing thread updates the data inthe first data block. According to the embodiment of the invention, if the thread lock state of the reading thread used for reading the first data block is non-locked, there is not the reading threadto read the first data block, and on the condition, the writing thread just updates the first data block, so that the read-write conflicts existing in double buffering are avoided, and the program running performance is improved.

Description

technical field [0001] Embodiments of the present invention relate to data processing technologies, and in particular, to a method, device, device, and storage medium for updating and reading data. Background technique [0002] During the running of the program in the computer equipment, the situation of concurrent reading and writing of data is often encountered, wherein the read data refers to the read operation performed by the read thread, and the write data refers to the write operation performed by the write thread (that is, the update operation). ), concurrent reading and writing data refers to performing read and write operations on the same data block at the same time. When reading and writing data concurrently, in order to ensure normal reading and writing of data, the existing technology usually adopts double buffering method for processing. Specifically: there are two data blocks in the double buffering, and the reading thread loads a common read pointer, and the...

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): G06F3/06
CPCG06F3/0614G06F3/064
Inventor 张浩
Owner BIGO TECH PTE LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products