CN106385418B - A kind of method and device for transmitting private data - Google Patents
A kind of method and device for transmitting private data Download PDFInfo
- Publication number
- CN106385418B CN106385418B CN201610837535.3A CN201610837535A CN106385418B CN 106385418 B CN106385418 B CN 106385418B CN 201610837535 A CN201610837535 A CN 201610837535A CN 106385418 B CN106385418 B CN 106385418B
- Authority
- CN
- China
- Prior art keywords
- data
- message
- private data
- data message
- length
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/22—Parsing or analysis of headers
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/66—Arrangements for connecting between networks having differing types of switching systems, e.g. gateways
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/30—Definitions, standards or architectural aspects of layered protocol stacks
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
- Computer And Data Communications (AREA)
Abstract
The application provides a kind of method and apparatus for transmitting private data, applied on the member device of distributed apparatus, which comprises receives the data message for the carrying private data that other member devices are sent;The private data includes the data transmitted between the member device of the distributed apparatus;When will send on the data message to when the upper-layer protocol processing of protocol stack, record is directed toward the deflected length of the tail pointer of the message buffer of the data message;When the data message is completed in upper-layer protocol processing, the deflected length based on record, the position of the tail pointer is restored to initial position, and by the data message forwarding to next member device, so that the member device for receiving the data message obtains the private data carried in the data message.In the embodiment of the present application, the private data that the data message that the available other members of the member device of distributed apparatus send carries.
Description
Technical field
This application involves field of communication technology, in particular to a kind of method and device for transmitting private data.
Background technique
Distributed apparatus refers to and is made of more member devices that each member device has independent CPU, can be independent
Carry out the network equipment of business processing and message forwarding.Wherein, it can be interknited by network between member device.
Transmission private data is usually required in application scenes, between member device, is used for business processing or control
Message forwarding processed.It is at present usually to be sealed private data by sender by adding private data in the tail portion of message buffer
The length of private data is deviated backward mounted in the tail portion of message buffer, and by the pointer for being directed toward message buffer tail portion, then
It forwards the packet away.After recipient receives message, the pointer biased forwards private data of message buffer tail portion will be directed toward
Length is taken out private data from message buffer tail portion, is then forwarded the packet away.
However, in actual application, if there are other members to set between the sender and recipient of private data
Standby, for message before the side of being received receives, which may be by other member devices the message up sending is supreme
Layer protocol is handled, and is destroyed after being adjusted to the pointer of message buffer tail portion, can not be just so as to cause recipient
Really obtain the private data of message buffer tail portion.
Summary of the invention
In view of this, the application provides a kind of method and device for transmitting private data, to solve in distributed apparatus
In, when, there are when other member devices, it is slow that recipient can not correctly obtain message between the sender of private data and recipient
The problem of rushing the private data of area tail portion.
Specifically, the application is achieved by the following technical solution:
A method of transmission private data, applied on the member device of distributed apparatus, comprising:
Receive the data message for the carrying private data that other member devices are sent;The private data is included in described
The data transmitted between the member device of distributed apparatus;
When will send on the data message to when the upper-layer protocol processing of protocol stack, record is directed toward the report of the data message
The deflected length of the tail pointer of literary buffer area;
When the data message, the deflected length based on record, by the tail pointer are completed in upper-layer protocol processing
Position is restored to initial position, and by the data message forwarding to next member device, so that receiving the data message
Member device obtains the private data carried in the data message.
In the method for the transmission private data, the member device is device for multi-core;Wherein, every CPU is set respectively
A fixed corresponding global variable;
The method also includes:
When any CPU receives the data message for carrying private data, it is corresponding that the deflected length is recorded in CPU
In global variable.
In the method for the transmission private data, further includes:
The private data of user configuration is encapsulated in the tail portion of the data message, and institute is modified according to private data length
State the position of the tail pointer in message buffer;
The data message is sent to next member device.
In the method for the transmission private data, further includes:
It is described privately owned based on pre-configuration when receiving the data message for the carrying private data that other member devices are sent
The length of data reads the private data from the message tail of the data message.
In the method for the transmission private data, further includes:
When the data message is produced the distributed apparatus, the message buffer of the data message is directed toward in adjustment
The position of tail pointer abandons the private data.
A kind of device transmitting private data, applied on the member device of distributed apparatus, comprising:
Receiving unit, for receiving the data message for the carrying private data that other member devices are sent;It is described privately owned
Data include the data transmitted between the member device of the distributed apparatus;
Recording unit, for when will send on the data message to when the upper-layer protocol processing of protocol stack, record to be directed toward institute
State the deflected length of the tail pointer of the message buffer of data message;
Recovery unit, for completing the data message when upper-layer protocol processing, the deflected length based on record will
The position of the tail pointer is restored to initial position, and by the data message forwarding to next member device, so that receiving
The member device of the data message obtains the private data carried in the data message.
In the device of the transmission private data, the member device is device for multi-core;Wherein, every CPU is set respectively
A fixed corresponding global variable;
The recording unit is further used for when any CPU receives the data message for carrying private data, will be described
Deflected length is recorded in the corresponding global variable of CPU.
In the device of the transmission private data, further includes:
Encapsulation unit, for the private data of user configuration to be encapsulated in the tail portion of the data message, and according to privately owned
Data length modifies the position of the tail pointer in the message buffer;
Transmission unit, for the data message to be sent to next member device.
In the device of the transmission private data, further includes:
Reading unit, when for receiving the data message for the carrying private data that other member devices are sent, based on pre-
The length of the private data of configuration reads the private data from the message tail of the data message.
In the device of the transmission private data, further includes:
Discarding unit, when for the data message to be produced the distributed apparatus, the data message is directed toward in adjustment
Message buffer tail pointer position, abandon the private data.
In the embodiment of the present application, the data message by recording the carrying private data received is sent upper to protocol stack
When upper-layer protocol processing, it is directed toward the deflected length of the tail pointer of message buffer, and complete the data in upper-layer protocol processing
After message, the deflected length based on record restores the position of the tail pointer, so that the data message is forwarded to down
When one member device, the private data is completely carried;To solve in the distributed network Central Shanxi Plain, as the sender of private data
There are when other member devices between recipient, recipient can not correctly obtain asking for the private data of message buffer tail portion
Topic.
Detailed description of the invention
Fig. 1 is a kind of schematic diagram of the message buffer of data message shown in the application;
Fig. 2 is a kind of flow chart of the method for transmission private data shown in the application;
Fig. 3 is a kind of logic diagram of the device of transmission private data shown in the application;
Fig. 4 is a kind of hardware structure diagram of the device of transmission private data shown in the application.
Specific embodiment
Technical solution in embodiment in order to enable those skilled in the art to better understand the present invention, and make of the invention real
The above objects, features, and advantages for applying example can be more obvious and easy to understand, with reference to the accompanying drawing to prior art and the present invention
Technical solution in embodiment is described in further detail.
In the related art, it is private that transmission is usually required in application scenes, between the member device of distributed apparatus
There are data, for business processing or control message forwarding.
For example, above-mentioned private data can be for the forwarding-table item of data forwarding between member device or other
The data for needing to be transmitted between member device.
Currently, being usually to be encapsulated private data by sender by adding private data in the tail portion of message buffer
The length of private data is deviated backward in the tail portion of message buffer, and by the pointer for being directed toward message buffer tail portion, then will
Message forwards.After recipient receives message, the length of the pointer biased forwards private data of message buffer tail portion will be directed toward
Degree takes out private data from message buffer tail portion, then forwards the packet away.
However, if there are other member devices between the recipient and sender of private data, data message is being connect
Before debit receives, it will usually be forwarded by other member devices.At this point, if the number that other member devices need to receive
According to message, above send to protocol stack upper-layer protocol carry out business processing (such as by the Layer 2 data message received continue on send to
Three layer protocols carry out corresponding business processing), it handles, may be based on upper due to will send on data message to upper-layer protocol
Layer protocol is adjusted the length of the message buffer of the data message, and therefore, above-mentioned private data may be due to message
The pointer of buffer area tail portion is destroyed after being adjusted.In this case, recipient according to preset private data length from
When private data is read in message buffer tail portion, the data of mistake may be obtained.
For example, being a kind of schematic diagram of the message buffer of data message shown in the application referring to Figure 1.It receives
Carrying private data data message message buffer from position A to position E.It is assisted when the data message is above sent to three layers
View carry out business processing when, two layers of header can be removed first, the pointer for being directed toward header moves to position B from position A, then further according to
The tail pointer for being directed toward message buffer end position is moved to position from position E by the message length recorded in the header of three layer protocols
Set C.After the completion of the business processing of three layer protocols, which is forwarded to next member device.If the member device
Private data is read forward from position C according to preconfigured private data length length5, will obtain the data of mistake.
To solve the above problems, the embodiment of the present application makes the message buffer tail portion of data message by a series of measures
When member device of the private data between sender and recipient forwards, it will not be destroyed.Below to the technology in the application
Scheme is illustrated.
It referring to fig. 2, is a kind of flow chart of the method for transmission private data shown in the application, the execution master of the embodiment
Body is the member device of distributed apparatus;It the described method comprises the following steps:
Step 201: receiving the data message for the carrying private data that other member devices are sent;The private data packet
Include the data transmitted between the member device of the distributed apparatus.
Step 202: when will send on the data message to when the upper-layer protocol processing of protocol stack, record is directed toward the data
The deflected length of the tail pointer of the message buffer of message.
Step 203: when the data message is completed in upper-layer protocol processing, the deflected length based on record will be described
The position of tail pointer is restored to initial position, and by the data message forwarding to next member device, so that receiving the number
The private data carried in the data message is obtained according to the member device of message.
Above-mentioned distributed apparatus, You Duotai member device composition, every member device have independent CPU, can be independent
Business processing and message forwarding are carried out, can be interknited by network between member device.
It wherein, can be to the number of normal transmission between member device when needing to transmit private data between member device
Be extended according to the message buffer of message, by private data addition message buffer tail portion, using member device it
Between the data message of normal transmission carry private data;When the data message needs to produce distributed apparatus, will carry
Private data abandon.In this way, so that between member device when needing to transmit private data, can not be directed to should
Private data individually constructs message, improves work efficiency.
Furthermore it is also possible to the length of private data be configured on every member device in advance, so that any member equipment exists
It, can be based on the private data length of pre-configuration, from the data message tail portion when receiving the data message for carrying private data
Read private data.
Above-mentioned protocol stack refers to the summation of each layer protocol in network, and when transmitting a message, message can be from upper-layer protocol
By encapsulated delivery to underlying protocol, after reaching recipient, upper-layer protocol is transferred to by decapsulating from underlying protocol.
Above-mentioned message buffer refers to the memory headroom of program stored messages, by being directed toward the pointer of header, being directed toward data
The head pointer of starting position and the tail pointer for being directed toward end of data position, the position and message data area of Lai Jilu header
Position.Wherein, the numerical value that will record the pointer current location in pointer, by subtracting direction for the numerical value in tail pointer
Numerical value in the pointer of header can obtain message buffering section length.When message transmits in protocol stack, message encapsulation is carried out
When with decapsulation, it can move and be directed toward the pointer of header and (for example handled three layer protocols are sent on two layer message, shifting can be passed through
The position of the dynamic pointer for being directed toward header, two layers of head are removed).If to add data in the tail portion of message, movement is needed to refer to
To the tail pointer of message buffer.
In the present embodiment, when will carry sent on the data message of private data to protocol stack upper-layer protocol processing when,
It can recorde the deflected length of the tail pointer of the message buffer of above-mentioned data message;Above-mentioned data are completed in upper-layer protocol processing
After message, the length of the message buffer of above-mentioned data message changes, can be according to the above-mentioned deflected length of record, will be upper
The position for stating tail pointer is restored to initial position.Therefore, in the present embodiment, the private data that above-mentioned data message carries is being forwarded
It will not be destroyed in the process;The recipient of above-mentioned private data can obtain correct private data from above-mentioned data message.
In the present embodiment, above-mentioned private data can be based on actual business demand by user and configure.Work as distribution
After any member equipment of formula equipment receives the private data of user configuration, set the private data is forwarded to other members
When standby, the private data of user configuration can be encapsulated in the tail portion of the message buffer of data message.
As shown in Figure 1, message buffer will be directed toward when private data is encapsulated in data message tail portion by member device
Tail pointer moves to message buffer data trailer position E, due to recording in tail pointer from message buffer data trailer position D
The numerical value of current location, so the length of message buffering section length increases private data length after tail pointer moves on to position E
length5。
In the present embodiment, the member device of distributed apparatus can be sent out under the configuration of user to other member devices
Send the data message for carrying private data, it is also possible to receive the datagram for the carrying private data that other member devices are sent
Text.When receiving the data message for the carrying private data that other member devices are sent, if the data message needs to send
Upper-layer protocol to protocol stack is handled, and upper-layer protocol can abandon header when decapsulating to the data message;Meanwhile being
The efficiency for improving Message processing, is correctly handled some business (such as network auditing system), can be remembered according in the header of upper-layer protocol
The message length of record adjusts message data buffer area.Wherein, the message length of the header record of upper-layer protocol is in repeating process
Always constant, specifically include the header of upper-layer protocol and the length of actual data portion.
As shown in Figure 1, two layers of header are dropped, message buffer when message is transferred to three layer protocols from two-layer protocol
The pointer for being directed toward head moves on to position B from position A;Meanwhile according to the message length recorded in the header of three layer protocols, will be directed toward
The tail pointer of message buffer end of data position moves on to position C from position E.Wherein, the report recorded in the header of three layer protocols
Literary length is the value that total length field records in IPV4 header in IPv4;It in ipv 6, is payload length in ipv6 header
Field value adds ipv6 header length.
When the data message is forwarded to next member device again, if the member device needs to read the data message
The private data of tail portion, the tail pointer due to being directed toward message buffer end of data position has moved, when the member device root
According to the length of the above-mentioned private data based on pre-configuration, when reading above-mentioned private data from the data message tail portion, the number of acquisition
According to being inaccurate.
In order to enable the member device of subsequently received above-mentioned data message correctly to obtain what above-mentioned data message carried
Above-mentioned private data, when member device receives the data message of carrying private data, when the data message is sent upper to agreement
When the upper-layer protocol processing of stack, the deflected length for being directed toward the tail pointer of message buffer end of data position can recorde.So as to
Restore the position of tail pointer in the deflected length of later use record, so that private data is retained.
In a kind of embodiment shown, a global variable can be preset, by the direction message buffering of record
Among the deflected length storage to the global variable of the tail pointer of area end of data position.
As shown in Figure 1, being directed toward message buffer data when above-mentioned data message is transferred to three layer protocols from two-layer protocol
The tail pointer of end position moves on to position C from position E, simultaneously as being directed toward the position recorded in the pointer and tail pointer of header
Numerical value change, message buffering section length becomes length3.At this point it is possible to which the deflected length length4 of tail pointer is deposited
It stores up in preset global variable.
In the present embodiment, it after above-mentioned data message is completed in the upper-layer protocol processing of member device, can be based on above-mentioned
The above-mentioned deflected length recorded in global variable, by be directed toward message buffer end of data position tail pointer position restore to
Initial position;
For example, as shown in Figure 1, when above-mentioned data message is after the completion of three layer protocols are handled, according in above-mentioned global variable
The above-mentioned deviation post length4 of record, moves on to position E from position C for tail pointer, and the numerical value of record position occurs in tail pointer
Change, the data length length4 abandoned before this is rejoined in packet buffer section length.By the above measure, when subsequent
When receiving the member device of above-mentioned data message and needing to obtain private data, the length of the above-mentioned private data based on pre-configuration
Length5 is from above-mentioned data message tail portion biased forwards, available correct private data.
In this example, the member device of distributed apparatus can be monokaryon equipment, be also possible to device for multi-core.Wherein, when
When member device is device for multi-core, independent process data message that multiple CPU of member device usually can be parallel.It is sent on if
Private data is carried to the data message of above-mentioned multiple CPU, then each CPU need to be according to above processing mode, will be upper
After the completion of stating data message and handled in upper-layer protocol, the position for being directed toward the tail pointer of message buffer is restored to initial bit
It sets.Therefore, in this case, each CPU can correspond to a global variable, then record in respective global variable
For handled data message when the above-mentioned upper-layer protocol to protocol stack is handled, upper-layer protocol is in the report to the data message
After the length of literary buffer area is adjusted, the deflected length of tail pointer.
For the data message of each CPU processing, above-mentioned deflected length may be different.It is recorded with a global variable
Deflected length, since each CPU of member device can access this global variable, global variable will record multiple offset length
Degree.In Restoration stage, the deflected length that any CPU is obtained from global variable may be uncertain, if the offset obtained
Length is not the deflected length of the tail pointer of the local data message in processing, then tail pointer can not be restored to original position
It sets.
Such as: member device there are three CPU:CPU1, CPU2, CPU3, the tail pointer of the data message of CPU1 processing it is inclined
Moving length is m;The deflected length of the tail pointer of the data message of CPU2 processing is n;The tail pointer of the data message of CPU3 processing
Deflected length be k.Three deflected lengths are stored in the same global variable by three CPU, then when data message is finished
Business when the deflected length that CPU is obtained from global variable, is likely to be obtained deflected length m, it is also possible to obtain deflected length n or partially
Move length k.If the deflected length that CPU1 is obtained is deflected length n or k, the tail pointer of the data message of CPU1 processing can not
It is restored to original position.
To solve this problem, a global variable can be individually set to each CPU, each CPU can only be accessed certainly
The corresponding global variable of body.In this case, any CPU can be long by the offset of the tail pointer of the data message of itself processing
Degree storage, in the stage for restoring tail pointer position, can only obtain only into corresponding global variable from corresponding global variable
One deflected length, avoid because obtain mistake deflected length due to cause data message tail pointer can not be restored to it is original
The case where position.
Such as: for three CPU of member device, a global variable is set separately;CPU1 corresponds to global variable X,
CPU2 corresponds to global variable Y, and CPU3 corresponds to global variable Z.The deflected length of the tail pointer of the data message of CPU1 processing is m,
By deflected length m storage into global variable X;The deflected length of the tail pointer of the data message of CPU2 processing is n, and offset is grown
N storage is spent into global variable Y;The deflected length of the tail pointer of the data message of CPU3 processing is k, and deflected length k is stored
Into global variable Z.After data message is completed in upper-layer protocol processing, it is long that CPU1 obtains the offset being recorded in global variable X
Degree m deviates the tail pointer of data message according to deflected length m backward.Similarly, CPU2 and CPU3 can also be correctly extensive
The position of the tail pointer of multiple handled data message.
In the present embodiment, when member device receives the data message for carrying private data, it may be necessary to utilize the private
There are data to be used as business processing or control message forwarding, for example, private data includes the list item for forwarding the data message, at this point,
Member device can be read above-mentioned privately owned based on the length of the above-mentioned private data of pre-configuration from the message tail of the data message
Data.
After the member device obtains above-mentioned private data, which no longer needs to carry above-mentioned private data, this
When, above-mentioned private data can be abandoned, by this measure, which is reduced to when being swapped out distributed apparatus
Original message content.
As shown in Figure 1, private data length length5 is pre-configured on all member devices, any member equipment exists
It, can be after receiving the data message for carrying private data, according to private data length when needing using private data
Length5 reads the private data by the tail pointer biased forwards of message buffer to position D.After the completion of reading, because after
Continuous equipment is not necessarily to private data, and the position of tail pointer is no longer moved on to position E by member device, keeps tail pointer in the position D, will
The data message forwarding goes out distributed apparatus.
In conclusion in this application, the member device of distributed apparatus send protocol stack upper by record data message
Upper-layer protocol when, be directed toward the deflected length of the tail pointer of the message buffer of data message, upper-layer protocol processing after the completion of,
It can restore the position of tail pointer, and above-mentioned data message forwarding to next member is set according to the above-mentioned deflected length of record
It is standby, enable the member device of subsequently received above-mentioned data message to obtain the private data carried in above-mentioned data message.
Corresponding with the present invention transmission embodiment of method of private data, the present invention also provides for executing above-mentioned side
The embodiment of the device of method embodiment.
Referring to Fig. 3, one embodiment block diagram of the device of private data is transmitted for the present invention:
As shown in figure 3, the device 30 of the transmission private data includes:
Receiving unit 310, for receiving the data message for the carrying private data that other member devices are sent;The private
Having data includes the data transmitted between the member device of the distributed apparatus.
Recording unit 320, for when will send on the data message to when the upper-layer protocol processing of protocol stack, record to be directed toward
The deflected length of the tail pointer of the message buffer of the data message.
Recovery unit 330, for completing the data message when upper-layer protocol processing, the offset based on record is long
Degree, the position of the tail pointer is restored to initial position, and by the data message forwarding to next member device, so that connecing
The member device for receiving the data message obtains the private data carried in the data message.
In this example, the member device is device for multi-core;Wherein, a corresponding global change is set separately in every CPU
Amount;
The recording unit 320 is further used for when any CPU receives the data message for carrying private data, will
The deflected length is recorded in the corresponding global variable of CPU.
In this example, described device further include:
Encapsulation unit 340, for the private data of user configuration to be encapsulated in the tail portion of the data message, and according to private
The position for the tail pointer for thering is data length to modify in the message buffer.
Transmission unit 350, for the data message to be sent to next member device.
In this example, described device further include:
Reading unit 360 is based on when for receiving the data message for the carrying private data that other member devices are sent
The length for the private data being pre-configured reads the private data from the message tail of the data message.
In this example, described device further include:
Discarding unit 370, when for the data message to be produced the distributed apparatus, the datagram is directed toward in adjustment
The position of the tail pointer of the message buffer of text, abandons the private data.
The embodiment that the application transmits the device of private data can be applied on the member device of distributed apparatus.Device
Embodiment can also be realized by software realization by way of hardware or software and hardware combining.Taking software implementation as an example,
It is to be deposited by the processor of the member device of distributed apparatus where it by non-volatile as the device on a logical meaning
Corresponding computer program instructions are read into memory what operation was formed in reservoir.For hardware view, as shown in figure 4, being
A kind of hardware structure diagram of the member device of distributed apparatus where the application transmits the device of private data, in addition to shown in Fig. 4
Processor, memory, except network interface and nonvolatile memory, distributed apparatus in embodiment where device
Member device can also include other hardware generally according to the actual functional capability of the device of the transmission private data, no longer superfluous to this
It states.
The function of each unit and the realization process of effect are specifically detailed in the above method and correspond to step in above-mentioned apparatus
Realization process, details are not described herein.
For device embodiment, since it corresponds essentially to embodiment of the method, so related place is referring to method reality
Apply the part explanation of example.The apparatus embodiments described above are merely exemplary, wherein described be used as separation unit
The unit of explanation may or may not be physically separated, and component shown as a unit can be or can also be with
It is not physical unit, it can it is in one place, or may be distributed over multiple network units.It can be according to actual
The purpose for needing to select some or all of the modules therein to realize application scheme.Those of ordinary skill in the art are not paying
Out in the case where creative work, it can understand and implement.
The foregoing is merely the preferred embodiments of the application, not to limit the application, all essences in the application
Within mind and principle, any modification, equivalent substitution, improvement and etc. done be should be included within the scope of the application protection.
Claims (10)
1. a kind of method for transmitting private data, applied on the member device of distributed apparatus, the distributed apparatus at
Member's equipment is pre-configured with the length of private data characterized by comprising
Receive the data message for the carrying private data that other member devices are sent;The private data is included in the distribution
The data transmitted between the member device of formula equipment;
When will send on the data message to when the upper-layer protocol processing of protocol stack, the message that record is directed toward the data message is slow
Rush the deflected length of the tail pointer in area;
When the data message, the deflected length based on record, by the position of the tail pointer are completed in upper-layer protocol processing
Restore to initial position, and by the data message forwarding to next member device, so that receiving the member of the data message
The length of private data of the equipment based on the pre-configuration obtains correct private data from the data message tail portion.
2. the method according to claim 1, wherein the member device is device for multi-core;Wherein, every CPU
A corresponding global variable is set separately;
The method also includes:
When any CPU receives the data message for carrying private data, the deflected length is recorded in the corresponding overall situation of CPU
In variable.
3. the method according to claim 1, wherein the method also includes:
The private data of user configuration is encapsulated in the tail portion of the data message, and the report is modified according to private data length
The position of tail pointer in literary buffer area;
The data message is sent to next member device.
4. the method according to claim 1, wherein the method also includes:
When receiving the data message for the carrying private data that other member devices are sent, the private data based on pre-configuration
Length, read the private data from the message tail of the data message.
5. according to the method described in claim 4, it is characterized in that, the method also includes:
When the data message is produced the distributed apparatus, the tail that the message buffer of the data message is directed toward in adjustment refers to
The position of needle abandons the private data.
6. a kind of device for transmitting private data, applied on the member device of distributed apparatus, the distributed apparatus at
Member's equipment is pre-configured with the length of private data characterized by comprising
Receiving unit, for receiving the data message for the carrying private data that other member devices are sent;The private data
Including the data transmitted between the member device of the distributed apparatus;
Recording unit, for when will send on the data message to when the upper-layer protocol processing of protocol stack, record to be directed toward the number
According to the deflected length of the tail pointer of the message buffer of message;
Recovery unit, for completing the data message when upper-layer protocol processing, the deflected length based on record will be described
The position of tail pointer is restored to initial position, and by the data message forwarding to next member device, so that receiving the number
Correctly private is obtained from the data message tail portion based on the length of the private data of the pre-configuration according to the member device of message
There are data.
7. device according to claim 6, which is characterized in that the member device is device for multi-core;Wherein, every CPU
A corresponding global variable is set separately;
The recording unit is further used for when any CPU receives the data message for carrying private data, by the offset
Length records are in the corresponding global variable of CPU.
8. device according to claim 6, which is characterized in that described device further include:
Encapsulation unit, for the private data of user configuration to be encapsulated in the tail portion of the data message, and according to private data
Length modifies the position of the tail pointer in the message buffer;
Transmission unit, for the data message to be sent to next member device.
9. device according to claim 6, which is characterized in that described device further include:
Reading unit, when for receiving the data message for the carrying private data that other member devices are sent, based on pre-configuration
The private data length, read the private data from the message tail of the data message.
10. device according to claim 9, which is characterized in that described device further include:
Discarding unit, when for the data message to be produced the distributed apparatus, the report of the data message is directed toward in adjustment
The position of the tail pointer of literary buffer area abandons the private data.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610837535.3A CN106385418B (en) | 2016-09-21 | 2016-09-21 | A kind of method and device for transmitting private data |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610837535.3A CN106385418B (en) | 2016-09-21 | 2016-09-21 | A kind of method and device for transmitting private data |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106385418A CN106385418A (en) | 2017-02-08 |
CN106385418B true CN106385418B (en) | 2019-11-12 |
Family
ID=57935824
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610837535.3A Active CN106385418B (en) | 2016-09-21 | 2016-09-21 | A kind of method and device for transmitting private data |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106385418B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109600321B (en) * | 2017-09-30 | 2022-06-21 | 迈普通信技术股份有限公司 | Message forwarding method and device |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5898883A (en) * | 1994-01-25 | 1999-04-27 | Hitachi, Ltd. | Memory access mechanism for a parallel processing computer system with distributed shared memory |
CN105591982A (en) * | 2015-07-24 | 2016-05-18 | 杭州华三通信技术有限公司 | Message transmission method and device |
CN105721433A (en) * | 2016-01-18 | 2016-06-29 | 河南科技大学 | Access control method of user private data of online social networks |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9940229B2 (en) * | 2013-12-17 | 2018-04-10 | Intel Corporation | Technologies for persistent memory programming |
-
2016
- 2016-09-21 CN CN201610837535.3A patent/CN106385418B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5898883A (en) * | 1994-01-25 | 1999-04-27 | Hitachi, Ltd. | Memory access mechanism for a parallel processing computer system with distributed shared memory |
CN105591982A (en) * | 2015-07-24 | 2016-05-18 | 杭州华三通信技术有限公司 | Message transmission method and device |
CN105721433A (en) * | 2016-01-18 | 2016-06-29 | 河南科技大学 | Access control method of user private data of online social networks |
Also Published As
Publication number | Publication date |
---|---|
CN106385418A (en) | 2017-02-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104967585B (en) | A kind of method and apparatus of remote debugging mobile terminal | |
CN104618194B (en) | Software defined network monitoring messages method and SDN controllers, switching equipment | |
US8670460B2 (en) | Method and system for optimized transmission of data between a control device and a plurality of field devices | |
US10735373B2 (en) | Communications over multiple protocol interfaces in a computing environment | |
EP3211852A1 (en) | Ssh protocol-based session parsing method and system | |
CN107360177B (en) | A kind of message transmitting method and device based on UDP | |
US20170134495A1 (en) | Method and apparatus for sharing collaboratively edited document | |
CN110022264A (en) | Control method, access device and the computer readable storage medium of network congestion | |
CN112653656B (en) | Data communication method and device based on application layer protocol | |
CN106878181A (en) | A kind of message transmitting method and device | |
CN103685060B (en) | data packet sending method and device | |
CN105389120A (en) | Supporting RMA API over active message | |
JP7046983B2 (en) | Packet transmission method and equipment | |
CN106878072A (en) | A kind of message transmitting method and device | |
CN105190530A (en) | Transmitting hardware-rendered graphical data | |
CN103501282B (en) | Network message sending control method, virtual switch and physical machine | |
CN105591872B (en) | A kind of method and apparatus for realizing multiple data centers interconnection | |
CN108513701A (en) | Data transmission method, equipment, machine readable storage medium and system | |
CN106385418B (en) | A kind of method and device for transmitting private data | |
CN105939293B (en) | A kind of SKB recovery method and device | |
US20210203758A1 (en) | Network system and conversion apparatus crossing different transmission protocols | |
EP3857826B1 (en) | Flexible unnumbered destination tunnels for virtual networks | |
US20150199298A1 (en) | Storage and network interface memory share | |
CN106656842A (en) | Load balancing method and flow forwarding device | |
CN115604070A (en) | Message transmission method, device, equipment and medium based on MCTP (Multi-function peripheral protocol) |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
CB02 | Change of applicant information |
Address after: Binjiang District and Hangzhou city in Zhejiang Province Road 310051 No. 68 in the 6 storey building Applicant after: Hangzhou Dipu Polytron Technologies Inc Address before: Binjiang District and Hangzhou city in Zhejiang Province Road 310051 No. 68 in the 6 storey building Applicant before: Hangzhou Dipu Technology Co., Ltd. |
|
CB02 | Change of applicant information | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |