CN114006906A - Method for reducing memory consumption by optimizing node communication - Google Patents
Method for reducing memory consumption by optimizing node communication Download PDFInfo
- Publication number
- CN114006906A CN114006906A CN202011317695.8A CN202011317695A CN114006906A CN 114006906 A CN114006906 A CN 114006906A CN 202011317695 A CN202011317695 A CN 202011317695A CN 114006906 A CN114006906 A CN 114006906A
- Authority
- CN
- China
- Prior art keywords
- nodes
- memory
- communication
- block chain
- data
- 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.)
- Granted
Links
- 238000004891 communication Methods 0.000 title claims abstract description 109
- 230000015654 memory Effects 0.000 title claims abstract description 98
- 238000000034 method Methods 0.000 title claims abstract description 35
- 230000003139 buffering effect Effects 0.000 claims abstract description 4
- 238000001514 detection method Methods 0.000 claims description 4
- 238000012423 maintenance Methods 0.000 claims description 4
- 230000009897 systematic effect Effects 0.000 claims description 4
- 208000000044 Amnesia Diseases 0.000 claims description 3
- 208000026139 Memory disease Diseases 0.000 claims description 3
- 230000006984 memory degeneration Effects 0.000 claims description 3
- 208000023060 memory loss Diseases 0.000 claims description 3
- 239000013589 supplement Substances 0.000 claims description 3
- 230000004083 survival effect Effects 0.000 claims description 3
- 230000009471 action Effects 0.000 description 4
- 238000005516 engineering process Methods 0.000 description 3
- 230000007774 longterm Effects 0.000 description 3
- 230000008569 process Effects 0.000 description 3
- 238000004806 packaging method and process Methods 0.000 description 2
- 241000287828 Gallus gallus Species 0.000 description 1
- 230000004075 alteration Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 239000002304 perfume Substances 0.000 description 1
- 235000014347 soups Nutrition 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 230000001502 supplementing effect Effects 0.000 description 1
- 239000002699 waste material Substances 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1001—Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
- H04L67/1031—Controlling of the operation of servers by a load balancer, e.g. adding or removing servers that serve requests
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/06—Notations for structuring of protocol data, e.g. abstract syntax notation one [ASN.1]
Abstract
The invention relates to the technical field of block chains, and discloses a method for reducing memory consumption by optimizing node communication, which is used for reducing the memory consumption by eliminating invalid nodes in communication objects and data communication and comprises the following steps: the first step is as follows: establishing a memory: establishing a new memory in the block chain, wherein the new memory is used for buffering communication objects and data, and the second step is as follows: and reducing invalid nodes in the communication object. According to the method for reducing the memory consumption by optimizing the node communication, invalid nodes in the communication object are maintained and detected in the mode of the address book, the memory consumption is greatly reduced, meanwhile, the address book deletes the part which cannot be communicated on the communication object, the space of the memory is saved, meanwhile, some new communication nodes are supplemented to enter a block chain, a position is provided for subsequent writing, the utilization rate of the memory is improved under the condition that the memory consumption is continuously reduced, and the use of the block chain by people is guaranteed.
Description
Technical Field
The invention relates to the technical field of block chains, in particular to a method for reducing memory consumption by optimizing node communication.
Background
Blockchains are a term of art in information technology. Essentially, the block chain technology is a shared database, and the data or information stored in the shared database has the characteristics of 'unforgeability', 'trace in the whole process', 'traceability', 'open transparency', 'collective maintenance' and the like. And the rich application scenes of the block chains basically solve the problem of information asymmetry based on the block chains, and realize the cooperative trust and consistent action among a plurality of main bodies.
The memory is the core of the blockchain, which is a breakthrough computer programming language constructed in a key way, and is very similar to human mind. Just as our memories are linked together by associations, for example, the taste of chicken soup may evoke people's care about children, the scent of perfume may be reminiscent of what was ever, and so is every code "block" in the "chain" of transactions, which is indistinguishable from previous blocks.
Because people depend on using the block chain, some invalid and long-term non-communicable nodes continuously exist in the block chain, so that core memories in the block chain are continuously accumulated, memory continuous consumption is caused, memory resources in some good block chain nodes are occupied and cannot be effectively used, a corresponding method is not set in the existing block chain to remove the invalid and long-term non-communicable nodes, and certain memory resource waste is caused
Disclosure of Invention
The invention provides a method for reducing memory consumption by optimizing node communication, which has the advantages of removing invalid and long-term non-communicable nodes in a block chain memory, improving the utilization rate of the block chain memory and solving the problems in the background technology.
The invention provides the following technical scheme: a method for reducing memory consumption by optimizing node communication eliminates invalid nodes in communication objects and data communication so as to reduce the memory consumption, and comprises the following steps:
the first step is as follows: establishing a memory
A new memory is established in the blockchain, and the new memory is used for buffering communication objects and data.
The second step is that: reducing invalid nodes in communication object, comprising the following three steps
1. Regular maintenance and detection are carried out on the communication object in a mode of an address book, and survival rate of nodes in the communication object is maintained and detected, so that nodes which cannot communicate in the communication object are found.
2. The address book is maintained and detected to find some nodes which can not communicate for a long time, so that the address book deletes the nodes which can not communicate for a long time, and the consumption of a memory is reduced.
3. After the address book deletes the nodes which can not communicate for a long time, some nodes are supplemented to supplement the positions of the nodes which can not communicate for a long time, so that new nodes can be used in subsequent use.
The third step: the solution of data communication is divided into the following three steps
1. Through the reasonable data structure, massive storage and analysis are carried out on the inside of data communication, invalid nodes in the data communication are eliminated and shelved, effective nodes are arranged in a centralized mode, and the value and the use space of block chain data are improved.
2. By using a reasonable coding mode, the new data communication added to the block chain is completed, and the threshold setting of the new data communication node is carried out through the coding mode, so that the node added into the block chain has certain value, the node without value is not allowed to be added into the block chain, and the memory consumption in the block chain is reduced.
3. The network data is encapsulated by the frame with a compact structure, the data is divided into recoverable blocks through the frame, whether the blocks are damaged or not can be easily checked, and therefore nodes in the blocks are checked, the nodes in the damaged blocks are eliminated, memory loss in a block chain can be reduced, and the utilization rate of a memory is improved.
2. The method of claim 1, wherein the method comprises the steps of: the method comprises the steps of eliminating the nodes which cannot communicate inside the communication object effectively in the mode of the address book, storing some new nodes, ensuring the follow-up use of people, reducing the consumption of the memory and utilizing the memory to the maximum extent.
3. The method of claim 1, wherein the method comprises the steps of: in the data communication, a reasonable data structure is used for systematic planning data communication, centralized unified arrangement of effective communication nodes is guaranteed in a big data mode in the data structure, and invalid communication nodes are shelved and deleted, so that the consumption of a memory is reduced.
Preferably, the nodes which cannot communicate inside the communication object are effectively eliminated in the address book mode, so that some new nodes are stored, the follow-up use of people is guaranteed, the consumption of the memory is reduced, and the memory is utilized to the maximum extent.
Preferably, a reasonable data structure is applied in the data communication to carry out systematic planning data communication, centralized unified homing of effective communication nodes is guaranteed in a big data mode in the data structure, and invalid communication nodes are shelved and deleted, so that the consumption of the memory is reduced.
Preferably, the encoding method is to set a certain threshold for the communication node written into the block chain, and the communication node can be written into the block chain only when the certain threshold is reached, so that some communication nodes with no value are prevented from being written into the block chain, and the communication nodes placed in the memory are guaranteed to have certain significance, thereby reducing the consumption of the memory.
Preferably, the frame with the compact structure is mainly used for checking whether the block chain is damaged, that is, an invalid communication node existing in the block chain is judged in a frame form and then removed, so that the consumption of the memory is further reduced.
The invention has the following beneficial effects:
1. the method for reducing the memory consumption by optimizing the node communication comprises the steps of maintaining and detecting invalid nodes in a communication object in an address book mode, greatly reducing the memory consumption, deleting the part which cannot be communicated on the communication object by the address book, saving the space of the memory, supplementing new communication nodes into a block chain, providing positions for subsequent writing, improving the utilization rate of the memory under the condition of continuously reducing the memory consumption, ensuring that people use the block chain, enabling only surviving nodes to exist in the memory, enabling the block chain to be utilized to the maximum degree, helping the block chain to reduce the memory consumption, and enabling the block chain memory to be utilized to the maximum degree.
2. The method for reducing the memory consumption by optimizing the node communication is characterized in that a reasonable data structure, a coding mode and a frame with a compact structure are used for packaging network data to effectively detect the data communication nodes and set a certain threshold at the same time so as to eliminate the data communication of the worthless pictures in the data communication to a certain extent, meanwhile, a certain degree of threshold is needed when writing in a new communication node, so that the situation that a communication node with no value cannot be written into a block chain is ensured, so that the communication nodes in the block chain memory have certain value, the memory consumption is reduced to a certain extent, the communication nodes in the memory have useful value for people, therefore, the memory environment of the node is optimized, the usability of the block chain core memory is ensured, and more convenient use of the block chain memory can be provided for people.
Drawings
FIG. 1 is a schematic flow chart of the method of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Referring to fig. 1, a method for reducing memory consumption by optimizing node communication, which eliminates invalid nodes in communication objects and data communication, thereby reducing memory consumption, includes the following steps:
the first step is as follows: establishing a memory
A new memory is established in the blockchain, and the new memory is used for buffering communication objects and data.
The second step is that: reducing invalid nodes in communication object, comprising the following three steps
1. Regular maintenance and detection are carried out on the communication object in the mode of the address book, and the survival rate of the nodes in the communication object is maintained and detected, so that the nodes which cannot communicate in the communication object are found, the space of a memory is saved, and more useful nodes can be stored.
2. The address book is maintained and detected to find some nodes which can not communicate for a long time, so that the address book deletes the nodes which can not communicate for a long time, the consumption of the memory is reduced, and more nodes can be stored in the memory.
3. After the address book deletes the nodes which can not communicate for a long time, some nodes are supplemented to supplement the positions of the nodes which can not communicate for a long time, so that new nodes can have memories for use in subsequent use.
The third step: the solution of data communication is divided into the following three steps
1. Through the reasonable data structure, massive storage and analysis are carried out on the inside of data communication, invalid nodes in the data communication are eliminated and shelved, effective nodes are arranged in a centralized mode, and the value and the use space of block chain data are improved.
2. By using a reasonable coding mode, the new data communication added to the block chain is completed, and the threshold setting of the new data communication node is carried out through the coding mode, so that the node added into the block chain has certain value, the node without value is not allowed to be added into the block chain, and the memory consumption in the block chain is reduced.
3. The network data is encapsulated by the frame with a compact structure, the data is divided into recoverable blocks through the frame, whether the blocks are damaged or not can be easily checked, and therefore nodes in the blocks are checked, the nodes in the damaged blocks are eliminated, memory loss in a block chain can be reduced, and the utilization rate of a memory is improved.
The method comprises the steps of obtaining a communication object, and eliminating nodes which cannot communicate inside the communication object effectively in an address book mode, so that some new nodes are stored, follow-up use of people is guaranteed, consumption of a memory is reduced, the memory is utilized to the maximum extent, and a user can store more useful nodes in the memory in the effective memory.
The reasonable data structure is applied in data communication to carry out systematic planning data communication, centralized unified arrangement of effective communication nodes is guaranteed in a big data mode in the data structure, and invalid communication nodes are shelved and deleted, so that consumption of memory is reduced.
The coding mode is to set a certain threshold for the communication nodes written into the block chain, and the communication nodes can be written into the block chain only when the certain threshold is reached, so that some communication nodes with no value are prevented from being written into the block chain, and the communication nodes placed in the memory are guaranteed to have certain significance, thereby reducing the consumption of the memory.
The frame with compact structure is mainly used for checking whether the block chain is damaged or not, namely, invalid communication nodes existing in the block chain are judged in a frame mode and then eliminated, so that the consumption of the memory is further reduced, more useful nodes can be stored in the memory, and the utilization rate of the memory is improved.
The internal invalid nodes of the communication objects are maintained and detected in the mode of the address book, consumption of the memory is greatly reduced, meanwhile, the address book deletes the parts which cannot communicate on the communication objects, space of the memory is saved, meanwhile, some new communication nodes are supplemented to enter the block chain, a position is provided for follow-up writing, the utilization rate of the memory is improved under the condition that consumption of the memory is continuously reduced, use of the block chain by people is guaranteed, only the surviving nodes exist in the memory, and the block chain can be utilized to the maximum extent.
The method comprises the steps that a reasonable data structure, a reasonable coding mode and a frame with a compact structure are used for packaging network data, effective detection is carried out on data communication nodes, a certain threshold is set at the same time, useless data communication in data communication is reduced to a certain degree, new communication nodes are written in at the same time, the threshold to a certain degree is needed, the fact that the useless communication nodes cannot be written into a block chain is guaranteed, the communication nodes in a block chain memory have certain value, consumption of the memory is reduced to a certain degree, the communication nodes in the memory have useful value for people, and accordingly the memory environment of the nodes is optimized.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus.
Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that changes, modifications, substitutions and alterations can be made in these embodiments without departing from the principles and spirit of the invention, the scope of which is defined in the appended claims and their equivalents.
Claims (5)
1. A method for reducing memory consumption by optimizing node communication eliminates invalid nodes in communication objects and data communication so as to reduce the memory consumption, and comprises the following steps:
the first step is as follows: establishing a memory
A new memory is established in the blockchain, and the new memory is used for buffering communication objects and data.
The second step is that: reducing invalid nodes in communication object, comprising the following three steps
1. Regular maintenance and detection are carried out on the communication object in a mode of an address book, and survival rate of nodes in the communication object is maintained and detected, so that nodes which cannot communicate in the communication object are found.
2. The address book is maintained and detected to find some nodes which can not communicate for a long time, so that the address book deletes the nodes which can not communicate for a long time, and the consumption of a memory is reduced.
3. After the address book deletes the nodes which can not communicate for a long time, some nodes are supplemented to supplement the positions of the nodes which can not communicate for a long time, so that new nodes can be used in subsequent use.
The third step: the solution of data communication is divided into the following three steps
1. Through the reasonable data structure, massive storage and analysis are carried out on the inside of data communication, invalid nodes in the data communication are eliminated and shelved, effective nodes are arranged in a centralized mode, and the value and the use space of block chain data are improved.
2. By using a reasonable coding mode, the new data communication added to the block chain is completed, and the threshold setting of the new data communication node is carried out through the coding mode, so that the node added into the block chain has certain value, the node without value is not allowed to be added into the block chain, and the memory consumption in the block chain is reduced.
3. The network data is encapsulated by the frame with a compact structure, the data is divided into recoverable blocks through the frame, whether the blocks are damaged or not can be easily checked, and therefore nodes in the blocks are checked, the nodes in the damaged blocks are eliminated, memory loss in a block chain can be reduced, and the utilization rate of a memory is improved.
2. The method of claim 1, wherein the method comprises the steps of: the method comprises the steps of eliminating the nodes which cannot communicate inside the communication object effectively in the mode of the address book, storing some new nodes, ensuring the follow-up use of people, reducing the consumption of the memory and utilizing the memory to the maximum extent.
3. The method of claim 1, wherein the method comprises the steps of: in the data communication, a reasonable data structure is used for systematic planning data communication, centralized unified arrangement of effective communication nodes is guaranteed in a big data mode in the data structure, and invalid communication nodes are shelved and deleted, so that the consumption of a memory is reduced.
4. The method of claim 1, wherein the method comprises the steps of: the coding mode is to set a certain threshold for the communication nodes written into the block chain, and the communication nodes which are not valuable can be prevented from being written into the block chain when the certain threshold is reached, so that the communication nodes placed in the memory have certain significance, and the consumption of the memory is reduced.
5. The method of claim 1, wherein the method comprises the steps of: the frame with compact structure is mainly used for checking whether the block chain is damaged, namely, invalid communication nodes existing in the block chain are judged in a frame form and then removed, so that the consumption of the memory is further reduced.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011317695.8A CN114006906B (en) | 2020-11-23 | 2020-11-23 | Method for reducing memory consumption by optimizing node communication |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011317695.8A CN114006906B (en) | 2020-11-23 | 2020-11-23 | Method for reducing memory consumption by optimizing node communication |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114006906A true CN114006906A (en) | 2022-02-01 |
CN114006906B CN114006906B (en) | 2023-11-07 |
Family
ID=79920682
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011317695.8A Active CN114006906B (en) | 2020-11-23 | 2020-11-23 | Method for reducing memory consumption by optimizing node communication |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114006906B (en) |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109582735A (en) * | 2018-10-26 | 2019-04-05 | 黄淮学院 | A kind of block chain blocks of knowledge storage system |
CN110019043A (en) * | 2017-12-18 | 2019-07-16 | 厦门本能管家科技有限公司 | A kind of block chain date storage method |
CN110046894A (en) * | 2019-04-19 | 2019-07-23 | 电子科技大学 | A kind of restructural block chain method for building up of grouping based on correcting and eleting codes |
CN110430087A (en) * | 2019-09-16 | 2019-11-08 | 上海保险交易所股份有限公司 | The architecture design and realization of block chain heat upgrading |
EP3709568A1 (en) * | 2019-03-14 | 2020-09-16 | Nokia Technologies Oy | Deleting user data from a blockchain |
US20200320204A1 (en) * | 2019-04-03 | 2020-10-08 | Cisco Technology, Inc. | Blockchain system with sevarable data and cryptographic proof |
-
2020
- 2020-11-23 CN CN202011317695.8A patent/CN114006906B/en active Active
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110019043A (en) * | 2017-12-18 | 2019-07-16 | 厦门本能管家科技有限公司 | A kind of block chain date storage method |
CN109582735A (en) * | 2018-10-26 | 2019-04-05 | 黄淮学院 | A kind of block chain blocks of knowledge storage system |
EP3709568A1 (en) * | 2019-03-14 | 2020-09-16 | Nokia Technologies Oy | Deleting user data from a blockchain |
US20200320204A1 (en) * | 2019-04-03 | 2020-10-08 | Cisco Technology, Inc. | Blockchain system with sevarable data and cryptographic proof |
CN110046894A (en) * | 2019-04-19 | 2019-07-23 | 电子科技大学 | A kind of restructural block chain method for building up of grouping based on correcting and eleting codes |
CN110430087A (en) * | 2019-09-16 | 2019-11-08 | 上海保险交易所股份有限公司 | The architecture design and realization of block chain heat upgrading |
Also Published As
Publication number | Publication date |
---|---|
CN114006906B (en) | 2023-11-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8380680B2 (en) | Piecemeal list prefetch | |
CN106815530A (en) | Data deposit card method, data verification method and device | |
CN108197181A (en) | A kind of compression and storage method of time series data, electronic equipment and storage medium | |
CN110674154B (en) | Spark-based method for inserting, updating and deleting data in Hive | |
CN106897141A (en) | The processing method and processing device of information | |
CN104915450A (en) | HBase-based big data storage and retrieval method and system | |
CN106529669A (en) | Method and apparatus for processing data sequences | |
CN101551803A (en) | Method and device for establishing pattern matching state machine and pattern recognition | |
CN107807932B (en) | Hierarchical data management method and system based on path enumeration | |
CN101446966A (en) | Data storage method and system | |
CN112650745A (en) | Data management system based on unified data resource pool | |
CN115525580A (en) | Namespace setting method and device and readable storage medium | |
CN114006906A (en) | Method for reducing memory consumption by optimizing node communication | |
CN103207866A (en) | File storing method and system based on partitioning strategies | |
CN114138792A (en) | Key-value separated storage method and system | |
CN105554181A (en) | DNS log compression method and device | |
CN101324858A (en) | Method, system and terminal for recovering data | |
CN108399251A (en) | A kind of Intelligence Generator and data exhibiting process that multi-layer data shows | |
CN109359156B (en) | Data storage structure processing method and device | |
Keswani et al. | Enhanced approach to attain competent Big Data pre-processing | |
Lombard et al. | In vitro multiplication and apparently indefinite subcultures of normal mouse resident peritoneal macrophages | |
CN107273217A (en) | A kind of method for information display, device and terminal device | |
CN109358985A (en) | A kind of method and electronic equipment based on browser power-off protection cache information | |
Randall | Family and household in development | |
CN204145543U (en) | A kind of centralized control system with Financial Control function |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |