CN115705326A - Real-time data storage method and device and terminal equipment - Google Patents

Real-time data storage method and device and terminal equipment Download PDF

Info

Publication number
CN115705326A
CN115705326A CN202110885088.XA CN202110885088A CN115705326A CN 115705326 A CN115705326 A CN 115705326A CN 202110885088 A CN202110885088 A CN 202110885088A CN 115705326 A CN115705326 A CN 115705326A
Authority
CN
China
Prior art keywords
target
terminal
data
real
storage sequence
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110885088.XA
Other languages
Chinese (zh)
Inventor
文强
张宏利
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Duodian Life Chengdu Technology Co ltd
Original Assignee
Duodian Life Chengdu Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Duodian Life Chengdu Technology Co ltd filed Critical Duodian Life Chengdu Technology Co ltd
Priority to CN202110885088.XA priority Critical patent/CN115705326A/en
Publication of CN115705326A publication Critical patent/CN115705326A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the disclosure discloses a real-time data storage method, a real-time data storage device and terminal equipment. One embodiment of the method comprises: receiving target real-time data sent by target terminal equipment; generating a target key value; acquiring a target water level line from a predetermined water level line record table; responding to the fact that the target real-time data are larger than the target waterline, and sending the target key value and the target real-time data to a first terminal; receiving a target data pair storage sequence sent back by a first terminal; and sending the target data pair storage sequence to a second terminal, wherein the second terminal displays the target data pair storage sequence. According to the embodiment, the real-time data are respectively stored in the execution main body and the first terminal, and the size of the target data pair storage sequence stored in the first terminal is controlled by using the target water level, so that the generation and display efficiency of the target data pair storage sequence is improved, and meanwhile, the disaster tolerance and the stability of the real-time data storage are improved.

Description

