CN109981739A - Session data processing method, device, equipment and medium based on block chain - Google Patents
Session data processing method, device, equipment and medium based on block chain Download PDFInfo
- Publication number
- CN109981739A CN109981739A CN201910137178.3A CN201910137178A CN109981739A CN 109981739 A CN109981739 A CN 109981739A CN 201910137178 A CN201910137178 A CN 201910137178A CN 109981739 A CN109981739 A CN 109981739A
- Authority
- CN
- China
- Prior art keywords
- session
- block
- session data
- block chain
- data processing
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/14—Session management
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer And Data Communications (AREA)
Abstract
The invention discloses a kind of session data processing method based on block chain, device, computer equipment and storage mediums, reduce the influence lost due to node server delay machine bring session data, improve session data validity, guarantee that session data is available.Method part includes: that the session data processing method based on block chain is applied in the node server of session data processing system, node server is any one in application server cluster, each node server of application server cluster is stored with block chain, method includes: to determine whether session request is session request for the first time when receiving the session request that user is sent by browser;If it is determined that session request is session request for the first time, then the corresponding session of session request session data generated is obtained;It generates and unique corresponding first session identification of session;Block is generated according to session data and the first session identification;Block is broadcasted to block chain.
Description
Technical field
The present invention relates to block chain technical field more particularly to a kind of session data processing methods based on block chain, dress
It sets, equipment and medium.
Background technique
Session, in a computer, especially in network application, referred to as " session ".Session is for storing spy
Attribute needed for determining user conversation and configuration information, above-mentioned attribute or configuration information are referred to as session data, in this way, when using
When jumping between the Web page of family service server provided by application server, session data will not lose, and make
It obtains and is always existed down in entire user conversation.In traditional scheme, proposes in a kind of session settlement mechanism, facing
When application server cluster, session data caused by the session that each application server is established all are to concentrate to save
In a session management server, that is, it is not held in the machine, and has been placed on another centrally stored place.
In this way, whether which platform application server, when application server uses session data, and it is centrally stored from this
It is read in the session management server of session data.However, but the failures such as session management server generation delay machine
When, it will lead to the session loss of data of application server, influence making for session data for application server cluster
With.
Summary of the invention
The embodiment of the present invention provides a kind of session data processing method based on block chain, device, computer equipment and deposits
Storage media, by way of block chain, realizing each node server and capable of sharing above-mentioned session data and data can not be repaired
It is modified, the influence lost due to node server delay machine bring session data is reduced, session data validity is improved, guarantees meeting
It is available to talk about data.
A kind of session data processing method based on block chain, the session data processing method application based on block chain
In the node server of session data processing system, the session data processing system includes application server cluster, described
Node server is any one in the application server cluster, each node server of the application server cluster
It is stored with block chain, which comprises
When receiving the session request that user is sent by browser, determine whether the session request is session for the first time
Request;
If it is determined that the session request is session request for the first time, then it is generated to obtain the corresponding session of the session request
Session data;
It generates and unique corresponding first session identification of the session;
Block is generated according to the session data and the first session identification;
The block is broadcasted to the block chain.
A kind of session data processing unit based on block chain, the session data processing unit application based on block chain
In the node server of session data processing system, the session data processing system includes application server cluster, described
Node server is any one in the application server cluster, each node server of the application server cluster
It is stored with block chain, the session data processing unit based on block chain includes:
Determining module, for determining the session request when receiving the session request that user is sent by browser
It whether is session request for the first time;
Module is obtained, if determining the session request for session request for the first time, described in acquisition for the determining module
The corresponding session of session request session data generated;
First generation module, for generating and unique corresponding first session identification of the session;
Second generation module, the session data and described first for being obtained according to the acquisition module generate mould
The first session identification that block generates generates block;
Broadcast module, the block for generating second generation module are broadcasted to the block chain.
A kind of computer equipment, including memory, processor and storage are in the memory and can be in the processing
The computer program run on device, the processor realize the above-mentioned session number based on block chain when executing the computer program
According to processing method.
A kind of computer readable storage medium, the computer-readable recording medium storage have computer program, the meter
Calculation machine program realizes the above-mentioned session data processing method based on block chain when being executed by processor.
The side that the above-mentioned session data processing method based on block chain, device, computer equipment and storage medium are realized
In case, by way of block chain, realizing each node server and capable of sharing above-mentioned session data and data can not be modified
Property, the influence lost due to node server delay machine bring session data is reduced, session data validity is improved, guarantees session
Data are available.
Detailed description of the invention
In order to illustrate the technical solution of the embodiments of the present invention more clearly, below by institute in the description to the embodiment of the present invention
Attached drawing to be used is needed to be briefly described, it should be apparent that, the accompanying drawings in the following description is only some implementations of the invention
Example, for those of ordinary skill in the art, without any creative labor, can also be according to these attached drawings
Obtain other attached drawings.
Fig. 1 is a system architecture schematic diagram of the session data processing system in the present invention based on block chain;
Fig. 2 is a kind of session data processing method one embodiment flow diagram based on block chain in the present invention;
Fig. 3 is another embodiment flow diagram of a kind of session data processing method based on block chain in the present invention;
Fig. 4 is another embodiment flow diagram of a kind of session data processing method based on block chain in the present invention;
Fig. 5 is another embodiment flow diagram of a kind of session data processing method based on block chain in the present invention;
Fig. 6 is another embodiment flow diagram of a kind of session data processing method based on block chain in the present invention;
Fig. 7 is another embodiment flow diagram of a kind of session data processing method based on block chain in the present invention;
Fig. 8 is a kind of one example structure schematic diagram of session data processing unit based on block chain in the present invention;
Fig. 9 is an example structure schematic diagram of computer equipment in the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description, it is clear that described embodiments are some of the embodiments of the present invention, instead of all the embodiments.Based on this hair
Embodiment in bright, every other implementation obtained by those of ordinary skill in the art without making creative efforts
Example, shall fall within the protection scope of the present invention.
Before the embodiment of the present invention is described, first to the present embodiments relate to the term arrived, application scenarios into
Row is simple to be introduced:
Please refer to a system architecture schematic diagram of the session data processing system shown in FIG. 1 based on block chain, the session
Data processing system is used to carry out the shared system of the session data between node server and node server, the session number
It include multiple node servers according to processing system, what above-mentioned multiple node servers referred in application server cluster each answers
Use server.Each node server can work normally, and each node server can be established between client
Session generates session data, and realizes sharing between above-mentioned session data by block chain.For example, when session data is handled
When generating session data between any one node server and client of system, other nodes of session data processing system
Server stores the session data of above-mentioned generation as shared data, so that the session data processing system is complete
The session data of portion's node storage is consistent.It is further to note that above-mentioned application server refers specifically to mention for user
For the server of web services.In session data processing method provided in an embodiment of the present invention based on block chain, can be applicable to as
In node server in system architecture shown in Fig. 1, wherein client is led to by network and each node server
Letter.Wherein, above-mentioned client can be, but not limited to various personal computers, laptop, smart phone, tablet computer and just
The client of session can be established with each node server by taking formula wearable device etc., it is further to note that specifically answering
In, above-mentioned each node server, can with the server cluster of independent server either multiple servers composition come
It realizes, the embodiment of the present invention is also without limitation.
Each node server of session data processing system based on block chain is equipped with corresponding node identification, separately
Outside, each node server of session data processing system is stored with other node servers of session data processing system
Node identification broadcasts the block of generation to session data processing so as to the subsequent node identification according to other node servers
In other node servers of system.Illustratively, each node server can safeguard a node identification list, it will words number
It is stored in the node identification list according to node identification and the nodename correspondence of node server each in processing system, example
Property, can with the hardware address or network address of each node server or other can unique identification node server mark believe
Breath is used as above-mentioned node identification, and the embodiment of the present invention is not specifically limited.
It should be noted that each node server in the session data processing system stores an identical block
Chain, wherein block chain is made of multiple blocks, and originating includes block head and block body in block, is stored with block in block head
Head characteristic value, the block basis information such as version number, are stored with session data in block main body, and next block of original block with
Block is originated as father's block, next block equally includes block head and block main body, and is stored in the block head of next block
There are the block basis information such as the block head characteristic value of current block, the block head characteristic value of father's block, version number, and with such
It pushes away, is associated with so that the block data stored in each block in block chain exists with the block data stored in father's block,
Session data can not tamper in guarantee block.
Each embodiment of the session data processing method provided by the present invention based on block chain is described below,
Referring to Fig. 2, Fig. 2 is one implementation process diagram of a kind of session data processing method based on block chain in the present invention, it should
Method is applied in the node server of the session data processing system based on block chain, and the session data processing system includes
Application server cluster, the node server are one in the application server cluster, the application server cluster
Block chain is constituted, is included the following steps:
S10: when receiving the session request that user is sent by browser, determine whether the session request is for the first time
Session request.
Session refers to the process of that a client is communicated with interactive system, and above-mentioned interactive system refers to be provided for user
The system of business service in the concrete realization, can be by application server realizing as above-mentioned interactive system and visitor in conjunction with Fig. 1
Family end interacts.For example, user by client from input account password enter purchase system to exit purchase system can
It is considered a conversation procedure.In web application, a session is usually created that by the three-way handshake of TCP, TCP is closed
Session is then closed in connection.In order to identify whether different session requests comes from same client, HTTP meeting is introduced in web application
Phone system, it may be assumed that the case where being associated between the different requests that maintenance user issues from same user between multiple HTTP connection is known as tieing up
Protect a session, that is to say, that with a conversation procedure of session representative server and browser, this process is continuous
, it can also off and on.For example, in servlet, when the jsp page does not explicitly forbid session, logical
It crosses client and opens browser for the first time when request the jsp, node server can be that it creates a session, and assigns automatically
One session identification is given, the browser of client is sent to.Later client then request other resources in this application when
It waits, above-mentioned session identification can be added on request header automatically.In this way, server end when being connected to session request, just will receive
Session identification.
In embodiments of the present invention, when receiving the session request that user is sent by browser, it can determine whether the session
Whether request is session request for the first time.
S20: if it is determined that the session request is session request for the first time, then the corresponding session number of the session request is obtained
According to.
It is appreciated that when determining the session request that receives is session request for the first time, browsing that user passes through client
Device and node server establish session, and obtain the corresponding session data of session request (namely session data are hereafter unified
It is described with session data), the corresponding session data of above-mentioned session request refers to after receiving the session request, browser
The generated data in conversation procedure between node server, the session data for attribute needed for storing user conversation and
Configuration information.In other words, above-mentioned session data is some data associated with the user in the secondary session request, exemplary
, which includes user name password and the data of user etc. session data, specifically a different citing here.
S30: it generates and unique corresponding first session identification of the session.
It is getting above-mentioned session request and is determining that the session request is for the first time after session request, due to for session for the first time
Request, in order to distinguish the corresponding session data of different sessions process, can generate the session uniquely corresponding session identification.It needs
Illustrate, in embodiments of the present invention, the used mechanism for generating session identification can be different, illustratively, can be based on
Random number+session request time+above-mentioned first session identification of node server hardware information+generation, specifically without limitation, in reality
In the application of border, other session identifications for producing this session request unique identification can be used, the embodiment of the present invention is not done specifically
It limits.
S40: block is generated according to the session data and the first session identification.
In embodiments of the present invention, above-mentioned session data is being got, and is generating the above-mentioned unique session identification of session
Later, block is generated according to the session data and the first session identification.
Specifically, as shown in figure 3, in one embodiment, in step S40 namely it is described according to the session data and
First session identification generates block, specifically comprises the following steps:
S41: the session data is calculated according to different default feature value-based algorithms to obtain at least two features
Value.
S42: object feature value is generated according at least two characteristic value.
It in embodiments of the present invention, can be by different pre- for each node server of session data processing system
If feature value-based algorithm carries out characteristic value calculating to session data, to obtain at least two session data characteristic values, and according to above-mentioned
At least two session data characteristic values generate object feature value, when which is generated block as the session data
Corresponding characteristic value.It is appreciated that being based on aforesaid way, the spy of session data is calculated by different default feature value-based algorithms
Value indicative, can be effectively performed a step reduce session data by steal or modification.It is further to note that above-mentioned different presets
Feature value-based algorithm, which can be, refers to SHA256 algorithm, SHA512 algorithm or other algorithms, such as ripemd256 algorithm etc., specifically adopts
Which kind of default feature value-based algorithm is taken, session data processing system is configured according to actual demand.Specific this hair embodiment is without limitation.
Specifically, in one embodiment, as shown in figure 4, it is in step S41 namely described according to different default characteristic values
Algorithm calculates the session data to obtain at least two characteristic values, specifically comprises the following steps:
S411: the session data is calculated to obtain the First Eigenvalue according to SHA256 algorithm.
S412: the session data is calculated to obtain Second Eigenvalue according to SHA512 algorithm.
It is in step S42 namely described according at least two characteristic value generation object feature value, comprising:
S42`: the object feature value is generated according to the First Eigenvalue and Second Eigenvalue.
The First Eigenvalue can be generated based on SHA256 algorithm and session data, be generated according to SHA512 and session data
Second Eigenvalue finally generates above-mentioned object feature value according to above-mentioned first, second characteristic value.As it can be seen that in the embodiment of the present invention
In, it proposes a kind of the First Eigenvalue calculated with specific reference to different default feature value-based algorithms and Second Eigenvalue comes
The specific implementation for calculating object feature value improves the exploitativeness of scheme.
In one embodiment, as shown in figure 5, it is in step S42` namely described according to the First Eigenvalue and second
Characteristic value generates the object feature value, specifically comprises the following steps:
S421`: according to predetermined order rule, each character of the First Eigenvalue and Second Eigenvalue is intersected
Sequence is to obtain ranking results.
S422`: using the ranking results as the object feature value.
For step S421`-S422`, the embodiment of the present invention can determine the First Eigenvalue and Second Eigenvalue respectively
Character position in translocation sorting, and according to determining character position to each word of the First Eigenvalue and Second Eigenvalue
Symbol is ranked up to obtain ranking results, and using ranking results as object feature value.It illustratively, can be by the First Eigenvalue
Translocation sorting is carried out with each character of Second Eigenvalue, to obtain above-mentioned object feature value.For example, it is assumed that the First Eigenvalue
For abcd ..., Second Eigenvalue ABCD ..., then can be to abcd ... and ABCD ... carry out translocation sorting, such as with the first spy
First character of the first character of value indicative as object feature value, then translocation sorting result is aAbBcCdD ..., to generate mesh
Mark characteristic value.It should be noted that above-mentioned example is merely illustrative herein, the embodiment of the present invention is not constituted and limited.
It should be noted that considering the limited storage space of block, it is therefore desirable to the object feature value in block
Memory space is defined, in some embodiments, for the session data processing system based on block chain, can preset threshold,
And broadcast the preset threshold into each node server of session data processing system, when nodal test to the target generated
When the size of characteristic value is more than above-mentioned preset threshold, then the character for including in above-mentioned at least two characteristic value can be selected
It takes, to retain the character of digit appropriate, the unselected character got is deleted, and the character of reservation is ranked up to obtain
Ranking results are obtained, so that referring to less than preset threshold for the object feature value stored in the block generated, reduces block
Store pressure.
S43: according to the object feature value and block basis information generation area build information, the block basis information
The object feature value of father's block including current block and first session identification.
S44: the block is generated according to the session data and the block head information, wherein the session data
Block main information as the block.
For step S43-S45, it will be understood that after obtaining object feature value, according to object feature value and block
Basic information generation includes the block head information of block basis information and object feature value.Wherein, block basis information is also
Include timestamp, the block head characteristic value (namely the corresponding object feature value of father's block) of father's block of current block and described
First session identification.That is, the block main information of block is session data, the block head information of block includes current area
The object feature value of block, the block head characteristic value of father's block and the first session identification.It should be noted that the area of above-mentioned block
In build information, further includes other block head information of block, be not listed one by one here, such as block version number etc..Correspond to
The storage location of upper one piece of father's block, it will words data, the block head characteristic value of father's block and the target signature of current block
Value is stored to corresponding position, to obtain a new block.
S50: the block is broadcasted to the block chain.
After generating block according to the session data and the first session identification, the block is broadcasted to the area
In block chain.
In one embodiment, as shown in fig. 6, in step S50 namely it is described the block is broadcasted to the block chain,
Specifically comprise the following steps:
S51: the node identification of each node server in the application server cluster is obtained.
S52: the block is broadcasted to the area of the corresponding node server of the node identification according to the node identification
In block chain.
For step S51-S52, as previously described, for each node of the session data processing system based on block chain
Server has corresponding node identification, in addition, each node server is stored with the processing of the session data based on block chain
The node identification of other node servers of system, therefore, the section of each node server in the available block chain
Point identification.That is, according to the node identification of other node servers in the session data processing system based on block chain, it will
Newly-generated block is broadcasted into other node servers of the session data processing system based on block chain, so that other are saved
The newly-generated block is added in the block chain of storage point server, realizes block chain data (namely session data) in base meeting
Talk about the shared of data processing system.It can be seen that any one node when the session data processing system based on block chain takes
When delay machine occurs in business device, the session data for the session which is established with client can't disappear to influence
The progress of regular traffic, is effectively guaranteed the validity of the session data of each node server.
Specifically, in one embodiment, as shown in fig. 7, in step S10 namely the determination session request whether
For session request for the first time, specifically comprise the following steps:
S11: judge whether the session request received carries the second session identification;
S12: if the session request that judgement receives carries second session identification, it is determined that the session is asked
It asks as non-session request for the first time, if judging, the session request does not carry second session identification, it is determined that the session
Request is session request for the first time.
For step S11-S12, it will be understood that in foregoing description it has been noted that user by client browser with
When node server establishes session for the first time, node server can generate the corresponding session identification of the session, and anti-to the client
Emblem mark is presented, so that institute's session identification on carrying the client requests to come next time when.Therefore, when node server connects
When receiving the session request of any one client transmission, whether the session request that node server judgement receives is carried
There is the second session identification, specifically, after node server receives the session request, parses the session request, so that it is determined that
Whether session request carries the second session identification, if the session request that judgement receives carries the second session mark
Know, it is determined that the session request is non-session request for the first time, if judging, the session request does not carry second session
Mark, it is determined that the session request is session request for the first time.
As it can be seen that passing through block chain the embodiment of the invention provides a kind of session data processing method based on block chain
Mode, above-mentioned session data and data not alterability can be shared by realizing each node server, be reduced since node takes
The influence for device delay machine bring session data loss of being engaged in, improves session data validity, guarantees that session data is available.
It should be understood that the size of the serial number of each step is not meant that the order of the execution order in above-described embodiment, each process
Execution sequence should be determined by its function and internal logic, the implementation process without coping with the embodiment of the present invention constitutes any limit
It is fixed.
In one embodiment, a kind of session data processing unit based on block chain is provided, it should the session based on block chain
Session data processing method in data processing equipment and above-described embodiment based on block chain corresponds.As shown in figure 8, described
Session data processing unit based on block chain is applied in the node server of session data processing system, the session data
Processing system includes application server cluster, and the node server is any one in the application server cluster, institute
The each node server for stating application server cluster is stored with block chain, the session data processing unit based on block chain
10 comprise determining that module 101, obtain module 102, the first generation module 103, the second generation module 104 and broadcast module
105。
Determining module 101, for when receiving the session request that user is sent by browser, determining that the session is asked
Seeking Truth is no for session request for the first time;
Module 102 is obtained, if determining that the session request for session request for the first time, obtains institute for the determining module
State the corresponding session of session request session data generated;
First generation module 103, for generating and unique corresponding first session identification of the session;
Second generation module 104, the session data and first life for being obtained according to the acquisition module
Block is generated at the first session identification that module generates;
Broadcast module 105, the block for generating second generation module are broadcasted to the block chain.
In one embodiment, second generation module 104 is specifically used for:
The session data is calculated according to different default feature value-based algorithms to obtain at least two characteristic values;
Object feature value is generated according at least two characteristic value;
Include according to the object feature value and block basis information generation area build information, the block basis information
Timestamp, block-identified and first session identification;
The block is generated according to the session data and the block head information, wherein the session data conduct
The block main information of the block.
In one embodiment, second generation module 104 for it is described according to different default feature value-based algorithms to institute
It states session data to be calculated to obtain at least two characteristic values, specifically include:
Second generation module 104 is used for:
The session data is calculated to obtain the First Eigenvalue according to SHA256 algorithm;
The session data is calculated to obtain Second Eigenvalue according to SHA512 algorithm;
Second generation module 104 is used to generate object feature value according at least two characteristic value, specifically includes:
Second generation module 104 is used for: generating the object feature value according to the First Eigenvalue and Second Eigenvalue.
In one embodiment, second generation module 104 is used for according to the First Eigenvalue and Second Eigenvalue
The object feature value is generated, is specifically included:
Second generation module 104 is used for: according to predetermined order crossover rule, the First Eigenvalue and second is special
Each character of value indicative carries out translocation sorting to obtain translocation sorting result;It is special using the translocation sorting result as the target
Value indicative.
In implementing one, whether determining module 101 is session request for the first time for the determination session request, packet
It includes:
Determining module 101 is specifically used for: judging whether the session request received carries the second session identification;If
Judge that the session request received carries second session identification, it is determined that the session request is non-session for the first time
Request, if judging, the session request does not carry second session identification, it is determined that the session request be it is described for the first time
Session request.
In one embodiment, broadcast module 105 includes: for broadcasting the block to the block chain
Broadcast module 105 is used for: obtaining the node identification of each node server in the application server cluster;According to
The node identification broadcasts the block into the block chain of the corresponding node server of the node identification.
As it can be seen that passing through block chain the embodiment of the invention provides a kind of session data processing unit based on block chain
Mode, above-mentioned session data and data not alterability can be shared by realizing each node server, be reduced since node takes
The influence for device delay machine bring session data loss of being engaged in, improves session data validity, guarantees that session data is available.
Specific about session data processing unit limits the limit that may refer to above for session data processing method
Fixed, details are not described herein.Modules in above-mentioned session data processing unit can fully or partially through software, hardware and its
Combination is to realize.Above-mentioned each module can be embedded in the form of hardware or independently of in the processor in computer equipment, can also be with
It is stored in the memory in computer equipment in a software form, in order to which processor calls the above modules of execution corresponding
Operation.
In one embodiment, a kind of computer equipment is provided, which can be server, internal junction
Composition can be as shown in Figure 9.The computer equipment include by system bus connect processor, memory, network interface and
Database.Wherein, the processor of the computer equipment is for providing calculating and control ability.The memory packet of the computer equipment
Include non-volatile memory medium, built-in storage.The non-volatile memory medium is stored with operating system, computer program and data
Library.The built-in storage provides environment for the operation of operating system and computer program in non-volatile memory medium.The calculating
The network interface of machine equipment is used to communicate with external terminal by network connection.When the computer program is executed by processor with
Realize a kind of session data processing method based on block chain.
In one embodiment, a kind of computer equipment is provided, including memory, processor and storage are on a memory
And the computer program that can be run on a processor, processor perform the steps of when executing computer program
When receiving the session request that user is sent by browser, determine whether the session request is session for the first time
Request;
If it is determined that the session request is session request for the first time, then it is generated to obtain the corresponding session of the session request
Session data;
It generates and unique corresponding first session identification of the session;
Block is generated according to the session data and the first session identification;
The block is broadcasted to the block chain.
As it can be seen that by way of block chain, realizing each node clothes the embodiment of the invention provides a kind of computer equipment
Business device can share above-mentioned session data and data not alterability, reduce due to node server delay machine bring session number
According to the influence of loss, session data validity is improved, guarantees that session data is available.
In one embodiment, a kind of computer readable storage medium is provided, computer program is stored thereon with, is calculated
Machine program performs the steps of when being executed by processor
When receiving the session request that user is sent by browser, determine whether the session request is session for the first time
Request;
If it is determined that the session request is session request for the first time, then it is generated to obtain the corresponding session of the session request
Session data;
It generates and unique corresponding first session identification of the session;
Block is generated according to the session data and the first session identification;
The block is broadcasted to the block chain.
As it can be seen that by way of block chain, being realized each the embodiment of the invention provides a kind of computer readable storage medium
A node server can share above-mentioned session data and data not alterability, reduce since node server delay machine is brought
The influence lost of session data, improve session data validity, guarantee that session data is available.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with
Relevant hardware is instructed to complete by computer program, the computer program can be stored in a non-volatile computer
In read/write memory medium, the computer program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein,
To any reference of memory, storage, database or other media used in each embodiment provided herein,
Including non-volatile and/or volatile memory.Nonvolatile memory may include read-only memory (ROM), programming ROM
(PROM), electrically programmable ROM (EPROM), electrically erasable ROM (EEPROM) or flash memory.Volatile memory may include
Random access memory (RAM) or external cache.By way of illustration and not limitation, RAM is available in many forms,
Such as static state RAM (SRAM), dynamic ram (DRAM), synchronous dram (SDRAM), double data rate sdram (DDRSDRAM), enhancing
Type SDRAM (ESDRAM), synchronization link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM
(RDRAM), direct memory bus dynamic ram (DRDRAM) and memory bus dynamic ram (RDRAM) etc..
It is apparent to those skilled in the art that for convenience of description and succinctly, only with above-mentioned each function
Can unit, module division progress for example, in practical application, can according to need and by above-mentioned function distribution by different
Functional unit, module are completed, i.e., the internal structure of described device is divided into different functional unit or module, more than completing
The all or part of function of description.
Embodiment described above is merely illustrative of the technical solution of the present invention, rather than its limitations;Although referring to aforementioned reality
Applying example, invention is explained in detail, those skilled in the art should understand that: it still can be to aforementioned each
Technical solution documented by embodiment is modified or equivalent replacement of some of the technical features;And these are modified
Or replacement, the spirit and scope for technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution should all
It is included within protection scope of the present invention.
Claims (10)
1. a kind of session data processing method based on block chain, which is characterized in that at the session data based on block chain
Reason method is applied in the node server of session data processing system, and the session data processing system includes application server
Cluster, the node server are any one in the application server cluster, each of described application server cluster
Node server is stored with block chain, which comprises
When receiving the session request that user is sent by browser, determine whether the session request is that session is asked for the first time
It asks;
If it is determined that the session request is session request for the first time, then the corresponding session of session request session generated is obtained
Data;
It generates and unique corresponding first session identification of the session;
Block is generated according to the session data and the first session identification;
The block is broadcasted to the block chain.
2. the session data processing method as described in claim 1 based on block chain, which is characterized in that described according to the meeting
It talks about data and the first session identification generates block, comprising:
The session data is calculated according to different default feature value-based algorithms to obtain at least two characteristic values;
Object feature value is generated according at least two characteristic value;
According to the object feature value and block basis information generation area build information, the block basis information includes the time
Stamp, block-identified and first session identification;
The block is generated according to the session data and the block head information, wherein described in the session data is used as
The block main information of block.
3. the session data processing method as claimed in claim 2 based on block chain, which is characterized in that described according to different
Default feature value-based algorithm calculates the session data to obtain at least two characteristic values, comprising:
The session data is calculated to obtain the First Eigenvalue according to SHA256 algorithm;
The session data is calculated to obtain Second Eigenvalue according to SHA512 algorithm;
It is described that object feature value is generated according at least two characteristic value, comprising:
The object feature value is generated according to the First Eigenvalue and Second Eigenvalue.
4. the session data processing method as claimed in claim 3 based on block chain, which is characterized in that described according to described
One characteristic value and Second Eigenvalue generate the object feature value, comprising:
According to predetermined order crossover rule, by each character of the First Eigenvalue and Second Eigenvalue carry out translocation sorting with
Obtain translocation sorting result;
Using the translocation sorting result as the object feature value.
5. the session data processing method according to any one of claims 1-4 based on block chain, which is characterized in that described true
Whether the fixed session request is session request for the first time, comprising:
Judge whether the session request received carries the second session identification;
If judging, the session request received carries second session identification, it is determined that the session request is non-head
Secondary session request, if judging, the session request does not carry second session identification, it is determined that the session request is institute
State session request for the first time.
6. the session data processing method as claimed in claim 5 based on block chain, which is characterized in that described by the block
It broadcasts to the block chain and includes:
Obtain the node identification of each node server in the application server cluster;
The block is broadcasted into the block chain of the corresponding node server of the node identification according to the node identification.
7. a kind of session data processing unit based on block chain, which is characterized in that at the session data based on block chain
It manages device to be applied in the node server of session data processing system, the session data processing system includes application server
Cluster, the node server are any one in the application server cluster, each of described application server cluster
Node server is stored with block chain, and the session data processing unit based on block chain includes:
Determining module, for whether determining the session request when receiving the session request that user is sent by browser
For session request for the first time;
Module is obtained, if determining that the session request for session request for the first time, obtains the session for the determining module
Request corresponding session session data generated;
First generation module, for generating and unique corresponding first session identification of the session;
Second generation module, the session data and first generation module for being obtained according to the acquisition module are raw
At the first session identification generate block;
Broadcast module, the block for generating second generation module are broadcasted to the block chain.
8. as claimed in claim 7 based on the session data processing unit of block chain, which is characterized in that described second generates mould
Block is specifically used for:
The session data is calculated according to different default feature value-based algorithms to obtain at least two characteristic values;
Object feature value is generated according at least two characteristic value;
According to the object feature value and block basis information generation area build information, the block basis information includes the time
Stamp, block-identified and first session identification;
The block is generated according to the session data and the block head information, wherein described in the session data is used as
The block main information of block.
9. a kind of computer equipment, including memory, processor and storage are in the memory and can be in the processor
The computer program of upper operation, which is characterized in that the processor realized when executing the computer program as claim 1 to
6 described in any item session data processing methods based on block chain.
10. a kind of computer readable storage medium, the computer-readable recording medium storage has computer program, and feature exists
In realization such as the session as claimed in any one of claims 1 to 6 based on block chain when the computer program is executed by processor
Data processing method.
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910137178.3A CN109981739A (en) | 2019-02-25 | 2019-02-25 | Session data processing method, device, equipment and medium based on block chain |
| PCT/CN2019/116435 WO2020173126A1 (en) | 2019-02-25 | 2019-11-08 | Method and device for blockchain-based session data processing, equipment, and medium |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201910137178.3A CN109981739A (en) | 2019-02-25 | 2019-02-25 | Session data processing method, device, equipment and medium based on block chain |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN109981739A true CN109981739A (en) | 2019-07-05 |
Family
ID=67077361
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201910137178.3A Pending CN109981739A (en) | 2019-02-25 | 2019-02-25 | Session data processing method, device, equipment and medium based on block chain |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN109981739A (en) |
| WO (1) | WO2020173126A1 (en) |
Cited By (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2020173126A1 (en) * | 2019-02-25 | 2020-09-03 | 平安科技(深圳)有限公司 | Method and device for blockchain-based session data processing, equipment, and medium |
| CN111641559A (en) * | 2020-04-22 | 2020-09-08 | 金蝶软件(中国)有限公司 | Block chain-based multi-person session data transmission method and system and computer equipment |
| CN113852655A (en) * | 2020-06-28 | 2021-12-28 | 北京金山云网络技术有限公司 | Information management method, device and blockchain service system |
| CN114155010A (en) * | 2021-12-06 | 2022-03-08 | 广州繁星互娱信息科技有限公司 | Method and device for generating product identification code, electronic equipment and storage medium |
| CN115525718A (en) * | 2022-09-29 | 2022-12-27 | 中国工商银行股份有限公司 | Client information session acquisition method and device based on block chain technology |
| CN115720234A (en) * | 2022-11-14 | 2023-02-28 | 中国建设银行股份有限公司 | A method, device and equipment for implementing session retention based on server cluster |
Citations (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2000079391A1 (en) * | 1999-06-17 | 2000-12-28 | Art Technology Group, Inc. | Internet server session backup apparatus |
| US20140304499A1 (en) * | 2013-04-06 | 2014-10-09 | Citrix Systems, Inc. | Systems and methods for ssl session management in a cluster system |
| CN104580226A (en) * | 2015-01-15 | 2015-04-29 | 上海瀚之友信息技术服务有限公司 | Session data sharing system and method |
| CN104735098A (en) * | 2013-12-18 | 2015-06-24 | 青岛海尔空调器有限总公司 | Session information control method and system |
| CN106357778A (en) * | 2016-09-27 | 2017-01-25 | 山东浪潮商用系统有限公司 | Session information sharing method, device and system |
| CN106911465A (en) * | 2017-02-27 | 2017-06-30 | 腾讯科技(深圳)有限公司 | Block generation method and device |
| CN107294709A (en) * | 2017-06-27 | 2017-10-24 | 阿里巴巴集团控股有限公司 | A kind of block chain data processing method, apparatus and system |
| CN108881231A (en) * | 2018-06-21 | 2018-11-23 | 郑州云海信息技术有限公司 | The method, apparatus and storage medium of synchronous account information in a kind of group system |
| CN109088871A (en) * | 2018-08-14 | 2018-12-25 | 深圳市人民政府金融发展服务办公室 | Datagram delivery method and system based on block chain technology |
Family Cites Families (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN106815728A (en) * | 2017-01-03 | 2017-06-09 | 北京供销科技有限公司 | A kind of big data based on block chain technology really weighs method and system |
| JP7065887B2 (en) * | 2017-06-07 | 2022-05-12 | エヌチェーン ホールディングス リミテッド | Methods and systems for establishing reliable peer-to-peer communication between nodes in a blockchain network |
| CN108629038A (en) * | 2018-05-11 | 2018-10-09 | 北京奇虎科技有限公司 | Webpage based on block chain deposits card method and system |
| CN108958898A (en) * | 2018-07-11 | 2018-12-07 | 佛山伊苏巨森科技有限公司 | A method of for issuing anonymous orientation affairs to block chain |
| CN109191149B (en) * | 2018-08-22 | 2022-02-22 | 合肥高科创新科技有限公司 | Commodity digital identity generation method based on block chain |
| CN109327457A (en) * | 2018-11-09 | 2019-02-12 | 广州大学 | A blockchain-based IoT device identity authentication method and system |
| CN109981739A (en) * | 2019-02-25 | 2019-07-05 | 平安科技(深圳)有限公司 | Session data processing method, device, equipment and medium based on block chain |
-
2019
- 2019-02-25 CN CN201910137178.3A patent/CN109981739A/en active Pending
- 2019-11-08 WO PCT/CN2019/116435 patent/WO2020173126A1/en not_active Ceased
Patent Citations (9)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2000079391A1 (en) * | 1999-06-17 | 2000-12-28 | Art Technology Group, Inc. | Internet server session backup apparatus |
| US20140304499A1 (en) * | 2013-04-06 | 2014-10-09 | Citrix Systems, Inc. | Systems and methods for ssl session management in a cluster system |
| CN104735098A (en) * | 2013-12-18 | 2015-06-24 | 青岛海尔空调器有限总公司 | Session information control method and system |
| CN104580226A (en) * | 2015-01-15 | 2015-04-29 | 上海瀚之友信息技术服务有限公司 | Session data sharing system and method |
| CN106357778A (en) * | 2016-09-27 | 2017-01-25 | 山东浪潮商用系统有限公司 | Session information sharing method, device and system |
| CN106911465A (en) * | 2017-02-27 | 2017-06-30 | 腾讯科技(深圳)有限公司 | Block generation method and device |
| CN107294709A (en) * | 2017-06-27 | 2017-10-24 | 阿里巴巴集团控股有限公司 | A kind of block chain data processing method, apparatus and system |
| CN108881231A (en) * | 2018-06-21 | 2018-11-23 | 郑州云海信息技术有限公司 | The method, apparatus and storage medium of synchronous account information in a kind of group system |
| CN109088871A (en) * | 2018-08-14 | 2018-12-25 | 深圳市人民政府金融发展服务办公室 | Datagram delivery method and system based on block chain technology |
Non-Patent Citations (1)
| Title |
|---|
| 覃晓康: "第二章 管理信息系统开发中的信息技术", 《管理信息系统及应用》 * |
Cited By (7)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2020173126A1 (en) * | 2019-02-25 | 2020-09-03 | 平安科技(深圳)有限公司 | Method and device for blockchain-based session data processing, equipment, and medium |
| CN111641559A (en) * | 2020-04-22 | 2020-09-08 | 金蝶软件(中国)有限公司 | Block chain-based multi-person session data transmission method and system and computer equipment |
| CN111641559B (en) * | 2020-04-22 | 2022-02-15 | 金蝶软件(中国)有限公司 | Block chain-based multi-person session data transmission method and system and computer equipment |
| CN113852655A (en) * | 2020-06-28 | 2021-12-28 | 北京金山云网络技术有限公司 | Information management method, device and blockchain service system |
| CN114155010A (en) * | 2021-12-06 | 2022-03-08 | 广州繁星互娱信息科技有限公司 | Method and device for generating product identification code, electronic equipment and storage medium |
| CN115525718A (en) * | 2022-09-29 | 2022-12-27 | 中国工商银行股份有限公司 | Client information session acquisition method and device based on block chain technology |
| CN115720234A (en) * | 2022-11-14 | 2023-02-28 | 中国建设银行股份有限公司 | A method, device and equipment for implementing session retention based on server cluster |
Also Published As
| Publication number | Publication date |
|---|---|
| WO2020173126A1 (en) | 2020-09-03 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN109981739A (en) | Session data processing method, device, equipment and medium based on block chain | |
| CN109525990B (en) | Wireless screen projection method and device, computer equipment and storage medium | |
| CN111556120B (en) | Data processing method and device based on block chain, storage medium and equipment | |
| CN107846278B (en) | Intelligent contract processing method and device | |
| CN110263908A (en) | Federal learning model training method, equipment, system and storage medium | |
| CN108280761A (en) | Increase letter side's distribution method, device, computer equipment and storage medium | |
| CN110213523A (en) | Video conference processing method, system, device, computer equipment and storage medium | |
| CN111522874B (en) | Block chain consensus method, apparatus, computer device and storage medium | |
| CN109359994A (en) | Blockchain-based business processing method, device and system | |
| CN109656778A (en) | Data capture method, device, computer equipment and storage medium | |
| CN108206830A (en) | Vulnerability scanning method, apparatus, computer equipment and storage medium | |
| CN107770269A (en) | A kind of service response method and its terminal | |
| CN110009404A (en) | Advertisement demonstration method, device, computer equipment and storage medium | |
| CN111698315A (en) | Data processing method and device for block and computer equipment | |
| CN111327680B (en) | Authentication data synchronization method, device, system, computer equipment and storage medium | |
| WO2022095426A1 (en) | Blockchain-based joint account creation method, system, device, and storage medium | |
| CN109118291A (en) | User authen method, device and computer equipment in advertisement tasks popularization | |
| CN112799970B (en) | Test data processing method, device, electronic equipment and medium | |
| CN114118447A (en) | Novel federal learning system, method and device, computer equipment and storage medium | |
| CN110381149B (en) | Data distribution method and device and data synchronization method and device | |
| CN112417052A (en) | Data synchronization method, device, equipment and storage medium in block chain network | |
| CN108345508B (en) | Interface call testing method and device | |
| CN113691684B (en) | Outbound method, device, system, computer equipment and storage medium | |
| CN110071908B (en) | Terminal binding method and device, computer equipment and storage medium | |
| CN112084160B (en) | Small curve steel rail bending positioning detection method, device and platform |
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 | ||
| RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190705 |
|
| RJ01 | Rejection of invention patent application after publication |