CN114338716B - Distributed storage method for user original data in flexible attendant scene - Google Patents
Distributed storage method for user original data in flexible attendant scene Download PDFInfo
- Publication number
- CN114338716B CN114338716B CN202111523335.8A CN202111523335A CN114338716B CN 114338716 B CN114338716 B CN 114338716B CN 202111523335 A CN202111523335 A CN 202111523335A CN 114338716 B CN114338716 B CN 114338716B
- Authority
- CN
- China
- Prior art keywords
- original data
- data information
- information
- distributed
- local original
- 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.)
- Active
Links
- 238000003860 storage Methods 0.000 title claims abstract description 59
- 238000000034 method Methods 0.000 title claims abstract description 47
- 230000032683 aging Effects 0.000 claims abstract description 27
- 230000002159 abnormal effect Effects 0.000 claims description 21
- 238000004891 communication Methods 0.000 claims description 14
- 238000004590 computer program Methods 0.000 claims description 8
- 238000010276 construction Methods 0.000 claims description 8
- 238000013507 mapping Methods 0.000 claims description 8
- 238000012545 processing Methods 0.000 abstract description 16
- 238000013500 data storage Methods 0.000 abstract description 5
- 230000006870 function Effects 0.000 description 10
- 238000010586 diagram Methods 0.000 description 4
- 230000003287 optical effect Effects 0.000 description 4
- 230000008569 process Effects 0.000 description 4
- 230000008859 change Effects 0.000 description 3
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 230000009471 action Effects 0.000 description 2
- 230000006978 adaptation Effects 0.000 description 2
- 238000012549 training Methods 0.000 description 2
- 230000005856 abnormality Effects 0.000 description 1
- 238000009825 accumulation Methods 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000004140 cleaning Methods 0.000 description 1
- 238000005242 forging Methods 0.000 description 1
- 230000010365 information processing Effects 0.000 description 1
- 230000014759 maintenance of location Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000004080 punching Methods 0.000 description 1
- 238000009877 rendering Methods 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
Classifications
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The invention discloses a distributed storage method of user original data in a flexible attendant scene, which comprises the steps of obtaining aging information corresponding to local original data information when the local original data information is newly added in a first distributed node, and determining first region information of the first distributed node; broadcasting local original data information in a preset peer-to-peer network, and determining each second distributed node which receives the local original data information; and selecting a preset number of third distributed nodes from the second distributed nodes based on the first region information, determining the storage time of the local original data information based on the aging information, and storing the local original data information into the third distributed nodes. The invention realizes that the mobility of the flexible service sites is considered, so that the staff can directly call the original data information when flowing to the adjacent other flexible service sites, repeated redundant data is not required to be stored, and the data storage processing efficiency is improved.
Description
Technical Field
The application relates to the technical field of intelligent storage, in particular to a distributed storage method of user original data in a flexible attendant scene.
Background
At present, a large number of flexible attendant staff exist in urban construction sites, urban road cleaning and other urban flexible attendant sites, and in order to solve the problems of attendant staff pay, intermediate business information forging and the like, real-name authentication is required to be carried out by face attendance equipment when attendant staff work attendance, training and the like, and original data are required to be saved in order to ensure that information can be traced back. In a construction site system, it is required to save attendance photos, payroll, training records, etc., which results in a large amount of data to be stored in the information system. Now, in general, a client and a server mode are adopted, and the client is responsible for generating original data, and then sending the original data to the server, and the original data is centrally stored and processed by the server. In this way, not only are the common problems that the processing login and the bandwidth have higher requirements, the data cannot be guaranteed to be illegally tampered, the server end is required to carry out redundant backup and other centralized data storage modes exist, but also due to the particularity of the flexible service workplace, the staff in the flexible service workplace can change frequently, the retention time of each staff is not very long, the corresponding original data is still stored in the server after the staff leaves the flexible service workplace, redundant useless data is accumulated, and the data storage processing efficiency of the server is affected.
Disclosure of Invention
In order to solve the above problems, the embodiment of the present application provides a distributed storage method for user original data in a flexible attendant scene.
In a first aspect, an embodiment of the present application provides a method for storing user raw data in a flexible attendant scenario in a distributed manner, where the method includes:
when local original data information is newly added in a first distributed node, obtaining aging information corresponding to the local original data information, and determining first region information of the first distributed node;
broadcasting the local original data information in a preset peer-to-peer network, and determining each second distributed node which receives the local original data information;
and selecting a preset number of third distributed nodes from the second distributed nodes based on the first region information, determining the storage time of the local original data information based on the aging information, and storing the local original data information into the third distributed nodes.
Preferably, after the local original data information is newly added in the first distributed node, the method further includes:
generating a file identification mark based on the local original data information;
and constructing a mapping relation between the local original data information and the file identification mark.
Preferably, after storing the local raw data information in each of the third distributed nodes, the method further includes:
communicating each file identification identifier in each third distributed node after a first preset time;
and when abnormal file identification identifiers which cannot be matched exist, generating abnormal information based on the abnormal file identification identifiers, and determining an abnormal third distributed node corresponding to the abnormal file identification identifiers.
Preferably, the method further comprises:
when an original data calling request is received, determining the file identification corresponding to the original data calling request;
and sending a call instruction to the third distributed node corresponding to the file identification mark, wherein the call instruction is used for controlling the first distributed node and the third distributed node to carry out encrypted communication.
Preferably, the method further comprises:
when an original data calling request is received, determining the file identification corresponding to the original data calling request;
and sending a call instruction to the third distributed node corresponding to the file identification mark, wherein the call instruction is used for controlling the first distributed node and the third distributed node to carry out encrypted communication.
Preferably, the determining the storage time of the local original data information based on the aging information includes:
determining a first time corresponding to the aging information, and adding the first time to a preset second time to obtain the storage time of the local original data information.
Preferably, the method further comprises:
when the repeated original data information is detected in the storage time, updating the storage time based on the repeated original data information, and adjusting the third distributed nodes for storing the local original data information corresponding to the repeated original data information, so that each adjusted third distributed node is matched with the second region information corresponding to the repeated original data information.
In a second aspect, an embodiment of the present application provides a distributed storage device for user raw data in a flexible attendant scenario, where the device includes:
the acquisition module is used for acquiring ageing information corresponding to the local original data information when the local original data information is newly added in the first distributed node, and determining first region information of the first distributed node;
the broadcasting module is used for broadcasting the local original data information in a preset peer-to-peer network and determining each second distributed node which receives the local original data information;
the selecting module is used for selecting a preset number of third distributed nodes from the second distributed nodes based on the first region information, determining the storage time of the local original data information based on the aging information, and storing the local original data information into the third distributed nodes.
In a third aspect, an embodiment of the present application provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the method as provided in the first aspect or any one of the possible implementations of the first aspect when the computer program is executed.
In a fourth aspect, embodiments of the present application provide a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a method as provided by the first aspect or any one of the possible implementations of the first aspect.
The beneficial effects of the invention are as follows: the original data information is stored in a distributed mode, the nodes are backed up mutually to ensure safe storage of files, and the network communication problem of each node is ensured through a P2P peer-to-peer network. In addition, in consideration of mobility of the flexible service sites, the original data information is provided with storage time and is preferentially distributed to nodes matched with region information of the original data information, so that when workers flow to adjacent other flexible service sites, the original data information can be directly called, repeated redundant data are not required to be stored, and data storage processing efficiency is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flow chart of a distributed storage method of user original data in a flexible attendant scene according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of a distributed storage device for user raw data in a flexible attendant scenario according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application.
In the following description, the terms "first," "second," and "first," are used for descriptive purposes only and are not to be construed as indicating or implying relative importance. The following description provides various embodiments of the present application, and various embodiments may be substituted or combined, so that the present application is also intended to encompass all possible combinations of the same and/or different embodiments described. Thus, if one embodiment includes feature A, B, C and another embodiment includes feature B, D, then the present application should also be considered to include embodiments that include one or more of all other possible combinations including A, B, C, D, although such an embodiment may not be explicitly recited in the following.
The following description provides examples and does not limit the scope, applicability, or examples set forth in the claims. Changes may be made in the function and arrangement of elements described without departing from the scope of the application. Various examples may omit, replace, or add various procedures or components as appropriate. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Furthermore, features described with respect to some examples may be combined into other examples.
Referring to fig. 1, fig. 1 is a flow chart of a method for storing user raw data in a flexible attendant scene according to an embodiment of the present application. In an embodiment of the present application, the method includes:
s101, when local original data information is newly added in a first distributed node, obtaining aging information corresponding to the local original data information, and determining first region information of the first distributed node.
The execution subject of the present application may be a cloud server.
In this embodiment of the present application, each of the distributed nodes may correspond to a device terminal in a flexible service site, where the terminal device on the site accesses a dedicated secure virtual network through the distributed system guiding node, and after the terminal device generates an original file, the terminal device locally joins the distributed system node. Specifically, when local original data information such as a face image for attendance and electronic contract of a building site person is first recorded in the equipment terminal, the cloud server detects that the corresponding first distributed node is newly added with the local original data information, and acquires ageing information corresponding to the local original data information and first region information of the first distributed node. The time-efficiency information is related to the working time and days of the worksite personnel in the flexible working place and is used for determining the time-efficiency of the local original data information to be stored, and when the time-efficiency is exceeded, the cloud server can delete the local original data information. The first region information indicates a specific region position of the distributed node, so that a storage position of the local original data information can be conveniently determined later.
S102, broadcasting the local original data information in a preset peer-to-peer network, and determining each second distributed node which receives the local original data information.
The Peer-to-Peer network may be understood in the embodiments of the present application as a Peer-to-Peer computer network, which is a distributed application architecture that distributes tasks and workloads among peers (peers), in a form of a network or a network formed by a Peer-to-Peer computing model at an application layer. Such as a P2P network, etc.
In the embodiment of the application, the cloud server broadcasts the local original data information in the peer-to-peer network, so long as the node does not generate an abnormality, the cloud server receives the broadcasted information. The cloud server determines the received second distributed nodes, which are all nodes that can be used to store the local original data information.
S103, selecting a preset number of third distributed nodes from the second distributed nodes based on the first region information, determining storage time of the local original data information based on the aging information, and storing the local original data information into the third distributed nodes.
In the embodiment of the application, the cloud server uses the first region information as a standard to select a preset number (for example, 2) of third distributed nodes from the second distributed nodes as storage points, and caches the local original data information after determining the storage time of the local original data information according to the aging information, so that the data storage safety is ensured. The selection criterion of the third distributed node may be a node which is closer to the node where the local original data information is located in the geographic position, which considers the mobility of the staff in the construction site, and after the flexible construction site completes the work for several days, the staff is most likely to search for the next temporary work nearby, so the third distributed node is selected based on the criterion, on one hand, the efficiency of information calling is improved due to the closer distance, and on the other hand, when the staff in the construction site really goes to the position where the third distributed node to perform the next work, the stored original data information can be directly used without repeatedly collecting multiple data of the staff in the construction site.
In one embodiment, after the local original data information is newly added in the first distributed node, the method further includes:
generating a file identification mark based on the local original data information;
and constructing a mapping relation between the local original data information and the file identification mark.
In the embodiment of the application, the cloud server also generates a unique file identification identifier for the local original data information and constructs a mapping relationship between the file identification identifier and the local original data information, so that the cloud server can quickly determine the local original data information to be searched according to the file identification identifier in the processing process of a large amount of information.
In one embodiment, after the storing the local raw data information in each of the third distributed nodes, the method further includes:
communicating each file identification identifier in each third distributed node after a first preset time;
and when abnormal file identification identifiers which cannot be matched exist, generating abnormal information based on the abnormal file identification identifiers, and determining an abnormal third distributed node corresponding to the abnormal file identification identifiers.
In this embodiment of the present application, the third distributed nodes storing the local original data information may backup each other, that is, after the first preset time passes, the third distributed nodes may communicate with each other with a file identification identifier, so as to determine whether there is a change in the file identification identifier of the node, and if the change indicates that the local original data information in the node is illegally tampered, abnormal information is generated to alert a manager at this time, and the abnormal third distributed node is determined.
In one embodiment, the method further comprises:
when an original data calling request is received, determining the file identification corresponding to the original data calling request;
and sending a call instruction to the third distributed node corresponding to the file identification mark, wherein the call instruction is used for controlling the first distributed node and the third distributed node to carry out encrypted communication.
In the embodiment of the application, when a worker needs to perform operations such as attendance checking and card punching, the cloud server receives an original data calling request, namely, the terminal equipment needs to call the original data information to perform operations such as attendance checking and face recognition. Therefore, the cloud server determines the third distributed node stored by the original data information according to the file identification mark and sends a calling instruction to the third distributed node, so that the two nodes can carry out encrypted communication and attendance checking verification. The mode can better utilize the computing and storage capacities of a large number of terminal devices corresponding to each node, and reduce the storage processing cost of the server.
In one embodiment, the selecting a preset number of third distributed nodes from the second distributed nodes based on the first regional information includes:
sorting the second distributed nodes from near to far according to the distance from the first region information;
and sequentially selecting a preset number of third distributed nodes from the second distributed nodes according to the ordering sequence.
In this embodiment of the present application, the cloud server ranks the nodes according to the distance between each node and the first region information, and further selects the third distributed node according to the ranking order, so as to ensure that the third distributed node used for storing the original data information is selected as a few nodes closest to the first distributed node. On the one hand, the efficiency of information calling is improved due to the fact that the distance is relatively short, and on the other hand, when a worker really goes to the third distributed node to carry out next work, the stored original data information can be directly used without repeatedly collecting multiple data of the worker.
In one embodiment, the determining the storage time of the local raw data information based on the aging information includes:
determining a first time corresponding to the aging information, and adding the first time to a preset second time to obtain the storage time of the local original data information.
In the embodiment of the application, the first time corresponding to the aging information can represent the days or markets of work of the site personnel on the site according to contract requirements. Considering that the worksite personnel after leaving the contract is likely to go to other nearby worksites for a new crew, a second time is preset as the time it takes for the worksite personnel to find the new crew. The finally generated storage time can indicate the time that the local original data information can be stored in the third distributed node, if the worker really goes to other workplaces in the storage time, the cloud server can directly call the stored local original data information, unnecessary information processing processes are reduced, and if the situation that data need to be called does not occur after the storage time, the local original data information is considered to be useless, the local original data information can be deleted, and the accumulation of useless redundant information is reduced.
In one embodiment, the method further comprises:
when the repeated original data information is detected in the storage time, updating the storage time based on the repeated original data information, and adjusting the third distributed nodes for storing the local original data information corresponding to the repeated original data information, so that each adjusted third distributed node is matched with the second region information corresponding to the repeated original data information.
In this embodiment of the present application, when the job site personnel actually goes to another job site within the storage time and registers the basic information in the original data information at the corresponding new job site, the cloud server detects that the information is the re-restoration original data information. At this time, as the worksite personnel signs a new contract, a certain period of work needs to be performed on the new worksite, the cloud server updates the storage time according to the contract information in the repeated original data information, and redetermines a third distributed node matched with the second regional information of the node where the new worksite is located, and directly transmits the local original data stored before to the new third distributed node, so that repeated processing procedures are reduced, and the data processing transmission efficiency is improved.
The following will describe in detail the distributed storage device for user raw data in the flexible attendant scenario provided in the embodiment of the present application with reference to fig. 2. It should be noted that, in the distributed storage device for user raw data in the flexible attendant scenario shown in fig. 2, for performing the method of the embodiment shown in fig. 1 of the present application, for convenience of explanation, only the portion relevant to the embodiment of the present application is shown, and specific technical details are not disclosed, please refer to the embodiment shown in fig. 1 of the present application.
Referring to fig. 2, fig. 2 is a schematic structural diagram of a distributed storage device for user raw data in a flexible attendant scenario according to an embodiment of the present application. As shown in fig. 2, the apparatus includes:
an obtaining module 201, configured to obtain aging information corresponding to local original data information when there is new local original data information added to a first distributed node, and determine first region information of the first distributed node;
a broadcasting module 202, configured to broadcast the local original data information in a preset peer-to-peer network, and determine each second distributed node that receives the local original data information;
the selecting module 203 is configured to select a preset number of third distributed nodes from the second distributed nodes based on the first regional information, determine a storage time of the local original data information based on the aging information, and store the local original data information into each third distributed node.
In one embodiment, the acquisition module 201 further includes:
the identification generation unit is used for generating a file identification based on the local original data information;
and the mapping construction unit is used for constructing the mapping relation between the local original data information and the file identification mark.
In one embodiment, the selecting module 203 further includes:
the intercommunication unit is used for intercommunicating the file identification marks in the third distributed nodes every time a first preset time passes;
and the exception processing unit is used for generating exception information based on the exception file identification mark when the unmatched exception file identification mark exists, and determining an exception third distributed node corresponding to the exception file identification mark.
In one embodiment, the apparatus further comprises:
the receiving module is used for determining the file identification identifier corresponding to the original data calling request when the original data calling request is received;
and the calling module is used for sending a calling instruction to the third distributed node corresponding to the file identification mark and controlling the first distributed node to be in encrypted communication with the third distributed node.
In one embodiment, the selecting module 203 includes:
the ordering unit is used for ordering the second distributed nodes from near to far according to the distance from the first region information;
the selecting unit is used for sequentially selecting a preset number of third distributed nodes from the second distributed nodes according to the ordering sequence.
In one embodiment, the selecting module 203 further includes:
the computing unit is used for determining the first time corresponding to the aging information, and adding the first time and the preset second time to obtain the storage time of the local original data information.
In one embodiment, the apparatus further comprises:
an updating module, configured to update the storage time based on the repeated original data information when the repeated original data information is detected within the storage time, and adjust the third distributed nodes used to store the local original data information corresponding to the repeated original data information, so that each adjusted third distributed node matches with the second region information corresponding to the repeated original data information
It will be apparent to those skilled in the art that the embodiments of the present application may be implemented in software and/or hardware. "Unit" and "module" in this specification refer to software and/or hardware capable of performing a specific function, either alone or in combination with other components, such as Field programmable gate arrays (Field-Programmable Gate Array, FPGAs), integrated circuits (Integrated Circuit, ICs), etc.
The processing units and/or modules of the embodiments of the present application may be implemented by an analog circuit that implements the functions described in the embodiments of the present application, or may be implemented by software that executes the functions described in the embodiments of the present application.
Referring to fig. 3, a schematic structural diagram of an electronic device according to an embodiment of the present application is shown, where the electronic device may be used to implement the method in the embodiment shown in fig. 1. As shown in fig. 3, the electronic device 300 may include: at least one central processor 301, at least one network interface 304, a user interface 303, a memory 305, at least one communication bus 302.
Wherein the communication bus 302 is used to enable connected communication between these components.
The user interface 303 may include a Display screen (Display), a Camera (Camera), and the optional user interface 303 may further include a standard wired interface, and a wireless interface.
The network interface 304 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface), among others.
Wherein the central processor 301 may comprise one or more processing cores. The central processor 301 connects the various parts within the overall electronic device 300 using various interfaces and lines, performs various functions of the terminal 300 and processes data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 305, and invoking data stored in the memory 305. Alternatively, the central processor 301 may be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), programmable logic array (Programmable Logic Array, PLA). The central processor 301 may integrate one or a combination of several of a central processor (Central Processing Unit, CPU), an image central processor (Graphics Processing Unit, GPU), and a modem, etc. The CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing the content required to be displayed by the display screen; the modem is used to handle wireless communications. It will be appreciated that the modem may not be integrated into the cpu 301 and may be implemented by a single chip.
The Memory 305 may include a random access Memory (Random Access Memory, RAM) or a Read-Only Memory (Read-Only Memory). Optionally, the memory 305 includes a non-transitory computer readable medium (non-transitory computer-readable storage medium). Memory 305 may be used to store instructions, programs, code, sets of codes, or sets of instructions. The memory 305 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the above-described respective method embodiments, etc.; the storage data area may store data or the like referred to in the above respective method embodiments. The memory 305 may also optionally be at least one storage device located remotely from the aforementioned central processor 301. As shown in fig. 3, an operating system, a network communication module, a user interface module, and program instructions may be included in the memory 305, which is a type of computer storage medium.
In the electronic device 300 shown in fig. 3, the user interface 303 is mainly used for providing an input interface for a user, and acquiring data input by the user; and the central processor 301 may be used to invoke a distributed storage application of user raw data in a flexible attendant scenario stored in the memory 305, and specifically perform the following operations:
when local original data information is newly added in a first distributed node, obtaining aging information corresponding to the local original data information, and determining first region information of the first distributed node;
broadcasting the local original data information in a preset peer-to-peer network, and determining each second distributed node which receives the local original data information;
and selecting a preset number of third distributed nodes from the second distributed nodes based on the first region information, determining the storage time of the local original data information based on the aging information, and storing the local original data information into the third distributed nodes.
The present application also provides a computer readable storage medium having stored thereon a computer program which when executed by a processor performs the steps of the above method. The computer readable storage medium may include, among other things, any type of disk including floppy disks, optical disks, DVDs, CD-ROMs, micro-drives, and magneto-optical disks, ROM, RAM, EPROM, EEPROM, DRAM, VRAM, flash memory devices, magnetic or optical cards, nanosystems (including molecular memory ICs), or any type of media or device suitable for storing instructions and/or data.
It should be noted that, for simplicity of description, the foregoing method embodiments are all expressed as a series of action combinations, but it should be understood by those skilled in the art that the present application is not limited by the order of actions described, as some steps may be performed in other order or simultaneously in accordance with the present application. Further, those skilled in the art will also appreciate that the embodiments described in the specification are all preferred embodiments, and that the acts and modules referred to are not necessarily required in the present application.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and for parts of one embodiment that are not described in detail, reference may be made to related descriptions of other embodiments.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus may be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative, such as the division of the units, merely a logical function division, and there may be additional manners of dividing the actual implementation, such as multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some service interface, device or unit indirect coupling or communication connection, electrical or otherwise.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable memory. Based on such understanding, the technical solution of the present application may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a memory, including several instructions for causing a computer device (which may be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in the embodiments of the present application. And the aforementioned memory includes: a U-disk, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing program codes.
Those of ordinary skill in the art will appreciate that all or a portion of the steps in the various methods of the above embodiments may be performed by hardware associated with a program that is stored in a computer readable memory, which may include: flash disk, read-Only Memory (ROM), random-access Memory (Random Access Memory, RAM), magnetic or optical disk, and the like.
The foregoing is merely exemplary embodiments of the present disclosure and is not intended to limit the scope of the present disclosure. That is, equivalent changes and modifications are contemplated by the teachings of this disclosure, which fall within the scope of the present disclosure. Embodiments of the present disclosure will be readily apparent to those skilled in the art from consideration of the specification and practice of the disclosure herein. This application is intended to cover any adaptations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a scope and spirit of the disclosure being indicated by the claims.
Claims (7)
1. A distributed storage method for user original data in a flexible attendant scene, the method comprising:
when local original data information is newly added in a first distributed node, obtaining aging information corresponding to the local original data information, and determining first region information of the first distributed node;
broadcasting the local original data information in a preset peer-to-peer network, and determining each second distributed node which receives the local original data information;
selecting a preset number of third distributed nodes from the second distributed nodes based on the first region information, determining storage time of the local original data information based on the aging information, and storing the local original data information into the third distributed nodes;
wherein after the local original data information is newly added in the first distributed node, the method further comprises:
generating a file identification mark based on the local original data information;
constructing a mapping relation between the local original data information and the file identification mark;
after the storing the local original data information in each third distributed node, the method further includes:
communicating each file identification identifier in each third distributed node after a first preset time;
when abnormal file identification identifiers which cannot be matched exist, generating abnormal information based on the abnormal file identification identifiers, and determining an abnormal third distributed node corresponding to the abnormal file identification identifiers;
the determining the storage time of the local original data information based on the aging information comprises the following steps:
determining a first time corresponding to the aging information, and adding the first time to a preset second time to obtain the storage time of the local original data information.
2. The method according to claim 1, wherein the method further comprises:
when an original data calling request is received, determining the file identification corresponding to the original data calling request;
and sending a call instruction to the third distributed node corresponding to the file identification mark, wherein the call instruction is used for controlling the first distributed node and the third distributed node to carry out encrypted communication.
3. The method of claim 1, wherein the selecting a preset number of third distributed nodes from the second distributed nodes based on the first zone information comprises:
sorting the second distributed nodes from near to far according to the distance from the first region information;
and sequentially selecting a preset number of third distributed nodes from the second distributed nodes according to the ordering sequence.
4. The method according to claim 1, wherein the method further comprises:
when the repeated original data information is detected in the storage time, updating the storage time based on the repeated original data information, and adjusting the third distributed nodes for storing the local original data information corresponding to the repeated original data information, so that each adjusted third distributed node is matched with the second region information corresponding to the repeated original data information.
5. A distributed storage device for user raw data in a flexible attendant scenario, the device comprising:
the acquisition module is used for acquiring ageing information corresponding to the local original data information when the local original data information is newly added in the first distributed node, and determining first region information of the first distributed node;
the broadcasting module is used for broadcasting the local original data information in a preset peer-to-peer network and determining each second distributed node which receives the local original data information;
the selecting module is used for selecting a preset number of third distributed nodes from the second distributed nodes based on the first region information, determining the storage time of the local original data information based on the aging information, and storing the local original data information into the third distributed nodes;
wherein, the acquisition module further includes:
the identification generation unit is used for generating a file identification based on the local original data information;
the mapping construction unit is used for constructing a mapping relation between the local original data information and the file identification mark;
the selecting module further includes:
the intercommunication unit is used for intercommunicating the file identification marks in the third distributed nodes every time a first preset time passes;
an exception handling unit, configured to generate exception information based on an abnormal file identification identifier when there is an abnormal file identification identifier that cannot be matched, and determine an abnormal third distributed node corresponding to the abnormal file identification identifier
The selecting module further includes:
the computing unit is used for determining the first time corresponding to the aging information, and adding the first time and the preset second time to obtain the storage time of the local original data information.
6. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the method according to any of claims 1-4 when the computer program is executed.
7. A computer readable storage medium, on which a computer program is stored, characterized in that the computer program, when being executed by a processor, implements the steps of the method according to any of claims 1-4.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111523335.8A CN114338716B (en) | 2021-12-14 | 2021-12-14 | Distributed storage method for user original data in flexible attendant scene |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111523335.8A CN114338716B (en) | 2021-12-14 | 2021-12-14 | Distributed storage method for user original data in flexible attendant scene |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114338716A CN114338716A (en) | 2022-04-12 |
CN114338716B true CN114338716B (en) | 2024-02-13 |
Family
ID=81050281
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111523335.8A Active CN114338716B (en) | 2021-12-14 | 2021-12-14 | Distributed storage method for user original data in flexible attendant scene |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114338716B (en) |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110290192A (en) * | 2019-06-18 | 2019-09-27 | 贝富(广州)新技术有限公司 | The storage of data distribution formula and data capture method, device based on block chain |
CN111262916A (en) * | 2020-01-10 | 2020-06-09 | 深圳市网心科技有限公司 | Data distributed storage method and device, storage node and storage medium |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP4635682B2 (en) * | 2005-03-29 | 2011-02-23 | ブラザー工業株式会社 | Information processing apparatus, information processing method, and information processing program |
US11327688B2 (en) * | 2020-01-13 | 2022-05-10 | Cisco Technology, Inc. | Master data placement in distributed storage systems |
-
2021
- 2021-12-14 CN CN202111523335.8A patent/CN114338716B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110290192A (en) * | 2019-06-18 | 2019-09-27 | 贝富(广州)新技术有限公司 | The storage of data distribution formula and data capture method, device based on block chain |
CN111262916A (en) * | 2020-01-10 | 2020-06-09 | 深圳市网心科技有限公司 | Data distributed storage method and device, storage node and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN114338716A (en) | 2022-04-12 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109618002B (en) | Micro-service gateway optimization method, device and storage medium | |
US9117191B2 (en) | Automatic device inventory management for different types of devices | |
CN109522362A (en) | Incomplete markets synchronous method, system and equipment based on block chain data | |
CN108737534B (en) | Block chain-based data transmission method and device and block chain system | |
CN111464353B (en) | Block link point management method, device, computer and readable storage medium | |
CN103176790A (en) | Application releasing method and application releasing system | |
CN110049087A (en) | A kind of reliability verification method, system, device and the equipment of alliance's chain | |
CN111698315B (en) | Data processing method and device for block and computer equipment | |
JP6201039B2 (en) | Communication system and communication method | |
CN107995013B (en) | Customer service distribution method and device | |
US20150156087A1 (en) | Method For Acquiring Monitoring Data and System Thereof, Task Distribution Server and Agent | |
JP6647410B2 (en) | Data storage method, non-volatile computer storage medium, electronic device, open-ended entity and base station | |
EP2985730A1 (en) | Method and device for partially-upgrading | |
CN110827000A (en) | Conference room reservation method and device | |
WO2019061663A1 (en) | Method for optimizing wi-fi hotspot deployment, server and storage medium | |
CN112395341B (en) | Federal learning management method and system based on federal cloud cooperation network | |
CN103810010A (en) | Information processing method and first electronic device terminal | |
CN110597913A (en) | Transaction information tracking method, device, system, storage medium and computer equipment | |
CN114338716B (en) | Distributed storage method for user original data in flexible attendant scene | |
CN113506100A (en) | Alliance link data processing method and device, computer equipment and storage medium | |
CN110708383B (en) | Network connection method of block chain node and related equipment | |
CN105335362B (en) | The processing method and system of real time data, instant disposal system for treating | |
CN110636149B (en) | Remote access method, device, router and storage medium | |
CN110764838B (en) | Service model loading method and system, electronic equipment and storage medium | |
CN106790354A (en) | A kind of communication means and its device of anti-data congestion |
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 |