Real-time data storage method and device and terminal equipment
Technical Field
The embodiment of the disclosure relates to the technical field of computers, in particular to a real-time data storage method, a real-time data storage device and a terminal device.
Background
With the continuous development of big data technology, the internet industry has now entered the big data era. There will be a need scenario for each group of the largest N-record (Top-N) problems in both off-line and real-time calculations, where N is the data count. The Top-N problem is that data are arranged in a reverse order or a forward order according to a certain index, N data are taken, and subsequent special research and utilization are carried out on the N data. Real-time data processing is an important application scene of big data processing, a data source is real-time and uninterrupted, and the response time of a user is required to be real-time. Therefore, the Top-N problem of real-time data has high requirements on the real-time performance and accuracy of the data.
However, in the process of real-time Top-N problem processing and storage, the following technical problems often exist:
first, the prior art has very low efficiency of generating and querying in high concurrency due to large amount of data accumulated in real time when dealing with the Top-N problem of real-time data, and has a risk of data loss.
Second, in order to improve Top-N data processing and storage efficiency, the prior art uses a memory type database for storage. However, the memory type database has high storage cost, a complex and slow data recovery process, and limited storage capacity, and cannot meet the requirements of processing and storing large-scale real-time data Top-N.
Disclosure of Invention
This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the detailed description. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
Some embodiments of the present disclosure propose a real-time data storage method, apparatus and terminal device, to solve one or more of the technical problems mentioned in the above background.
In a first aspect, some embodiments of the present disclosure provide a real-time data storage method, including: receiving target real-time data sent by target terminal equipment; generating a target key value according to the target real-time data and a predetermined historical data pair set; acquiring a target water level line from a predetermined water level line record table; responding to the fact that the target real-time data are larger than the target waterline, and sending the target key value and the target real-time data to a first terminal; receiving a target data pair storage sequence sent back by a first terminal, wherein the first terminal generates the target data pair storage sequence according to a target key value and target real-time data, and the target data pair storage sequence comprises a first number of target data pairs; and sending the target data pair storage sequence to a second terminal, wherein the second terminal displays the target data pair storage sequence.
In a second aspect, some embodiments of the present disclosure provide a real-time data storage apparatus, the apparatus comprising: a first receiving unit configured to receive target real-time data sent by a target terminal device; the generating unit is configured to generate a target key value according to the target real-time data and a predetermined historical data pair set; an acquisition unit configured to acquire a target water level line from a predetermined water level line record table; a first sending unit configured to send the target key value and the target real-time data to the first terminal in response to the target real-time data being greater than the target waterline; the second receiving unit is configured to receive a target data pair storage sequence sent back by the first terminal, wherein the first terminal generates the target data pair storage sequence according to the target key value and the target real-time data, and the target data pair storage sequence comprises a first number of target data pairs; a second transmitting unit configured to transmit the target data pair storage sequence to a second terminal, wherein the second terminal displays the target data pair storage sequence.
In a third aspect, some embodiments of the present disclosure provide a terminal device, including: one or more processors; a storage device having one or more programs stored thereon which, when executed by one or more processors, cause the one or more processors to implement a method as in any one of the first aspects.
The above embodiments of the present disclosure have the following beneficial effects: the real-time data storage method can store the real-time data in the execution main body and the first terminal respectively, and the size of the target data pair storage sequence stored in the first terminal is controlled by using the target water level line, so that the efficiency of generating and displaying the target data pair storage sequence is improved, and meanwhile, the disaster tolerance and the stability of real-time data storage are improved. Specifically, the inventors found that the reasons for the current low efficiency and poor stability of real-time data storage resources are: in the prior art, when the problem of real-time data Top-N is processed, because the real-time accumulated data volume is large, the generating and querying efficiency under the condition of high concurrency is very low, and the risk of data loss exists. Based on this, first, some embodiments of the present disclosure receive target real-time data sent by a target terminal device. And secondly, generating a target key value according to the target real-time data and a predetermined historical data pair set. And thirdly, acquiring the target water level line from a predetermined water level line record table. Then, responding to the fact that the target real-time data is larger than the target water level line, sending the target key value and the target real-time data to the first terminal, and receiving the target data pair storage sequence sent back by the first terminal. The first terminal generates a target data pair storage sequence according to the target key value and the target real-time data, wherein the target data pair storage sequence comprises a first number of target data pairs. And finally, sending the target data pair storage sequence to a second terminal. And the second terminal displays the target data pair storage sequence. The method stores the real-time data in the execution main body and the first terminal, respectively. Meanwhile, the data volume sent to the first terminal is controlled according to the target water line, and Top-N real-time data are stored in the first terminal. The first terminal can be a memory type database so as to meet the requirement of rapid data processing, the execution main body can be a key value database so as to have low storage cost and large storage capacity so as to meet the speed requirement of real-time Top-N data processing and storage, improve the disaster recovery backup level of real-time data and improve the stability of real-time data storage.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and features are not necessarily drawn to scale.
FIG. 1 is an architectural diagram of an exemplary system in which some embodiments of the present disclosure may be applied;
FIG. 2 is a flow diagram of some embodiments of a real-time data storage method according to the present disclosure;
FIG. 3 is a flow diagram of some embodiments of a real-time data storage device according to the present disclosure;
fig. 4 is a schematic block diagram of a terminal device suitable for use in implementing some embodiments of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be noted that, for convenience of description, only the portions related to the present invention are shown in the drawings. The embodiments and features of the embodiments in the present disclosure may be combined with each other without conflict.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
Fig. 1 illustrates an exemplary system architecture 100 to which embodiments of the real-time data storage method of the present disclosure may be applied.
As shown in fig. 1, the system architecture 100 may include terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
The user may use the terminal devices 101, 102, 103 to interact with the server 105 via the network 104 to receive or send messages or the like. The terminal devices 101, 102, 103 may have installed thereon various communication client applications, such as an information processing application, a data storage application, a data analysis application, and the like.
The terminal apparatuses 101, 102, and 103 may be hardware or software. When the terminal devices 101, 102, 103 are hardware, they may be various terminal devices having a display screen, including but not limited to smart phones, tablet computers, laptop portable computers, desktop computers, and the like. When the terminal apparatuses 101, 102, 103 are software, they can be installed in the above-listed terminal apparatuses. It may be implemented as multiple software or software modules (e.g., to provide targeted real-time data input, etc.), or as a single software or software module. And is not particularly limited herein.
The server 105 may be a server that provides various services, such as a server that stores target real-time data input by the terminal apparatuses 101, 102, 103, and the like. The server can process the received target real-time data and feed back the processing result (such as the target data to the storage sequence) to the terminal equipment.
It should be noted that the real-time data storage method provided by the embodiment of the present disclosure may be executed by the server 105, or may also be executed by the terminal device.
It should be noted that the local of the server 105 may also directly store the target real-time data, and the server 105 may directly extract the local target real-time data and obtain the target data pair storage sequence after processing, in this case, the exemplary system architecture 100 may not include the terminal devices 101, 102, 103 and the network 104.
It should be noted that the terminal devices 101, 102, and 103 may also have a real-time data storage application installed therein, and in this case, the processing method may also be executed by the terminal devices 101, 102, and 103. At this point, the exemplary system architecture 100 may also not include the server 105 and the network 104.
The server 105 may be hardware or software. When the server 105 is hardware, it may be implemented as a distributed server cluster composed of a plurality of servers, or may be implemented as a single server. When the server is software, it may be implemented as a plurality of software or software modules (for example, to provide a real-time data storage service), or as a single software or software module. And is not particularly limited herein.
It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation.
With continued reference to fig. 2, a flow 200 of some embodiments of a real-time data storage method according to the present disclosure is shown. The real-time data storage method comprises the following steps:
step 201, receiving target real-time data sent by a target terminal device.
In some embodiments, the executing entity (e.g., the server shown in fig. 1) of the real-time data storage method receives the target real-time data from the target terminal device. The target terminal device may be a "mobile phone" or a "computer". The target terminal device stores a message set in advance. In particular, the target real-time data may be real-time data characterizing the amount of items in the retail store.
Step 202, generating a target key value according to the target real-time data and a predetermined historical data pair set.
In some embodiments, the execution subject generates the target key value according to the target real-time data and a predetermined historical data pair set. Wherein the predetermined set of historical data pairs stores a second number of entries of historical data pairs. The historical data pair is a data pair consisting of the historical data and the key values of the historical data. In particular, a predetermined set of historical data pairs may be stored in a key-value store. The historical data may be data characterizing the amount of items in the retail store collected from historical conditions. The key values of the historical data may be key values stored by the historical data in a key-value store. Optionally, the target real-time data is stored in a predetermined historical data pair set to obtain the target key value. The target key value is a key value representing the centralized storage position of the target real-time data in a predetermined historical data pair. Specifically, the target real-time data is stored in the key value database, and a unique target key value corresponding to the target real-time data can be obtained. In particular, a key-value store is a non-relational store that uses a simple key-value approach to storing data. The key value database takes key values as unique identifiers, and can uniquely characterize corresponding data.
Step 203, obtain the target water level line from the predetermined water level line record table.
In some embodiments, the execution subject obtains the target water level line from a predetermined water level line record table. In particular, the water line may be used to determine the storage location of historical data pairs that are stored centrally for historical data pairs. Specifically, a third number of water lines are recorded in a predetermined water line recording table. The target water line may be the value of the nth bit in the water line table corresponding to the value of N in the Top-N problem. Specifically, N may be the amount of data ultimately obtained in the ordering problem.
And step 204, responding to the target real-time data being larger than the target waterline, and sending the target key value and the target real-time data to the first terminal.
In some embodiments, the execution subject sends the target key value and the target real-time data to the first terminal in response to the target real-time data being greater than the target waterline. The first terminal is used for storing the terminal history data pair storage sequence. The terminal history data pair storage sequence includes a first number of terminal history data pairs, which are data pairs consisting of terminal key values and terminal history data. Specifically, the first terminal may be a memory type database. Specifically, the first terminal may be a remote dictionary service (Redis). Redis is an open-source, log-type, key-value database written in ANSI C language, supporting network, based on memory, and persistent. The first terminal has a first number of terminal history data pairs stored therein. Specifically, the first number may be N in the Top-N problem. Specifically, the terminal history data pair storage sequence stored in the first terminal may be a sorting result already obtained in the Top-N problem. Specifically, redis is used to store the sorted Top-N data. Specifically, the execution body is configured to store a full amount of real-time data, i.e., a predetermined set of historical data pairs. Specifically, the execution subject may be a Hadoop database (Hbase), and the execution subject may also be an elastic search (elastic search) database.
Optionally, the terminal history data pair storage sequence sent back by the first terminal is received in response to the target real-time data not being greater than the target water line. And determining the terminal historical data pair storage sequence as a target data pair storage sequence. And sending the target data pair storage sequence to the second terminal. And the second terminal displays the target data pair storage sequence. Specifically, in response to the target real-time data not being greater than the target waterline, the values characterizing the target real-time data are all less than the terminal historical data values of the terminal historical data pairs in the terminal historical data pair storage sequence. In particular, the target real-time data may be a price of the item. And if the target real-time data is not larger than the target water level line, the price of the target real-time data is lower than the price of the terminal historical data on the articles in the storage sequence. The terminal history data pair stored in the first terminal stores a sequence of price data for a first number of items ranked in price. And determining the terminal history data pair storage sequence as a target data pair storage sequence.
Optional contents in the above steps 203-204 are: the technical method that the execution main body and the first terminal are simultaneously adopted to respectively store the real-time data is taken as an invention point of the embodiment of the disclosure, and the technical problems mentioned in the background technology are solved. However, the memory type database has high storage cost, a complex and slow data recovery process, and limited storage capacity, and cannot meet the requirements of processing and storing large-scale real-time data Top-N. ". Factors that result in slow recovery and failure to meet storage requirements for large-scale real-time data processing are often as follows: the limited storage capacity of the memory type database and the complex process of data disaster recovery affect the reliability and storage capacity of processing and storing real-time Top-N data in the memory type database. If the above factors are solved, the effect of improving the reliability and storage capacity of the real-time Top-N data can be achieved. To achieve this, the present disclosure proposes a method that can store real-time data separately. First, the full amount of real-time data is stored in the general key value database. Next, the Top-N data is stored with the first terminal. Wherein, the first terminal is Redis. Then, the water line is used to control the Top-N data into Redis. Redis does not store the full amount of data and is therefore not limited by storage capacity. In addition, the Redis processing speed is high, and the Top-N generation requirement of real-time data can be met. The method stores the total data to be sorted and the TopN data in different resources to improve the resource utilization rate. The waterline can exclude most of the data behind the row, the complexity of program processing logic is reduced, the query efficiency cannot be reduced due to the increase of data volume, resources occupied by program operation cannot be obviously increased under the condition of large data volume, and the technical problem two is solved.
Step 205, receiving the target data pair storage sequence sent back by the first terminal.
In some embodiments, the execution body receives a target data pair storage sequence sent back by the first terminal. The first terminal generates a target data pair storage sequence according to the target key value and the target real-time data, wherein the target data pair storage sequence comprises a first number of target data pairs. Specifically, the first number is the value of N in the Top-N problem.
Optionally, the first terminal stores the target key value and the target real-time data as a target data pair. The first terminal determines the target real-time data as an updated cumulative value. In response to the update accumulation value being greater than a predetermined control threshold, the first terminal generates a target data pair storage sequence from the update accumulation value and the target data pair. In particular, the predetermined control threshold may characterize the maximum number stored in TopN in Redis. In response to the update accumulation value being greater than the predetermined control threshold, characterizing that the sorted data in Redis reaches the predetermined control threshold, an update of the target waterline will be triggered. Specifically, the predetermined control threshold may be N plus 50.
Optionally, the first terminal determines a first number of terminal history data pairs in the terminal history data pair storage sequence as target history data pairs. For each terminal history data pair in the terminal history data pair storage sequence, in response to the terminal history data in the terminal history data pair being less than the target history data in the target history data pair, the first terminal deletes the terminal history data pair to update the terminal history data pair storage sequence. The first terminal sends target history data back to the execution body, wherein the execution body updates a predetermined water level line record table by using the target history data. The first terminal adds the target data pair to the terminal history data pair storage sequence. And the first terminal sorts the storage sequence of the terminal historical data pair from large to small according to the value of the terminal historical data so as to update the storage sequence of the terminal historical data pair. The first terminal determines a terminal history data pair storage sequence as a target data pair storage sequence.
In response to the update accumulated value not being greater than the predetermined control threshold, the first terminal adds the target data pair to the terminal history data pair storage sequence. And the first terminal sorts the storage sequence of the terminal historical data pair from large to small according to the value of the terminal historical data so as to update the storage sequence of the terminal historical data pair. The first terminal determines a terminal history data pair storage sequence as a target data pair storage sequence.
Step 206, the target data pair storage sequence is sent to the second terminal.
In some embodiments, the execution agent sends the stored sequence of target data pairs to the second terminal. And the target terminal equipment displays the target data pair storage sequence for the user to view and call. Specifically, the target data pair storage sequence may be a ranking list of articles in a retail store, and the ranking condition of the articles may be displayed to the user by using the second terminal.
One embodiment presented in fig. 2 has the following beneficial effects: receiving target real-time data sent by target terminal equipment; generating a target key value; acquiring a target water level line from a predetermined water level line record table; responding to the fact that the target real-time data are larger than the target waterline, and sending the target key value and the target real-time data to a first terminal; receiving a target data pair storage sequence sent back by a first terminal; and sending the target data pair storage sequence to a second terminal, wherein the second terminal displays the target data pair storage sequence. The embodiment respectively stores the real-time data in the execution main body and the first terminal, and controls the size of the target data pair storage sequence stored in the first terminal by using the target water level, so that the efficiency of generating and displaying the target data pair storage sequence is improved, and meanwhile, the disaster tolerance and the stability of the real-time data storage are improved.
With further reference to fig. 3, as an implementation of the above method for the above figures, the present disclosure provides some embodiments of a real-time data storage apparatus, which correspond to those of the method embodiments described above in fig. 2, and which may be applied in various terminal devices.
As shown in FIG. 3, some embodiments of a real-time data storage device 300, the device comprises: first receiving section 301, generating section 302, acquiring section 303, first transmitting section 304, second receiving section 305, and second transmitting section 306. The first receiving unit 301 is configured to receive target real-time data sent by a target terminal device. A generating unit 302 configured to generate a target key value according to the target real-time data and a predetermined historical data pair set. An obtaining unit 303 configured to obtain the target water line from a predetermined water line record table. A first sending unit 304 configured to send the target key value and the target real-time data to the first terminal in response to the target real-time data being greater than the target waterline. The second receiving unit 305 is configured to receive a target data pair storage sequence sent back by the first terminal, where the first terminal generates the target data pair storage sequence according to the target key value and the target real-time data, and the target data pair storage sequence includes a first number of target data pairs. A second sending unit 306 configured to send the target data pair storage sequence to a second terminal, wherein the second terminal displays the target data pair storage sequence.
It will be understood that the units described in the apparatus 300 correspond to the various steps in the method described with reference to fig. 2. Thus, the operations, features and resulting advantages described above with respect to the method are also applicable to the apparatus 300 and the units included therein, and are not described herein again.
Referring now to FIG. 4, shown is a block diagram of a computer system 400 suitable for use in implementing a terminal device of an embodiment of the present disclosure. The terminal device shown in fig. 4 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 4, the computer system 400 includes a Central Processing Unit (CPU) 401 that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 402 or a program loaded from a storage section 406 into a Random Access Memory (RAM) 403. In the RAM403, various programs and data necessary for the operation of the system 400 are also stored. The CPU 401, ROM 402, and RAM403 are connected to each other via a bus 404. An Input/Output (I/O) interface 405 is also connected to the bus 404.
The following components are connected to the I/O interface 405: a storage section 406 including a hard disk and the like; and a communication section 407 including a Network interface card such as a LAN (Local Area Network) card, a modem, or the like. The communication section 407 performs communication processing via a network such as the internet. A drive 408 is also connected to the I/O interface 405 as needed. A removable medium 409 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted as necessary on the drive 408, so that a computer program read out therefrom is mounted as necessary in the storage section 406.
In particular, the processes described above with reference to the flow diagrams may be implemented as computer software programs, according to embodiments of the present disclosure. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer-readable medium, the computer program comprising program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network through the communication section 407 and/or installed from the removable medium 409. The above-described functions defined in the method of the present disclosure are performed when the computer program is executed by a Central Processing Unit (CPU) 401. It should be noted that the computer readable medium in the present disclosure may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer-readable signal medium may include a propagated data signal with computer-readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, smalltalk, C + +, and conventional procedural programming languages, such as the C language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention in the present disclosure is not limited to the specific combination of the above-mentioned features, but also encompasses other embodiments in which any combination of the above-mentioned features or their equivalents is made without departing from the spirit of the invention. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.

