CN110297959A - Date storage method, device, storage medium and Edge Server - Google Patents
Date storage method, device, storage medium and Edge Server Download PDFInfo
- Publication number
- CN110297959A CN110297959A CN201910433258.3A CN201910433258A CN110297959A CN 110297959 A CN110297959 A CN 110297959A CN 201910433258 A CN201910433258 A CN 201910433258A CN 110297959 A CN110297959 A CN 110297959A
- Authority
- CN
- China
- Prior art keywords
- data
- classification
- target
- preset
- stored
- 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.)
- Withdrawn
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
- G06F16/906—Clustering; Classification
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention discloses a kind of date storage method, device, storage medium and Edge Servers, this method comprises: obtaining the data to be stored in central server;Classify according to preset data classification to data to be stored, obtains the corresponding preliminary classification data of each preset data classification;Calculate the first local calling frequency of each preliminary classification data;The described first local calling highest preliminary classification data of frequency are chosen as target classification data, target classification data include multiple target packets;Calculate the second local calling frequency of each target packet;The corresponding default designated storage area of target classification data is searched, each target packet is stored according to preset rules by default designated storage area according to the second local calling frequency.Make to call the higher target classification data of frequency that there is certain memory space on Edge Server, be conducive to reply user demand by the way that default designated storage area is arranged based on big data.
Description
Technical field
The present invention relates to the technical field of big data more particularly to a kind of date storage method, device, storage medium and sides
Edge server.
Background technique
Cloud computing is the unified management of computing resources and scheduling that will be largely connected to the network, and user is by network with on-demand side
Resource needed for formula obtains and service, but as data are more and more, higher and higher to requirement of real-time, cloud computing is very
More occasions are unable to satisfy requirement.Similar invoice borrows this data and borrows product, needs to calculate 100 based on mass data even more
More various dimension indexs, because when client's primary dcreening operation, it is relatively high to response time requirement, if whole detailed datas
If being transmitted to cloud data center and calculating, overlong time is expended, and can be affected by network fluctuation.
Currently, to shorten the duration that user obtains service, it can be by using edge calculations (Edge Computing)
Mode shortens response delay, typically, realize edge calculations network include central server and with it is described in it is genuinely convinced
Multiple Edge Servers of business device connection, in this way, when user needs data service, by configuring independence for Edge Server
The work for completing partial data processing, the path for enabling to data to transmit are shortened, are taken so as to shorten user
The response delay of business.
However, be limited to the data storage capacity of Edge Server, according to the data deficiencies on Edge Server with reality
Now to the service of user in the case where, Edge Server there is still a need for by central server obtain data, will increase user in this way
Obtain the response delay of service.After Edge Server is filled with data, need by way of being manually arranged to Edge Server
The data of middle storage are deployed and are removed, and cause the data of edge server storage not to be able to satisfy user demand, while can mention
The cost that height safeguards Edge Server.Therefore, in Edge Server storing data allotment low efficiency, lead to not meet use
Family demand is a technical problem to be solved urgently.
Above content is only used to facilitate the understanding of the technical scheme, and is not represented and is recognized that above content is existing skill
Art.
Summary of the invention
The main purpose of the present invention is to provide a kind of date storage method, device, storage medium and Edge Server, purports
In the allotment low efficiency for solving storing data in Edge Server in the prior art, the technical issues of being unable to satisfy user demand.
To achieve the above object, the present invention provides a kind of date storage method, and the date storage method includes following step
It is rapid:
Obtain the data to be stored in central server;
Classify according to preset data classification to the data to be stored, it is corresponding to obtain each preset data classification
Preliminary classification data;
Based on the number that each preliminary classification data are called in preset duration, each preliminary classification data are calculated
First local call frequency;
The described first local calling highest preliminary classification data of frequency are chosen as target classification data, the target point
Class data include multiple target packets;
Based on the number that each target packet is called in the preset duration, each target packet is calculated
Second local call frequency;
The corresponding default designated storage area of the target classification data is searched, it will according to the described second local calling frequency
Each target packet is stored in the default designated storage area according to preset rules.
Preferably, described to classify according to preset data classification to the data to be stored, obtain each preset data class
Not corresponding preliminary classification data, comprising:
Classified according to preset data classification to the data to be stored by support vector machines multi-classification algorithm, is obtained
The corresponding preliminary classification data of each preset data classification.
Preferably, it is described by support vector machines multi-classification algorithm according to preset data classification to the data to be stored into
Row classification, obtains the corresponding preliminary classification data of each preset data classification, comprising:
Extract the current signature data of the data to be stored;
Using the root node in preset binary tree structure data as present node;
Obtain current hyperplane formula corresponding with the present node;
It brings the current signature data into the current hyperplane formula, obtains division result;
The child node of the present node is chosen from the binary tree structure data according to the division result;
Using the child node of selection as new present node, and it is corresponding with the present node current to return to the acquisition
The step of hyperplane formula, until the present node be leaf node when, using the corresponding data packet of the leaf node as
Preliminary classification data.
Preferably, described to search the corresponding default designated storage area of the target classification data, according to described second
Call frequency that each target packet is stored in the default designated storage area according to preset rules in ground, comprising:
Each target packet is ranked up from high to low according to the described second local calling frequency;
The corresponding default designated storage area of the target classification data is searched, by each target packet according to described
Sequence from high to low, is successively stored in the default designated storage area.
Preferably, described to search the corresponding default designated storage area of the target classification data, by each number of targets
It sorts from high to low, is successively stored in after the default designated storage area, the date storage method according to described according to packet
Further include:
Judge whether the default designated storage area is filled with;
If so, by each target packet of the default designated storage area according to it is described sequence by height to
It is low, successively it is stored in default free core pool domain.
Preferably, described if so, by each target packet of the default designated storage area according to institute
It states sequence from high to low, is successively stored in after default free core pool domain, the date storage method further include:
The data cover instruction for receiving the default free core pool domain, extracts current from data cover instruction
Classification data;
The target packet that will be preset described in the current class data cover in the domain of free core pool.
Preferably, the number being called in preset duration based on each preliminary classification data is calculated each described
The first of preliminary classification data is local to call frequency, comprising:
Statistics is in preset duration, the called number of the data packet of each preliminary classification data;
Based on each preliminary classification data in preset duration be called number, by the number and it is described default when
It is long to carry out division arithmetic, obtain the first local calling frequency of each preliminary classification data.
In addition, to achieve the above object, the present invention also proposes that a kind of Edge Server, the Edge Server include storage
Device, processor and it is stored in the data recording program that can be run on the memory and on the processor, the data are deposited
The step of storage program is arranged for carrying out date storage method as described above.
In addition, to achieve the above object, the present invention also proposes a kind of storage medium, data are stored on the storage medium
The step of storage program, the data recording program realizes date storage method as described above when being executed by processor.
In addition, to achieve the above object, the present invention also proposes a kind of data storage device, the data storage device packet
It includes:
Module is obtained, for obtaining the data to be stored in central server;
Categorization module obtains each preset data for classifying according to preset data classification to the data to be stored
The corresponding preliminary classification data of classification;
Calculate module, the number for being called in preset duration based on each preliminary classification data calculates each institute
State the first local calling frequency of preliminary classification data;
Module is chosen, for choosing the described first local calling highest preliminary classification data of frequency as target classification number
According to the target classification data include multiple target packets;
The measuring and calculating module is also used to the number being called in the preset duration based on each target packet,
Calculate the second local calling frequency of each target packet;
Memory module, for searching the corresponding default designated storage area of the target classification data, according to described second
It is local to call frequency that each target packet is stored in the default designated storage area according to preset rules.
In the present invention, by obtaining the data to be stored in central server, according to preset data classification to described wait deposit
Storage data are classified, and the corresponding preliminary classification data of each preset data classification are obtained, and are based on each preliminary classification number
According to the number being called in preset duration, calculate each preliminary classification data first it is local call frequency, described in selection
For the first local calling highest preliminary classification data of frequency as target classification data, the target classification data include multiple mesh
Data packet is marked, based on the number that each target packet is called in the preset duration, calculates each target data
The second of packet is local to call frequency, the corresponding default designated storage area of the target classification data is searched, according to described second
It is local to call frequency that each target packet is stored in the default designated storage area according to preset rules, based on big number
According to making that the higher target classification data of frequency is called to have one on Edge Server by the way that default designated storage area is arranged
Fixed memory space is conducive to reply user demand.
Detailed description of the invention
Fig. 1 is the structural schematic diagram of the Edge Server for the hardware running environment that the embodiment of the present invention is related to;
Fig. 2 is the flow diagram of date storage method first embodiment of the present invention;
Fig. 3 is the flow diagram of date storage method second embodiment of the present invention;
Fig. 4 is the flow diagram of date storage method 3rd embodiment of the present invention;
Fig. 5 is the structural block diagram of data storage device first embodiment of the present invention.
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
Specific embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
Referring to Fig.1, Fig. 1 is the Edge Server structural representation for the hardware running environment that the embodiment of the present invention is related to
Figure.
As shown in Figure 1, the Edge Server may include: processor 1001, such as central processing unit (Central
Processing Unit, CPU), communication bus 1002, user interface 1003, network interface 1004, memory 1005.Wherein,
Communication bus 1002 is for realizing the connection communication between these components.User interface 1003 may include display screen
(Display), optional user interface 1003 can also include standard wireline interface and wireless interface, for user interface 1003
Wireline interface in the present invention can be USB interface.Network interface 1004 optionally may include the wireline interface, wireless of standard
Interface (such as Wireless Fidelity (WIreless-FIdelity, WI-FI) interface).Memory 1005 can be the arbitrary access of high speed
Memory (Random Access Memory, RAM) memory, is also possible to stable memory (Non-volatile
Memory, NVM), such as magnetic disk storage.Memory 1005 optionally can also be the storage independently of aforementioned processor 1001
Device.
It, can be with it will be understood by those skilled in the art that structure shown in Fig. 1 does not constitute the restriction to Edge Server
Including perhaps combining certain components or different component layouts than illustrating more or fewer components.
As shown in Figure 1, as may include that operating system, network are logical in a kind of memory 1005 of computer storage medium
Believe module, Subscriber Interface Module SIM and data recording program.
In Edge Server shown in Fig. 1, network interface 1004 is mainly used for connecting background server, with the backstage
Server carries out data communication;User interface 1003 is mainly used for connecting user equipment;The Edge Server passes through processor
The data recording program stored in 1001 calling memories 1005, and execute date storage method provided in an embodiment of the present invention.
Based on above-mentioned hardware configuration, the embodiment of date storage method of the present invention is proposed.
It is the flow diagram of date storage method first embodiment of the present invention referring to Fig. 2, Fig. 2, proposes data of the present invention
Storage method first embodiment.
In the first embodiment, the date storage method the following steps are included:
Step S10: the data to be stored in central server is obtained.
It should be understood that the executing subject of the present embodiment is the Edge Server.In the fields such as financial service, user
The timeliness income that can be obtained and the response delay that user obtains service are closely related.To shorten the duration that user obtains service,
Response delay can be shortened by using the mode of edge calculations (Edge Computing), wherein realize edge calculations
Network includes central server and multiple Edge Servers for connecting with the central server, in this way, needing to count in user
When according to service, by configuring Edge Server to the work of complete independently partial data processing, data is enabled to transmit
Path is shortened, so as to shorten the response delay that user obtains service.
It, can be with it should be noted that for convenience of data interaction between the Edge Server and the central server
The data being stored on the central server are subjected to subpackage processing and classification processing, to obtain multiple data packets and more
The corresponding preliminary classification data of a data packet, the Edge Server described in this way can be as unit of data packet to the center service
Data on device are obtained.It specifically, can be by a file, a file, a compressed package or a database
Deng as a data packet.
Step S20: classifying to the data to be stored according to preset data classification, obtains each preset data classification point
Not corresponding preliminary classification data.
It will be appreciated that not including the case where classification information from the data to be stored that the central server obtains
Under, it can voluntarily be classified to the data to be stored by Edge Server, be can be set to number to be stored described in calling
Classify according to according to preset data classification, it specifically, can be using support vector machines (support Vector Mac, abbreviation
SVM) sorting algorithms such as multi-classification algorithm realize the classification to the data to be stored.
In the concrete realization, the preset data classification refers to the data category of preset data packet, described default
Data category specifically can be according to the difference of business be related to, alternatively, the difference etc. in the corresponding area of data is divided.Such as:
The data for being related to loan transaction and the data for being related to stock business can be preset as different data categories, it can also be by North China
The data in area and the data of South China are preset as different data categories.
Step S30: the number being called in preset duration based on each preliminary classification data is calculated each described initial
The first of classification data is local to call frequency.
It should be noted that the preset data classification is generally according to needing to be set as multiple, each preset data classification
Data packet can be multiple.The described first local any data packet for calling frequency as corresponding preset data classification is in local quilt
The sum frequency of calling, since the executing subject of this step is Edge Server, therefore the described first local calling frequency is corresponding
The sum frequency that any data packet of preset data classification is called in the Edge Server.For example, in preset duration T
It is interior, in the data packet for the preliminary classification data A that the Edge Server calls, including data packet A1, data packet A2 and data packet
A3, and call number is respectively C1, C2 and C3, the described first local calling frequency is (C1+C2+C3)/T.It is genuinely convinced from described
The classification information and identification information that can specifically include the data to be stored in the data to be stored that business device obtains, according to each data
The classification information of packet can count the first local calling frequency of each preset data classification, according to the mark of each data packet
Know information, the second local calling frequency of each data packet itself can be counted.In the present embodiment, the step S30, packet
Include: statistics is in preset duration, the called number of the data packet of each preliminary classification data;Based on each preliminary classification
The number and the preset duration are carried out division arithmetic by the number that data are called in preset duration, are obtained each described
The first of preliminary classification data is local to call frequency.
Step S40: the described first local calling highest preliminary classification data of frequency are chosen as target classification data, institute
Stating target classification data includes multiple target packets.
It should be understood that in order to avoid being limited to the data storage capacity of Edge Server, according on Edge Server
Data deficiencies to realize the service to user in the case where, Edge Server there is still a need for by central server obtain data,
It will increase the response delay that user obtains service in this way.It can be by the described first local calling frequency, by the described first local tune
It is the target classification data with the highest preliminary classification data decimation of frequency, so that calling the highest data of frequency can
It is stored on the Edge Server, shortens the response delay that user obtains data, meet the needs of users.
Step S50: the number being called in the preset duration based on each target packet calculates each mesh
Mark the second local calling frequency of data packet.
In the concrete realization, described second it is local to call frequency be each target packet in locally called sum frequency,
Since the executing subject of this step is Edge Server, therefore the described second local calling frequency is each target packet on the side
The called sum frequency of edge server.For example, it is assumed that preset data classification A is target classification data, in preset duration T
It is interior, belong to the called number of the target packet A1, target packet A2 and target packet A3 of the target classification data
Respectively C1, C2 and C3, it is possible thereby to which the second of target packet A1, target packet A2 and target packet A3 is calculated
Local calling frequency is respectively C1/T, C2/T and C3/T.
Step S60: searching the corresponding default designated storage area of the target classification data, according to the described second local tune
Each target packet is stored in the default designated storage area according to preset rules with frequency.
It will be appreciated that the Edge Server as executing subject should be provided with multiple default designated storage areas and
One default free core pool domain, the multiple default designated storage area belong to different preset data classes to corresponding storage
The data packet correspondence of other data packet, different preset data classifications is stored to each designated storage area.It usually pre-establishes each
Corresponding relationship between default designated storage area and each preset data classification is searched and the target from the corresponding relationship
The corresponding default designated storage area of classification data then presses each target packet according to the described second local calling frequency
The default designated storage area of the target classification data is stored according to preset rules.The default usual root in free core pool domain
According to needing to be deployed to the described first local calling highest preset data classification of frequency, so as to the described first local calling
The data of the highest preset data classification of frequency distribute more memory spaces.For example, as the side of executing subject
Edge server can be preset with the first designated storage area Q1, the second designated storage area Q2 and free core pool domain Q0, wherein
First designated storage area Q1 and the second designated storage area Q2 respectively correspond storing initial classification data A and preliminary classification data
The data packet of B, the free core pool domain Q0 can according to need storing initial classification data A's or preliminary classification data B
Data packet.
In the present embodiment, by obtain central server in data to be stored, according to preset data classification to it is described to
Storing data is classified, and the corresponding preliminary classification data of each preset data classification are obtained, and is based on each preliminary classification
The number that data are called in preset duration calculates the first local calling frequency of each preliminary classification data, chooses institute
The first local calling highest preliminary classification data of frequency are stated as target classification data, the target classification data include multiple
Target packet calculates each number of targets based on the number that each target packet is called in the preset duration
According to the second local calling frequency of packet, according to the described second local calling frequency by each target packet according to preset rules
It is stored in the default designated storage area of the target classification data, is based on big data, by the way that default designated storage area is arranged,
Make to call the higher target classification data of frequency that there is certain memory space on Edge Server, being conducive to reply user needs
It asks.
It is the flow diagram of date storage method second embodiment of the present invention referring to Fig. 3, Fig. 3, based on shown in above-mentioned Fig. 2
First embodiment, propose the second embodiment of date storage method of the present invention.
In a second embodiment, the step S20, comprising:
Step S201: the data to be stored is carried out according to preset data classification by support vector machines multi-classification algorithm
Classification, obtains the corresponding preliminary classification data of each preset data classification.
It should be understood that support vector machines (support Vector Mac, abridge SVM) algorithm is initially for two-value classification
Problem design, when handling multi-class problem, it is necessary to construct suitable multi classifier.Currently, construction SVM multi classifier
Method there are two main classes: one kind is direct method, is directly modified on objective function, by the parametric solution of multiple classifying faces
It is merged into an optimization problem, disposably realizes multicategory classification by solving the optimization problem.Another kind of is indirect method,
Mainly the construction of multi-categorizer is realized by combining multiple two classifiers.
In a second embodiment, it can be achieved by the steps of the classification to data packet in the data to be stored, namely
The step S201, comprising: extract the current signature data of the data to be stored;It will be in preset binary tree structure data
Root node is as present node;Obtain current hyperplane formula corresponding with the present node;By the current signature data
It brings the current hyperplane formula into, obtains division result;It is selected from the binary tree structure data according to the division result
Take the child node of the present node;Using the child node of selection as new present node, and returns to the acquisition and work as with described
The step of front nodal point corresponding current hyperplane formula, until when the present node is leaf node, by the leaf node
Corresponding data packet is as preliminary classification data.Specifically, the hyperplane formula of each node can be default.It can be by building in advance
Corresponding relationship between each node and hyperplane formula is found, is searched from the corresponding relationship corresponding with the present node described
Current hyperplane formula.
In a second embodiment, by support vector machines multi-classification algorithm according to preset data classification to the number to be stored
According to classifying, the corresponding preliminary classification data of each preset data classification are obtained, so as to according to preset data classification pair
Data to be stored carries out classification storage, can by the way that the corresponding default designated storage area of each preset data classification is arranged
The data packet for making each preset data classification has certain memory space on Edge Server, to be conducive to comprehensively answer
To the demand for services of user.
It is the flow diagram of date storage method 3rd embodiment of the present invention referring to Fig. 4, Fig. 4, based on shown in above-mentioned Fig. 3
Second embodiment, propose the 3rd embodiment of date storage method of the present invention.
In the third embodiment, the step S60, comprising:
Step S601: each target packet is ranked up from high to low according to the described second local calling frequency.
It should be understood that for example, it is assumed that preset data classification A is target classification data, in preset duration T, is belonged to
It is respectively in the called number of the target packet A1, target packet A2 and target packet A3 of the target classification data
C1, C2 and C3, it is possible thereby to which the second local tune of target packet A1, target packet A2 and target packet A3 is calculated
It is respectively C1/T, C2/T and C3/T with frequency, if C1 > C2 > C3, to target packet A1, target packet A2 and mesh
Mark data packet A3 is ranked up from high to low according to the described second local calling frequency as A1, A2 and A3.
Step S602: searching the corresponding default designated storage area of the target classification data, by each target data
Packet from high to low, is successively stored in the default designated storage area according to the sequence.
It will be appreciated that the Edge Server as executing subject should be provided with multiple default designated storage areas and
One default free core pool domain, the multiple default designated storage area belong to different preset data classes to corresponding storage
The data packet correspondence of other data packet, different preset data classifications is stored to each designated storage area.It is described default freely to deposit
Storage area domain generally according to being deployed, such as be deployed to described first it is local call the highest preset data classification of frequency,
So as to distribute more memory spaces to the described first local data for calling the highest preset data classification of frequency.Citing
For, the Edge Server as executing subject can be preset with the first designated storage area Q1, the second designated storage area
Domain Q2 and free core pool domain Q0, wherein the first designated storage area Q1 and the second designated storage area Q2 respectively correspond storage
The data packet of preliminary classification data A and preliminary classification data B, the free core pool domain Q0 can according to need storing initial point
The data packet of class data A or preliminary classification data B.
It should be noted that should sort from high to low according to the second local calling frequency of the target packet, successively
Each target packet is stored, during storage, should first be stored to default designated storage area, until described default
Designated storage area storage is full, then remaining target packet is stored to the default free core pool domain, until described pre-
If free core pool domain is also full by storage, the sequence of the target packet stored in the default designated storage area described in this way compared with
Height, the target data packet sequencing stored in the default free core pool domain are lower.In the present embodiment, the step S602 it
Afterwards, further includes: judge whether the default designated storage area is filled with;If so, default specify is deposited
Each target packet in storage area domain from high to low, is successively stored in default free core pool domain according to the sequence.
In the third embodiment, described if so, by each target data of the default designated storage area
Packet from high to low, is successively stored in after default free core pool domain according to the sequence, further includes:
The data cover instruction for receiving the default free core pool domain, extracts current from data cover instruction
Classification data;
The target packet that will be preset described in the current class data cover in the domain of free core pool.
In the concrete realization, when as needed by the default free core pool configuration of territory to other preset data classifications
In the case that preliminary classification data are stored, the lower target packet of sequence that is stored in the default free core pool domain
Can be by the current class data cover, and the higher target packet that sorts is able to retain on the Edge Server.
Typically, it after the Edge Server is filled with data, default is freely stored by default freely store
The data cover in region instructs, and the current class data are transmitted by data cover instruction, are realized to described
Default free core pool not in the lower target packet of sequence covering, be not stored into currently so as to make and need in the recent period
The current class data often to call are stored in the Edge Server, avoid manually to storing in the Edge Server
Data deployed and removed, reduce the maintenance cost of the Edge Server.
In the third embodiment, each target packet is arranged from high to low according to the described second local calling frequency
Sequence from high to low according to the sequence by the target packet is successively stored in the default specified of the target classification data
Storage region will be not stored to described default specified when the default designated storage area of the target classification data is filled with
Each target packet of storage region from high to low, is successively stored in default free core pool domain according to the sequence, so that adjusting
It is preferentially stored to the Edge Server with the higher target packet of frequency, reduces the response time of user's called data,
Reduce the dependence to network environment, improves the real-time of data, meet user demand.
In addition, the embodiment of the present invention also proposes a kind of storage medium, it is stored with data recording program on the storage medium,
The data recording program realizes the step of date storage method as described above when being executed by processor.
In addition, the embodiment of the present invention also proposes that a kind of data storage device, the data storage device include: referring to Fig. 5
Module 10 is obtained, for obtaining the data to be stored in central server.
It should be understood that the timeliness income and user that user can obtain obtain service in the fields such as financial service
Response delay is closely related.It, can be by using edge calculations (Edge to shorten the duration that user obtains service
Computing mode) shortens response delay, wherein realize edge calculations network include central server and with institute
Multiple Edge Servers of central server connection are stated, in this way, when user needs data service, by the way that Edge Server is matched
It is set to the work of complete independently partial data processing, the path for enabling to data to transmit is shortened, so as to shorten use
Family obtains the response delay of service.
It, can be with it should be noted that for convenience of data interaction between the Edge Server and the central server
The data being stored on the central server are subjected to subpackage processing and classification processing, to obtain multiple data packets and more
The corresponding preliminary classification data of a data packet, the Edge Server described in this way can be as unit of data packet to the center service
Data on device are obtained.It specifically, can be by a file, a file, a compressed package or a database
Deng as a data packet.
Categorization module 20 obtains each present count for classifying according to preset data classification to the data to be stored
According to the corresponding preliminary classification data of classification.
It will be appreciated that not including the case where classification information from the data to be stored that the central server obtains
Under, it can voluntarily be classified to the data to be stored by Edge Server, be can be set to number to be stored described in calling
Classify according to according to preset data classification, it specifically, can be using support vector machines (support Vector Mac, abbreviation
SVM) sorting algorithms such as multi-classification algorithm realize the classification to the data to be stored.
In the concrete realization, the preset data classification refers to the data category of preset data packet, described default
Data category specifically can be according to the difference of business be related to, alternatively, the difference etc. in the corresponding area of data is divided.Such as:
The data for being related to loan transaction and the data for being related to stock business can be preset as different data categories, it can also be by North China
The data in area and the data of South China are preset as different data categories.
Calculate module 30, the number for being called in preset duration based on each preliminary classification data, measuring and calculating is respectively
The first of the preliminary classification data is local to call frequency.
It should be noted that the preset data classification is generally according to needing to be set as multiple, each preset data classification
Data packet can be multiple.The described first local any data packet for calling frequency as corresponding preset data classification is in local quilt
The sum frequency of calling, since the executing subject of this step is Edge Server, therefore the described first local calling frequency is corresponding
The sum frequency that any data packet of preset data classification is called in the Edge Server.For example, in preset duration T
It is interior, in the data packet for the preliminary classification data A that the Edge Server calls, including data packet A1, data packet A2 and data packet
A3, and call number is respectively C1, C2 and C3, the described first local calling frequency is (C1+C2+C3)/T.It is genuinely convinced from described
The classification information and identification information that can specifically include the data to be stored in the data to be stored that business device obtains, according to each data
The classification information of packet can count the first local calling frequency of each preset data classification, according to the mark of each data packet
Know information, the second local calling frequency of each data packet itself can be counted.It is described based on each described in the present embodiment
The number that preliminary classification data are called in preset duration calculates the first local calling frequency of each preliminary classification data
Rate, comprising: statistics is in preset duration, the called number of the data packet of each preliminary classification data;Based on each described first
The number and the preset duration are carried out division arithmetic, obtained by the number that beginning classification data is called in preset duration
The first of each preliminary classification data is local to call frequency.
Module 40 is chosen, for choosing the described first local calling highest preliminary classification data of frequency as target classification
Data, the target classification data include multiple target packets.
It should be understood that in order to avoid being limited to the data storage capacity of Edge Server, according on Edge Server
Data deficiencies to realize the service to user in the case where, Edge Server there is still a need for by central server obtain data,
It will increase the response delay that user obtains service in this way.It can be by the described first local calling frequency, by the described first local tune
It is the target classification data with the highest preliminary classification data decimation of frequency, so that calling the highest data of frequency can
It is stored on the Edge Server, shortens the response delay that user obtains data, meet the needs of users.
The measuring and calculating module 30, time for being also used to be called in the preset duration based on each target packet
Number calculates the second local calling frequency of each target packet.
In the concrete realization, described second it is local to call frequency be each target packet in locally called sum frequency,
Since the executing subject of this step is Edge Server, therefore the described second local calling frequency is each target packet on the side
The called sum frequency of edge server.For example, it is assumed that preset data classification A is target classification data, in preset duration T
It is interior, belong to the called number of the target packet A1, target packet A2 and target packet A3 of the target classification data
Respectively C1, C2 and C3, it is possible thereby to which the second of target packet A1, target packet A2 and target packet A3 is calculated
Local calling frequency is respectively C1/T, C2/T and C3/T.
Memory module 50, for searching the corresponding default designated storage area of the target classification data, according to described
Each target packet is stored in the default designated storage area according to preset rules by two local calling frequencies.
It will be appreciated that the Edge Server as executing subject should be provided with multiple default designated storage areas and
One default free core pool domain, the multiple default designated storage area belong to different preset data classes to corresponding storage
The data packet correspondence of other data packet, different preset data classifications is stored to each designated storage area.It usually pre-establishes each
Corresponding relationship between default designated storage area and each preset data classification is searched and the target from the corresponding relationship
The corresponding default designated storage area of classification data then presses each target packet according to the described second local calling frequency
The default designated storage area of the target classification data is stored according to preset rules.The default usual root in free core pool domain
According to needing to be deployed to the described first local calling highest preset data classification of frequency, so as to the described first local calling
The data of the highest preset data classification of frequency distribute more memory spaces.For example, as the side of executing subject
Edge server can be preset with the first designated storage area Q1, the second designated storage area Q2 and free core pool domain Q0, wherein
First designated storage area Q1 and the second designated storage area Q2 respectively correspond storing initial classification data A and preliminary classification data
The data packet of B, the free core pool domain Q0 can according to need storing initial classification data A's or preliminary classification data B
Data packet.
In the present embodiment, by obtain central server in data to be stored, according to preset data classification to it is described to
Storing data is classified, and the corresponding preliminary classification data of each preset data classification are obtained, and is based on each preliminary classification
The number that data are called in preset duration calculates the first local calling frequency of each preliminary classification data, chooses institute
The first local calling highest preliminary classification data of frequency are stated as target classification data, the target classification data include multiple
Target packet calculates each number of targets based on the number that each target packet is called in the preset duration
According to the second local calling frequency of packet, according to the described second local calling frequency by each target packet according to preset rules
It is stored in the default designated storage area of the target classification data, is based on big data, by the way that default designated storage area is arranged,
Make to call the higher target classification data of frequency that there is certain memory space on Edge Server, being conducive to reply user needs
It asks.
In one embodiment, the categorization module 20, is also used to through support vector machines multi-classification algorithm according to present count
Classify according to classification to the data to be stored, obtains the corresponding preliminary classification data of each preset data classification.
In one embodiment, the categorization module 20 is also used to extract the current signature data of the data to be stored;It will
Root node in preset binary tree structure data is as present node;Obtain current hyperplane corresponding with the present node
Formula;It brings the current signature data into the current hyperplane formula, obtains division result;According to the division result from
The child node of the present node is chosen in the binary tree structure data;Using the child node of selection as new present node,
And the step of returning to the acquisition current hyperplane formula corresponding with the present node, until the present node is leaf
When node, using the corresponding data packet of the leaf node as preliminary classification data.
In one embodiment, the memory module 50, it is right from high to low according to the described second local calling frequency to be also used to
Each target packet is ranked up;The corresponding default designated storage area of the target classification data is searched, by each target
Data packet from high to low, is successively stored in the default designated storage area according to the sequence.
In one embodiment, the memory module 50, is also used to judge whether the default designated storage area is filled with;
If so, from high to low according to the sequence by each target packet of the default designated storage area, successively
It is stored in default free core pool domain.
In one embodiment, the data storage device further include:
Receiving module, the data cover for receiving the default free core pool domain instruct, refer to from the data cover
Current class data are extracted in order;
Overlay module, the target data for will be preset described in the current class data cover in the domain of free core pool
Packet.
In one embodiment, the measuring and calculating module 30 is also used to count in preset duration, each preliminary classification data
The called number of data packet;Based on the number that each preliminary classification data are called in preset duration, by described time
Several to carry out division arithmetic with the preset duration, obtain each preliminary classification data first locally calls frequency.
The other embodiments or specific implementation of data storage device of the present invention can refer to above-mentioned each method and implement
Example, details are not described herein again.
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row
His property includes, so that the process, method, article or the system that include a series of elements not only include those elements, and
And further include other elements that are not explicitly listed, or further include for this process, method, article or system institute it is intrinsic
Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to do
There is also other identical elements in the process, method of element, article or system.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.If listing equipment for drying
Unit claim in, several in these devices, which can be, to be embodied by the same item of hardware.Word first,
Second and the use of third etc. do not indicate any sequence, can be mark by these word explanations.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side
Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases
The former is more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words does the prior art
The part contributed out can be embodied in the form of software products, which is stored in a storage medium
(such as read-only memory mirror image (Read Only Memory image, ROM)/random access memory (Random Access
Memory, RAM), magnetic disk, CD) in, including some instructions are used so that terminal device (can be mobile phone, computer,
Server, air conditioner or network equipment etc.) execute method described in each embodiment of the present invention.
The above is only a preferred embodiment of the present invention, is not intended to limit the scope of the invention, all to utilize this hair
Equivalent structure or equivalent flow shift made by bright specification and accompanying drawing content is applied directly or indirectly in other relevant skills
Art field, is included within the scope of the present invention.
Claims (10)
1. a kind of date storage method, which is characterized in that the date storage method the following steps are included:
Obtain the data to be stored in central server;
Classify according to preset data classification to the data to be stored, it is corresponding initial to obtain each preset data classification
Classification data;
Based on the number that each preliminary classification data are called in preset duration, the of each preliminary classification data is calculated
One local calling frequency;
The described first local calling highest preliminary classification data of frequency are chosen as target classification data, the target classification number
According to including multiple target packets;
Based on the number that each target packet is called in the preset duration, the of each target packet is calculated
Two local calling frequencies;
The corresponding default designated storage area of the target classification data is searched, locally calls frequency by each institute according to described second
It states target packet and is stored in the default designated storage area according to preset rules.
2. date storage method as described in claim 1, which is characterized in that it is described according to preset data classification to described wait deposit
Storage data are classified, and the corresponding preliminary classification data of each preset data classification are obtained, comprising:
Classified according to preset data classification to the data to be stored by support vector machines multi-classification algorithm, is obtained each pre-
If the corresponding preliminary classification data of data category.
3. date storage method as claimed in claim 2, which is characterized in that described to be pressed by support vector machines multi-classification algorithm
Classify according to preset data classification to the data to be stored, obtains the corresponding preliminary classification number of each preset data classification
According to, comprising:
Extract the current signature data of the data to be stored;
Using the root node in preset binary tree structure data as present node;
Obtain current hyperplane formula corresponding with the present node;
It brings the current signature data into the current hyperplane formula, obtains division result;
The child node of the present node is chosen from the binary tree structure data according to the division result;
Using the child node of selection as new present node, and it is corresponding with the present node current super flat to return to the acquisition
The step of face formula, until when the present node is leaf node, using the corresponding data packet of the leaf node as initial
Classification data.
4. date storage method as described in claim 1, which is characterized in that the lookup target classification data are corresponding
Each target packet is stored in by default designated storage area according to the described second local calling frequency according to preset rules
The default designated storage area, comprising:
Each target packet is ranked up from high to low according to the described second local calling frequency;
The corresponding default designated storage area of the target classification data is searched, by each target packet according to the sequence
From high to low, successively it is stored in the default designated storage area.
5. date storage method as claimed in claim 4, which is characterized in that the lookup target classification data are corresponding
Default designated storage area from high to low according to the sequence by each target packet is successively stored in the default finger
After determining storage region, the date storage method further include:
Judge whether the default designated storage area is filled with;
If so, from high to low according to the sequence by each target packet of the default designated storage area,
Successively it is stored in default free core pool domain.
6. date storage method as claimed in claim 5, which is characterized in that described if so, by not stored to described default
Each target packet of designated storage area according to it is described sequence from high to low, be successively stored in default free core pool domain it
Afterwards, the date storage method further include:
The data cover instruction for receiving the default free core pool domain, extracts current class from data cover instruction
Data;
The target packet that will be preset described in the current class data cover in the domain of free core pool.
7. such as date storage method of any of claims 1-6, which is characterized in that described based on each described initial point
The number that class data are called in preset duration calculates the first local calling frequency of each preliminary classification data, comprising:
Statistics is in preset duration, the called number of the data packet of each preliminary classification data;
Based on the number that each preliminary classification data are called in preset duration, by the number and the preset duration into
Row division arithmetic obtains the first local calling frequency of each preliminary classification data.
8. a kind of Edge Server, which is characterized in that the Edge Server includes: memory, processor and is stored in described
On memory and the data recording program that can run on the processor, the data recording program are executed by the processor
The step of date storage method of the Shi Shixian as described in any one of claims 1 to 7.
9. a kind of storage medium, which is characterized in that be stored with data recording program on the storage medium, the data store journey
The step of date storage method as described in any one of claims 1 to 7 is realized when sequence is executed by processor.
10. a kind of data storage device, which is characterized in that the data storage device includes:
Module is obtained, for obtaining the data to be stored in central server;
Categorization module obtains each preset data classification for classifying according to preset data classification to the data to be stored
Corresponding preliminary classification data;
Calculate module, the number for being called in preset duration based on each preliminary classification data is calculated each described first
The first of beginning classification data is local to call frequency;
Choose module, for choose described first it is local call the highest preliminary classification data of frequency as target classification data,
The target classification data include multiple target packets;
The measuring and calculating module is also used to the number being called in the preset duration based on each target packet, measuring and calculating
The second of each target packet is local to call frequency;
Memory module, it is local according to described second for searching the corresponding default designated storage area of the target classification data
Call frequency that each target packet is stored in the default designated storage area according to preset rules.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910433258.3A CN110297959A (en) | 2019-05-22 | 2019-05-22 | Date storage method, device, storage medium and Edge Server |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910433258.3A CN110297959A (en) | 2019-05-22 | 2019-05-22 | Date storage method, device, storage medium and Edge Server |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110297959A true CN110297959A (en) | 2019-10-01 |
Family
ID=68027077
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910433258.3A Withdrawn CN110297959A (en) | 2019-05-22 | 2019-05-22 | Date storage method, device, storage medium and Edge Server |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110297959A (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111194055A (en) * | 2019-12-30 | 2020-05-22 | 广东博智林机器人有限公司 | Data storage frequency processing method and device, electronic equipment and storage medium |
CN113449036A (en) * | 2021-06-29 | 2021-09-28 | 未鲲(上海)科技服务有限公司 | Intelligent data storage method and device, computer equipment and storage medium |
CN115204158A (en) * | 2022-07-20 | 2022-10-18 | 平安科技(深圳)有限公司 | Data isolation application method and device, electronic equipment and storage medium |
-
2019
- 2019-05-22 CN CN201910433258.3A patent/CN110297959A/en not_active Withdrawn
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111194055A (en) * | 2019-12-30 | 2020-05-22 | 广东博智林机器人有限公司 | Data storage frequency processing method and device, electronic equipment and storage medium |
CN111194055B (en) * | 2019-12-30 | 2022-09-09 | 广东博智林机器人有限公司 | Data storage frequency processing method and device, electronic equipment and storage medium |
CN113449036A (en) * | 2021-06-29 | 2021-09-28 | 未鲲(上海)科技服务有限公司 | Intelligent data storage method and device, computer equipment and storage medium |
CN115204158A (en) * | 2022-07-20 | 2022-10-18 | 平安科技(深圳)有限公司 | Data isolation application method and device, electronic equipment and storage medium |
CN115204158B (en) * | 2022-07-20 | 2023-05-26 | 平安科技(深圳)有限公司 | Data isolation application method and device, electronic equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105103506B (en) | For the method and system for the non-homogeneous bandwidth request allocation bandwidth in system for cloud computing | |
CN109167835A (en) | A kind of physics resource scheduling method and system based on kubernetes | |
CN110297959A (en) | Date storage method, device, storage medium and Edge Server | |
US11250250B2 (en) | Pedestrian retrieval method and apparatus | |
JP2020507135A (en) | Exclusive agent pool distribution method, electronic device, and computer-readable storage medium | |
CN106201661A (en) | Method and apparatus for elastic telescopic cluster virtual machine | |
CN104484233B (en) | A kind of resource allocation methods | |
CN108337358A (en) | Using method for cleaning, device, storage medium and electronic equipment | |
CN106569898A (en) | Resource distribution method and mobile terminal | |
CN110502321A (en) | A kind of resource regulating method and system | |
CN108205570A (en) | A kind of data detection method and device | |
CN112764920A (en) | Edge application deployment method, device, equipment and storage medium | |
CN108764319A (en) | A kind of sample classification method and apparatus | |
CN108897626A (en) | Resource scheduling method and server | |
CN114091941A (en) | Task allocation method and device, electronic equipment and storage medium | |
CN110086675A (en) | Construction method, equipment and the computer readable storage medium of service chaining | |
CN114020455B (en) | Arranging method and device of service functions and computer readable storage medium | |
CN108537291A (en) | A kind of sample classification method and apparatus | |
CN107943423A (en) | The management method and computer-readable recording medium of storage resource in cloud system | |
CN109661671A (en) | Improvement using boundary bitmap to image classification | |
CN107193940A (en) | Big data method for optimization analysis | |
CN112214321B (en) | Node selection method and device for newly added micro service and micro service management platform | |
EP3806548B1 (en) | Method for optimising the amount of network resources and the number of services that are likely to use said resources | |
CN109582439A (en) | DCN dispositions method, device, equipment and computer readable storage medium | |
CN109191185A (en) | A kind of visitor's heap sort method and system |
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 | ||
WW01 | Invention patent application withdrawn after publication | ||
WW01 | Invention patent application withdrawn after publication |
Application publication date: 20191001 |