Claims (10)

1. A real-time data storage method, comprising:
receiving target real-time data sent by target terminal equipment;
generating a target key value according to the target real-time data and a predetermined historical data pair set;
acquiring a target water level line from a predetermined water level line record table;
responding to the target real-time data being larger than the target waterline, and sending the target key value and the target real-time data to a first terminal;
receiving a target data pair storage sequence sent back by the first terminal, wherein the target data pair storage sequence is generated by the first terminal according to the target key value and the target real-time data, and comprises a first number of target data pairs;
and sending the target data pair storage sequence to a second terminal, wherein the second terminal displays the target data pair storage sequence.
2. The method of claim 1, wherein the predetermined set of historical data pairs stores a second number of historical data pairs, the historical data pairs being data pairs of historical data and key values of the historical data.
3. The method of claim 2, wherein generating a target key value from the target real-time data and a predetermined set of historical data pairs comprises:
and storing the target real-time data into a predetermined historical data pair set to obtain the target key value, wherein the target key value is a key value representing the storage position of the target real-time data in the predetermined historical data pair set.
4. The method of claim 3, wherein the first terminal is a terminal for storing a stored sequence of terminal history data pairs comprising a first number of terminal history data pairs, the terminal history data pairs being data pairs of terminal key values and terminal history data.
5. The method of claim 4, wherein the method further comprises:
receiving the terminal historical data pair storage sequence sent back by the first terminal in response to the target real-time data not being greater than the target waterline;
determining the terminal historical data pair storage sequence as the target data pair storage sequence;
and sending the target data pair storage sequence to a second terminal, wherein the second terminal displays the target data pair storage sequence.
6. The method of claim 5, wherein the generating, by the first terminal, the target data pair storage sequence according to the target key value and the target real-time data comprises:
the first terminal stores the target key value and the target real-time data as a target data pair;
the first terminal determines the target real-time data as an update accumulated value;
and responding to the update accumulated value being larger than a predetermined control threshold value, and generating the target data pair storage sequence by the first terminal according to the update accumulated value and the target data pair.
7. The method of claim 6, wherein the first terminal generates the target data pair storage sequence according to the target key value and the target real-time data, further comprising:
in response to the update accumulation value not being greater than a predetermined control threshold, the first terminal adding the target data pair to the terminal history data pair storage sequence;
the first terminal sorts the storage sequence of the terminal historical data pairs from large to small according to the values of the terminal historical data so as to update the storage sequence of the terminal historical data pairs;
and the first terminal determines the terminal historical data pair storage sequence as the target data pair storage sequence.
8. The method of claim 7, wherein the first terminal generating the stored sequence of target data pairs from the update rollup value and the target data pairs comprises:
the first terminal determines a first number of terminal history data pairs in the terminal history data pair storage sequence as target history data pairs;
for each terminal history data pair in the terminal history data pair storage sequence, in response to the terminal history data in the terminal history data pair being smaller than the target history data in the target history data pair, the first terminal deletes the terminal history data pair to update the terminal history data pair storage sequence;
the first terminal sends the target historical data back to the execution main body, wherein the execution main body updates the predetermined water level line record table by using the target historical data;
the first terminal adds the target data pair into the terminal historical data pair storage sequence;
the first terminal sorts the storage sequence of the terminal historical data pairs from large to small according to the values of the terminal historical data so as to update the storage sequence of the terminal historical data pairs;
and the first terminal determines the terminal history data pair storage sequence as the target data pair storage sequence.
9. A real-time data storage device comprising:
a first receiving unit configured to receive target real-time data sent by a target terminal device;
a generating unit configured to generate a target key value according to the target real-time data and a predetermined historical data pair set;
an acquisition unit configured to acquire a target water level line from a predetermined water level line record table;
a first sending unit configured to send the target key value and the target real-time data to a first terminal in response to the target real-time data being greater than the target waterline;
a second receiving unit, configured to receive a target data pair storage sequence sent back by the first terminal, where the first terminal generates the target data pair storage sequence according to the target key value and the target real-time data, and the target data pair storage sequence includes a first number of target data pairs;
a second transmitting unit configured to transmit the stored sequence of target data pairs to a second terminal, wherein the second terminal displays the stored sequence of target data pairs.
10. A terminal device, comprising:
one or more processors;
a storage device having one or more programs stored thereon;
when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-8.
CN202110885088.XA 2021-08-03 2021-08-03 Real-time data storage method and device and terminal equipment Pending CN115705326A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110885088.XA CN115705326A (en) 2021-08-03 2021-08-03 Real-time data storage method and device and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110885088.XA CN115705326A (en) 2021-08-03 2021-08-03 Real-time data storage method and device and terminal equipment

Publications (1)

Publication Number Publication Date
CN115705326A true CN115705326A (en) 2023-02-17

Family

ID=85178494

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110885088.XA Pending CN115705326A (en) 2021-08-03 2021-08-03 Real-time data storage method and device and terminal equipment

Country Status (1)

Country Link
CN (1) CN115705326A (en)

Similar Documents

Publication Publication Date Title
CN111190888A (en) Method and device for managing graph database cluster
CN111352800A (en) Big data cluster monitoring method and related equipment
CN110866040A (en) User portrait generation method, device and system
CN107291835B (en) Search term recommendation method and device
CN113760488A (en) Method, device, equipment and computer readable medium for scheduling task
CN114297278A (en) Method, system and device for quickly writing batch data
CN113190558A (en) Data processing method and system
CN111555894B (en) Data processing method, device, equipment and storage medium
CN116450622B (en) Method, apparatus, device and computer readable medium for data warehouse entry
CN113760982A (en) Data processing method and device
CN112148705A (en) Data migration method and device
CN115905322A (en) Service processing method and device, electronic equipment and storage medium
JP7307766B2 (en) Traffic adjustment method, apparatus, electronic equipment, computer readable recording medium and computer program
US11277300B2 (en) Method and apparatus for outputting information
CN115705326A (en) Real-time data storage method and device and terminal equipment
CN114756301A (en) Log processing method, device and system
CN114064803A (en) Data synchronization method and device
CN113595886A (en) Instant messaging message processing method and device, electronic equipment and storage medium
CN114049065A (en) Data processing method, device and system
CN113282455A (en) Monitoring processing method and device
CN113568936B (en) Real-time stream data storage method, device and terminal equipment
CN112749204A (en) Method and device for reading data
CN112115154A (en) Data processing and data query method, device, equipment and computer readable medium
CN111290927A (en) Data monitoring method and device
CN113360765B (en) Event information processing method and device, electronic equipment and medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination