CN108833477A - Method for message transmission, system and device based on shared drive - Google Patents

Method for message transmission, system and device based on shared drive Download PDF

Info

Publication number
CN108833477A
CN108833477A CN201810466924.9A CN201810466924A CN108833477A CN 108833477 A CN108833477 A CN 108833477A CN 201810466924 A CN201810466924 A CN 201810466924A CN 108833477 A CN108833477 A CN 108833477A
Authority
CN
China
Prior art keywords
message
written
shared
information
shared drive
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201810466924.9A
Other languages
Chinese (zh)
Other versions
CN108833477B (en
Inventor
冯靖超
夏黎明
陈卓
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Baidu Online Network Technology Beijing Co Ltd
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN201810466924.9A priority Critical patent/CN108833477B/en
Publication of CN108833477A publication Critical patent/CN108833477A/en
Application granted granted Critical
Publication of CN108833477B publication Critical patent/CN108833477B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/544Buffers; Shared memory; Pipes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/546Message passing systems or structures, e.g. queues
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1061Peer-to-peer [P2P] networks using node-based peer discovery mechanisms
    • H04L67/1065Discovery involving distributed pre-established resource-based relationships among peers, e.g. based on distributed hash tables [DHT] 
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/12Messaging; Mailboxes; Announcements
    • H04W4/14Short messaging services, e.g. short message services [SMS] or unstructured supplementary service data [USSD]

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the present application discloses method for message transmission, system and device based on shared drive.One embodiment of the method for message transmission based on shared drive includes:It is written into message write-in shared drive unit in response to sending node, message to be written is verified;If verifying successfully, send to the receiving node for monitoring message to be written for prompting message to be written that the storage location information of the successful first information and message to be written is written;And read and complete in response to receiving node, the reading completion information for reading and completing will be used to indicate and sent to sending node.The embodiment is conducive to be promoted the efficiency of transmission of communication link and correspondingly reduces the system resource that communication layers occupy.

Description

Method for message transmission, system and device based on shared drive
Technical field
The invention relates to fields of communication technology, and in particular to the field of communication technology based on shared drive, especially It is related to method for message transmission, system and device based on shared drive.
Background technique
Shared drive (shared memory), refers in the computer system of multiprocessor, can be by different centres Manage the large capacity memory of device (CPU) access.
In the communication mode based on shared drive, point-to-point shared drive communication equipment is used in system between each node System.Specifically, sending node message to be sent can be written in shared drive;Correspondingly, receiving node can be specified Shared section key memory block in read target message, read after message and to empty memory block and by message flag position weight It sets.
Compared with traditional socket (socket) communication mode, the communication realized by the way of shared drive has biography The features such as defeated time delay is low, network throughput is big, CPU usage is low.
Summary of the invention
The embodiment of the present application proposes method for message transmission, system and device based on shared drive.
In a first aspect, the embodiment of the present application provides a kind of method for message transmission of shared drive, in response to sending node It is written into message write-in shared drive unit, message to be written is verified;If verifying successfully, disappear to monitoring is to be written The receiving node of breath is sent for prompting message to be written that the storage location of the successful first information and message to be written is written Information;And read and complete in response to receiving node, the reading completion information for reading and completing will be used to indicate and sent out to sending node It send.
In some embodiments, it is being written into message write-in shared drive unit in response to sending node, to be written Before message is verified, method further includes:In response to receiving the message write request of sending node transmission, in shared drive In unit, memory space is distributed for message to be written, wherein message write request includes the letter of memory space shared by message to be written Breath;And successful second information of creation memory headroom and storage location information are used to indicate to sending node transmission.
In some embodiments, the message write request sent in response to receiving sending node, in shared drive unit In, memory space is distributed for message to be written, including:Based on the sky of storage indicated by storage space information shared by message to be written Between, in shared drive unit, the memory space to match with memory space shared by message to be written is distributed for message to be written.
In some embodiments, completion is being read in response to receiving node, the reading read and completed will be used to indicate and completed After information is sent to sending node, method further includes:The message to be written in shared drive unit is deleted, and to be written to storing The storage location for entering message carries out flag bit resetting.
In some embodiments, message write request further includes the type of message and digital signature letter of message to be written Breath;Message to be written is verified, including:School is carried out to message to be written based on type of message and digital signature information It tests.
Second aspect, the embodiment of the present application also provides a kind of message delivery systems based on shared drive, including shared Internal storage location, shared-memory management device, at least one sending node and at least one receiving node;Wherein:Sending node is used for It is written into message write-in shared drive unit;Shared-memory management device, for being written into message in response to sending node Shared drive unit is written, message to be written is verified, if verifying successfully, to the receiving node for monitoring message to be written It sends for prompting message to be written that the storage location information of the successful first information and message to be written is written;Receive section Point, for monitoring shared-memory management device, and the storage location information in response to listening to first message and message to be written, from Message to be written is read in shared drive unit;Receiving node, after the reading for being also used to complete message to be written, into shared It deposits manager and sends reading completion information, shared-memory management device, which is also used to read, completes information to sending node forwarding.
In some embodiments, before sending node is written into message write-in shared drive unit, sending node It is also used to send message write request to shared-memory management device, wherein message write request includes depositing shared by message to be written Store up spatial information;Shared-memory management device is also used to based on storage space information shared by message to be written, in shared drive unit It is middle to create memory headroom corresponding with message to be written, it creates successfully in response to memory headroom, sends to sending node for referring to Show successful second information of creation memory headroom and storage location information.
In some embodiments, shared-memory management device is also used to:Letter is completed in the reading for receiving receiving node transmission Breath, and will read and complete information to after sending node forwarding, the message to be written in shared drive unit is deleted, and to storage The storage location of message to be written carries out flag bit resetting.
In some embodiments, message write request further includes the type of message and digital signature letter of message to be written Breath;Shared-memory management device is also used to verify message to be written based on type of message and digital signature information.
The third aspect, the embodiment of the present application also provides a kind of massage transmission devices based on shared drive, including:Verification Unit is configured to be written into message write-in shared drive unit in response to sending node, verify to message to be written; First transmission unit is sent to be written for prompting if being configured to verify successfully to the receiving node for monitoring message to be written Enter the storage location information that the successful first information and message to be written is written in message;And second transmission unit, configuration are used It is completed in being read in response to receiving node, the reading completion information for reading and completing will be used to indicate and sent to sending node.
In some embodiments, device further includes:Allocation unit, being configured to will in response to sending node in verification unit Shared drive unit is written in message to be written, before verifying to message to be written, sends in response to receiving sending node Message write request, in shared drive unit, for message to be written distribute memory space, wherein message write request packet Include storage space information shared by message to be written;And first transmission unit be further configured to sending node send be used for Successful second information of instruction creation memory headroom and storage location information.
In some embodiments, allocation unit is further configured to:Based on storage space information shared by message to be written Indicated memory space, in shared drive unit, for message to be written distribution and memory space phase shared by message to be written Matched memory space.
In some embodiments, device further includes:Reset cell is configured to save in the second transmission unit in response to receiving Point read complete, will be used to indicate read complete reading complete information to sending node send after, delete shared drive list Message to be written in member, and flag bit resetting is carried out to the storage location for storing message to be written.
In some embodiments, message write request further includes the type of message and digital signature letter of message to be written Breath;Verification unit is further configured to:Message to be written is verified based on type of message and digital signature information.
Fourth aspect, the embodiment of the present application also provides a kind of equipment, including:One or more processors;Storage device, For storing one or more programs, when one or more programs are executed by one or more processors, so that one or more Processor realizes such as any method of first aspect.
5th aspect, the embodiment of the present application also provide a kind of computer readable storage medium, are stored thereon with computer journey Sequence, wherein such as first aspect any method is realized when program is executed by processor.
Method for message transmission based on shared drive, system and device provided by the embodiments of the present application, by response to hair It send node to be written into message write-in shared drive unit, message to be written is verified;If verify successfully, to monitor to The receiving node of write-in message is sent for prompting message to be written that depositing for the successful first information and message to be written is written Store up location information;And read and complete in response to receiving node, the reading read and completed will be used to indicate and complete information to transmission Node forwarding.Sending node and receiving node timely learning opposite end can be enabled to the read-write state of message, be conducive to mention It rises the efficiency of transmission of communication link and correspondingly reduces the system resource that communication layers occupy.
Detailed description of the invention
By reading a detailed description of non-restrictive embodiments in the light of the attached drawings below, the application's is other Feature, objects and advantages will become more apparent upon:
Fig. 1 is that this application can be applied to exemplary system architecture figures therein;
Fig. 2 is the flow chart according to one embodiment of the method for message transmission based on shared drive of the application;
Fig. 3 is the flow chart according to another embodiment of the method for message transmission based on shared drive of the application;
Fig. 4 is the schematic diagram according to an application scenarios of the method for message transmission based on shared drive of the application;
Fig. 5 is the structure chart according to one embodiment of the massage transmission device based on shared drive of the application;
Fig. 6 is adapted for the structural schematic diagram for the computer system for realizing the server of the embodiment of the present application.
Specific embodiment
The application is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched The specific embodiment stated is used only for explaining related invention, rather than the restriction to the invention.It also should be noted that in order to Convenient for description, part relevant to related invention is illustrated only in attached drawing.
It should be noted that in the absence of conflict, the features in the embodiments and the embodiments of the present application can phase Mutually combination.The application is described in detail below with reference to the accompanying drawings and in conjunction with the embodiments.
Fig. 1 is shown can the method for message transmission based on shared drive using the application or disappearing based on shared drive Cease the exemplary system architecture 100 of the embodiment of transmitting device.
As shown in Figure 1, system architecture 100 may include shared-memory management device 101, shared drive unit 102, at least one A sending node 103 and at least one receiving node 104.
Shared-memory management device 101 can pass through network (not shown) and shared internal storage location 102, each sending node 103 and each receiving node 104 carry out data interaction, to receive or send relevant information.Network may include various connection types, Such as wired, wireless communication link or fiber optic cables etc..
It should be noted that the method for message transmission based on shared drive provided by the embodiment of the present application is generally by sharing Memory manager 101 executes, and correspondingly, the massage transmission device based on shared drive is generally arranged 101 in shared-memory management In device.
It should be understood that shared-memory management device 101, shared drive unit 102, sending node 103 and reception section in Fig. 1 The number of point 104 is only schematical.According to needs are realized, it can have any number of shared-memory management device, share Internal storage location, sending node and receiving node.
With continued reference to Fig. 2, one embodiment of the method for message transmission based on shared drive according to the application is shown Process 200.The method for message transmission based on shared drive, includes the following steps:
Step 201, it is written into message write-in shared drive unit in response to sending node, school is carried out to message to be written It tests.
In the present embodiment, based on shared drive unit method for message transmission operation thereon electronic equipment (such as Shared-memory management device shown in FIG. 1) current state of shared drive unit can be monitored, and in the state of shared drive unit When changing, corresponding operation is made.
For example, disappearing in application scenes if shared-memory management device listens to some sending node and is written into Breath is written in shared drive unit, can be verified to the message to be written.Pass through the process of verification, it can be determined that out altogether Whether consistent enjoy the message that message that internal storage location receives and sending node are sent.Herein, can using existing or Message verification is carried out to the verification mode of future exploitation.For example, even-odd check or CRC (Cyclical can be used Redundancy Check, Cyclic Redundancy Code) verification mode, come judge message that shared drive unit receives whether with hair The message for sending node to send is consistent.
In application scenes, shared-memory management device can be logical by wired connection mode or radio connection The mode of letter connection carrys out the check code that the message to be written being written by sending node is obtained from shared drive unit.It may be noted that , above-mentioned radio connection can include but is not limited to 3G/4G connection, WiFi connection, bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection and other currently known or exploitation in the future radio connections. Based on acquired check code, after the verification for completing message to be written, by check results (for example, being used to indicate whether school Test successful information) it is sent to sending node.
Step 202, it if verifying successfully, sends to the receiving node for monitoring message to be written for prompting message to be written The storage location information of the successful first information and message to be written is written.
Herein, if memory manager verifies successfully message to be written, it can be shown that the message to be written is legal Message.At this point it is possible to send the successful first information of message write-in to the receiving node for monitoring the message to be written and be somebody's turn to do The storage location information of message to be written.So, which can be based on the storage location information, in shared The message that its monitoring is read in memory cell, so that the receiving node can read the message needed for it in time, favorably In raising communication efficiency.
It is understood that the receiving node for monitoring the same message to be written can be multiple in application scenes. In these application scenarios, these receiving nodes can be by monitoring the same port, to determine whether there is its needs In the message write-in shared drive unit of reading.
In some optional implementations, storage location information of the message to be written in shared drive unit for example may be used To include the first address of the message shared storage region in shared drive unit.In these optional implementations, receive Node can be from the first address, the data sequentially stored in the reading continuous address space of shared drive unit, until Complete the reading of the message to be written.
Step 203, it reads and completes in response to receiving node, the reading read and completed will be used to indicate and complete information to transmission Node is sent.
Herein, each message to be written that shared drive unit is written can have the tail portion of same format.So, Receiving node once reads the data with the format, and the message to be written reading that can determine that its expectation is read finishes.
It, can after the tail portion that receiving node receives the message to be written that its expectation is read in application scenes With to shared-memory management device send read complete message, shared-memory management device can receive the reading complete message it Afterwards, it is forwarded to corresponding sending node.
Alternatively, shared-memory management device can also monitor the reading of shared drive unit in real time in other application scenarios Take state.Once the tail portion for monitoring message to be written has been received node and has read completion, then sent to corresponding sending node It is used to indicate receiving node and reads the reading completion message completed.
In addition, completing message, shared drive pipe in addition to sending to read to sending node in some optional implementations At the time of node completion message to be written reading can also be transmitted and received to sending node by managing device.For example, shared-memory management device It can be when determining that receiving node completes the reading of message to be written (for example, being completed in the reading for receiving receiving node transmission Message or when monitoring receiving node and completing the reading of message to be sent), obtain current system time, and will be acquired System time to sending node send.
Method for message transmission provided in this embodiment based on shared drive, is disappeared by being written into response to sending node Breath write-in shared drive unit, verifies message to be written;If verifying successfully, to the reception section for monitoring message to be written Point is sent for prompting message to be written that the storage location information of the successful first information and message to be written is written;And it rings It should read and complete in receiving node, the reading completion information for reading and completing will be used to indicate and forwarded to sending node.It can make Sending node and receiving node can timely learning opposite end to the read-write state of message, be conducive to the transmission effect for promoting communication link Rate simultaneously correspondingly reduces the system resource that communication layers occupy.
It is shown in Figure 3, it is the signal of another embodiment of the method for message transmission based on shared drive of the application Property flow chart.The method for message transmission based on shared drive of the present embodiment includes:
Step 301, in response to receive sending node transmission message write request, in shared drive unit, for Message is written and distributes memory space, wherein message write request includes storage space information shared by message to be written.
When sending node has data sharing demand, message write request can be sent to shared-memory management device.Due to Message write request includes storage space information shared by message to be written, and shared-memory management device is asked receiving message write-in After asking, can the memory space according to needed for message to be written distribute phase in shared drive unit for the information to be written The memory space answered.
It is understood that if the currently available memory space inadequate of shared drive unit to store the message to be written, is total to Corresponding message can be sent to sending node by enjoying memory manager, to notify the sending node that can not currently execute writing for message Enter.
In some optional implementations, shared-memory management device is asked in the message write-in for receiving sending node transmission After asking, can be in shared drive unit based on memory space indicated by storage space information shared by message to be written The memory space that message distribution to be written matches with memory space shared by message to be written, so that the storage distributed is empty Between (for example, equal) is matched with the memory space of occupancy needed for message to be written.So, it can be effectively prevented from altogether The waste of memory space in internal storage location is enjoyed, the utilization rate of the memory space of shared drive unit is promoted.
Step 302, successful second information of creation memory headroom and storage location letter are used to indicate to sending node transmission Breath.
It completes in shared drive unit after the distribution of memory space, can be asked to write-in is issued in shared-memory management device The sending node transmission asked is used to indicate the successful information of creation memory headroom and the memory space for message establishing to be written Storage location information.So, the memory space write-in that sending node can be created into shared drive unit disappears Breath.
Step 303, it is written into message write-in shared drive unit in response to sending node, school is carried out to message to be written It tests.
Step 304, it if verifying successfully, sends to the receiving node for monitoring message to be written for prompting message to be written The storage location information of the successful first information and message to be written is written.
Step 305, it reads and completes in response to receiving node, the reading read and completed will be used to indicate and complete information to transmission Node is sent.
303~the step 305 of above-mentioned steps of the present embodiment can use and the step 201 in embodiment illustrated in fig. 2~step Rapid 203 similar modes execute, and details are not described herein.
In some optional implementations of the present embodiment, message write request can also include disappearing for message to be written Cease type and digital signature information.
In these optional implementations, the present embodiment step 303 verifies message to be written, can also be into One step includes:
Message to be written is verified based on type of message and digital signature information.
Herein, different type of messages and/or different digital signature informations may correspond to different message parsings Mode.Correspondingly, it if message write request contains the type of message and digital signature information of message to be written, is treating When write-in message is verified, the calculation adaptable with the type of message of the message to be written and its digital signature information can choose Method is parsed, to improve the efficiency of message verification.
The method for message transmission based on shared drive of the present embodiment is highlighted and is being sent out compared with embodiment shown in Fig. 2 It send node to be written into before message write-in shared drive unit, distributes memory space and anti-to sending node for message to be written Present the process of corresponding message.So that the information exchange timeliness between sending node and shared-memory management device is stronger, favorably In the interactive efficiency for promoting interaction between sending node and receiving node.
In some optional implementations of each embodiment of the application, completes, will use being read in response to receiving node After the reading completion information that completion is read in instruction is sent to sending node, the message transmission based on shared drive of the application Method can further include:
The message to be written in shared drive unit is deleted, and flag bit is carried out to the storage location for storing message to be written Resetting.
In these optional implementations, since receiving node has been completed the reading of message, storage can be deleted Message in shared drive unit, to discharge this part memory space.So, shared drive list can be conducive to The utilization rate of first memory space accelerates the read-write efficiency of the stored message of shared drive unit.
It is shown in Figure 4, it is the signal of an application scenarios of the method for message transmission based on shared drive of the application Figure.
Firstly, if the demand of the oriented shared drive unit write-in message of sending node, it can be first to shared-memory management device Send the message header (header) of message to be written.May include in message header memory space shared by the message, type of message, when Preceding system timestamp, MD5 etc..
Then, shared-memory management device can distribute corresponding memory space in shared drive unit for the message, such as Shown in appended drawing reference 401.After the distribution for completing memory space, shared-memory management device can send to sending node and notify Message, to notify that it is ready that sending node shared memory space is ready for.For example, confirmation character can be sent to sending node The first address of create_block_ack and the shared drive unit for message distribution.
Then, message can be written in the memory space for the distribution of this message into shared drive unit in sending node. After completing message write-in, shared-memory management device can receive node according to the information butt joint in header and store to shared interior The message of memory cell storage is verified, as shown in appended drawing reference 402.If verification is errorless, receiving node can be notified, message is It is written in shared drive unit.For example, confirmation character write_finish_ack and the message can be sent to receiving node First address in shared drive unit.
Then, receiving node can be according to first address of the message in shared drive unit, from shared drive unit Message is read, as shown in appended drawing reference 403.
Then, if receiving node completes the reading of message, shared-memory management device can send notice to sending node and disappear Breath, to notify the message of its write-in of sending node to be read.For example, shared-memory management device can be sent really to sending node It reads and accords with read_finish_ack.
Then, shared-memory management device can delete this message, and carry out flag bit to the memory space occupied by it Resetting, as shown by reference numeral 404.It deletes completing message with after flag bit resetting, shared-memory management device can be to hair Node is sent to send confirmation character connect_finish_ack, to notify sending node that can carry out the write-in of lower a piece of news.
So, the memory space in shared drive unit can be discharged in time, and it is empty to improve the storage of shared drive unit Between utilization rate.
It is understood that under respectively the recipient of confirmation character can determine performed by it according to the value of confirmation character Single stepping.For example, may indicate that memory creates successfully if create_block_ack.success=true.Send section Message can be written into the memory space of specified shared drive unit in point.Conversely, then show that memory does not create success, At this point, sending node can send header to shared-memory management device again.Similarly, if read_finish_ Ack.success=true then shows that receiving node reads message success.Otherwise, it means that receiving node is read not successfully, altogether Enjoying memory manager can notify receiving node to read again.In addition, if connect_finish_ack.success=true, Then show this message transmission success, the transmission of lower a piece of news can be carried out.
In addition, disclosed herein as well is the message delivery systems based on shared drive.It in some embodiments, should be based on altogether The message delivery system for enjoying memory may include shared drive unit, shared-memory management device, at least one sending node and extremely A few receiving node, being somebody's turn to do the message delivery system based on shared drive can have the framework similar with Fig. 1.
Specifically, sending node can be used for being written into message write-in shared drive unit.
Shared-memory management device can be used for being written into message write-in shared drive unit in response to sending node, and treat Write-in message is verified.If verifying successfully, send to the receiving node for monitoring message to be written for prompting to be written disappear The storage location information of the successful first information and message to be written is written in breath.
Receiving node can be used for monitoring shared-memory management device, and in response to listening to first message and message to be written Storage location information reads message to be written from shared drive unit.
Receiving node can also be used in after the reading for completing message to be written, sends to read to shared-memory management device and complete Information, shared-memory management device, which is also used to read, completes information to sending node forwarding.
So, sending node and receiving node timely learning opposite end can be enabled to the read-write state of message, Be conducive to be promoted the efficiency of transmission of communication link and correspondingly reduce the system resource that communication layers occupy.
In some optional implementations, before sending node is written into message write-in shared drive unit, Sending node can also be used to send message write request to shared-memory management device.Wherein, message write request includes to be written Storage space information shared by message.
In these optional implementations, shared-memory management device can also be used in empty based on the shared storage of message to be written Between information, corresponding with message to be written memory headroom is created in shared drive unit, is created successfully in response to memory headroom, Successful second information of creation memory headroom and storage location information are used to indicate to sending node transmission.
In some optional implementations, shared-memory management device can also be used in:Receiving receiving node transmission It reads and completes information, and will read and complete information to after sending node forwarding, delete to be written disappearing in shared drive unit Breath, and flag bit resetting is carried out to the storage location for storing message to be written.
In some optional implementations, message write request can also include message to be written type of message and Digital signature information.In these optional implementations, shared-memory management device can also be used in based on type of message and number Word signing messages verifies message to be written.
With further reference to Fig. 5, as the realization to method shown in above-mentioned each figure, this application provides one kind based on shared interior The one embodiment for the massage transmission device deposited, the Installation practice is corresponding with embodiment of the method shown in Fig. 2, device tool Body can be applied in various electronic equipments.
As shown in figure 5, the massage transmission device based on shared drive of the present embodiment may include verification unit 501, One transmission unit 502 and the second transmission unit 503.
Verification unit 501 is configurable to be written into message write-in shared drive unit in response to sending node, treats Write-in message is verified.
If the first transmission unit 502 is configurable to verify successfully, sent to the receiving node for monitoring message to be written For prompting message to be written that the storage location information of the successful first information and message to be written is written.
Second transmission unit 503 is configurable to read in response to receiving node and complete, and reads completion for being used to indicate It reads and completes information to sending node transmission.
In some optional implementations, the massage transmission device based on shared drive of the present embodiment can also include Allocation unit (not shown).
In these optional implementations, allocation unit is configurable in verification unit 501 in response to sending node It is written into message write-in shared drive unit, before verifying to message to be written, in response to receiving sending node hair The message write request sent distributes memory space in shared drive unit for message to be written.Wherein, message write request Including storage space information shared by message to be written.
In addition, the first transmission unit 502 can also be further configured to transmission in these optional implementations Node transmission is used to indicate successful second information of creation memory headroom and storage location information.
In some optional implementations, allocation unit can also be further configured to:Based on message institute to be written Memory space indicated by storage space information is accounted for, in shared drive unit, for message to be written distribution and message to be written The memory space that shared memory space matches.
In some optional implementations, the massage transmission device based on shared drive of the present embodiment may also include weight Set unit (not shown).
In these optional implementations, reset cell can also be configured in the second transmission unit in response to receiving Node read complete, will be used to indicate read complete reading complete information to sending node send after, delete shared drive Message to be written in unit, and flag bit resetting is carried out to the storage location for storing message to be written.
In some optional implementations, message write request can also include message to be written type of message and Digital signature information.
In these optional implementations, verification unit 501 can also be further configured to:Based on type of message with And digital signature information verifies message to be written.
Below with reference to Fig. 6, it illustrates the computers for the shared-memory management device for being suitable for being used to realize the embodiment of the present application The structural schematic diagram of system 600.Shared-memory management device shown in Fig. 6 is only an example, should not be to the embodiment of the present application Function and use scope bring any restrictions.
As shown in fig. 6, computer system 600 includes central processing unit (CPU) 601, it can be read-only according to being stored in Program in memory (ROM) 602 or be loaded into the program in random access storage device (RAM) 603 from storage section 608 and Execute various movements appropriate and processing.In RAM 603, also it is stored with system 600 and operates required various programs and data. CPU 601, ROM 602 and RAM 603 are connected with each other by bus 604.Input/output (I/O) interface 605 is also connected to always Line 604.
I/O interface 605 is connected to lower component:Storage section 606 including hard disk etc.;And including such as LAN card, tune The communications portion 607 of the network interface card of modulator-demodulator etc..Communications portion 607 executes mailing address via the network of such as internet Reason.Driver 608 is also connected to I/O interface 605 as needed.Detachable media 609, such as disk, CD, magneto-optic disk, half Conductor memory etc. is mounted on as needed on driver 608, in order to as needed from the computer program read thereon It is mounted into storage section 606.
Particularly, in accordance with an embodiment of the present disclosure, it may be implemented as computer above with reference to the process of flow chart description Software program.For example, embodiment of the disclosure includes a kind of computer program product comprising be carried on computer-readable medium On computer program, which includes the program code for method shown in execution flow chart.In such reality It applies in example, which can be downloaded and installed from network by communications portion 607, and/or from detachable media 609 are mounted.When the computer program is executed by central processing unit (CPU) 601, limited in execution the present processes Above-mentioned function.It should be noted that computer-readable medium described herein can be computer-readable signal media or Computer readable storage medium either the two any combination.Computer readable storage medium for example can be --- but Be not limited to --- electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor system, device or device, or any above combination. The more specific example of computer readable storage medium can include but is not limited to:Electrical connection with one or more conducting wires, Portable computer diskette, hard disk, random access storage device (RAM), read-only memory (ROM), erasable type may be programmed read-only deposit Reservoir (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-ROM), light storage device, magnetic memory Part or above-mentioned any appropriate combination.In this application, computer readable storage medium, which can be, any include or stores The tangible medium of program, the program can be commanded execution system, device or device use or in connection.And In the application, computer-readable signal media may include in a base band or the data as the propagation of carrier wave a part are believed Number, wherein carrying computer-readable program code.The data-signal of this propagation can take various forms, including but not It is limited to electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be computer Any computer-readable medium other than readable storage medium storing program for executing, the computer-readable medium can send, propagate or transmit use In by the use of instruction execution system, device or device or program in connection.Include on computer-readable medium Program code can transmit with any suitable medium, including but not limited to:Wirelessly, electric wire, optical cable, RF etc., Huo Zheshang Any appropriate combination stated.
The calculating of the operation for executing the application can be write with one or more programming languages or combinations thereof Machine program code, described program design language include object oriented program language-such as Java, Smalltalk, C+ +, it further include conventional procedural programming language-such as " C " language or similar programming language.Program code can Fully to execute, partly execute on the user computer on the user computer, be executed as an independent software package, Part executes on the remote computer or executes on a remote computer or server completely on the user computer for part. In situations involving remote computers, remote computer can pass through the network of any kind --- including local area network (LAN) Or wide area network (WAN)-is connected to subscriber computer, or, it may be connected to outer computer (such as utilize Internet service Provider is connected by internet).
Flow chart and block diagram in attached drawing are illustrated according to the system of the various embodiments of the application, method and computer journey The architecture, function and operation in the cards of sequence product.In this regard, each box in flowchart or block diagram can generation A part of one module, program segment or code of table, a part of the module, program segment or code include one or more use The executable instruction of the logic function as defined in realizing.It should also be noted that in some implementations as replacements, being marked in box The function of note can also occur in a different order than that indicated in the drawings.For example, two boxes succeedingly indicated are actually It can be basically executed in parallel, they can also be executed in the opposite order sometimes, and this depends on the function involved.Also it to infuse Meaning, the combination of each box in block diagram and or flow chart and the box in block diagram and or flow chart can be with holding The dedicated hardware based system of functions or operations as defined in row is realized, or can use specialized hardware and computer instruction Combination realize.
Being described in unit involved in the embodiment of the present application can be realized by way of software, can also be by hard The mode of part is realized.Described unit also can be set in the processor, for example, can be described as:A kind of processor packet Include verification unit, the first transmission unit and the second transmission unit.Wherein, the title of these units is not constituted under certain conditions Restriction to the unit itself, for example, verification unit is also described as " being written into message write-in in response to sending node Shared drive unit, the unit that message to be written is verified ".
As on the other hand, present invention also provides a kind of computer-readable medium, which be can be Included in device described in above-described embodiment;It is also possible to individualism, and without in the supplying device.Above-mentioned calculating Machine readable medium carries one or more program, when said one or multiple programs are executed by the device, so that should Device:It is written into message write-in shared drive unit in response to sending node, message to be written is verified;If verification at Function, then to the receiving node for monitoring message to be written send for prompt message to be written be written the successful first information and to The storage location information of message is written;And read and complete in response to receiving node, by being used to indicate, the reading that reading is completed is complete It is sent at information to sending node.
Above description is only the preferred embodiment of the application and the explanation to institute's application technology principle.Those skilled in the art Member is it should be appreciated that invention scope involved in the application, however it is not limited to technology made of the specific combination of above-mentioned technical characteristic Scheme, while should also cover in the case where not departing from foregoing invention design, it is carried out by above-mentioned technical characteristic or its equivalent feature Any combination and the other technical solutions formed.Such as features described above has similar function with (but being not limited to) disclosed herein Can technical characteristic replaced mutually and the technical solution that is formed.

Claims (16)

1. a kind of method for message transmission based on shared drive, including:
It is written into message write-in shared drive unit in response to sending node, the message to be written is verified;
If verifying successfully, send to the receiving node for monitoring the message to be written for prompting the message write-in to be written The storage location information of the successful first information and the message to be written;And
It reads and completes in response to the receiving node, the reading read and completed will be used to indicate and complete information to the sending node It sends.
2. according to the method described in claim 1, wherein, it is described be written into response to sending node message write-in it is shared in Memory cell, before being verified to the message to be written, the method also includes:
The message write request sent in response to receiving the sending node is to be written in the shared drive unit Message distributes memory space, wherein the message write request includes storage space information shared by message to be written;And
Successful second information of creation memory headroom and storage location information are used to indicate to sending node transmission.
3. according to the method described in claim 2, wherein, the message in response to receiving the sending node transmission is written Request distributes memory space in shared drive unit for message to be written, including:
Based on memory space indicated by storage space information shared by the message to be written, in the shared drive unit, The memory space to match for the message distribution to be written with memory space shared by the message to be written.
4. according to the method described in claim 1, wherein, being completed in described read in response to the receiving node, being used to refer to After showing that the reading completion information for reading and completing is sent to the sending node, the method also includes:
Delete the message to be written in the shared drive unit, and to store the storage location of the message to be written into The resetting of line flag position.
5. according to the method described in claim 2, wherein, the message write request further includes the message of the message to be written Type and digital signature information;It is described that the message to be written is verified, including:
The message to be written is verified based on the type of message and the digital signature information.
6. a kind of message delivery system based on shared drive, including shared drive unit, shared-memory management device, at least one Sending node and at least one receiving node;
Wherein:
The sending node is written in the shared drive unit for being written into message;
The shared drive unit is written for being written into message in response to sending node in the shared-memory management device, right The message to be written is verified, if verifying successfully, is sent to the receiving node for monitoring the message to be written for mentioning Show that the storage location information of the successful first information and the message to be written is written in the message to be written;
The receiving node, for monitoring the shared-memory management device, and in response to listening to the first message and described The storage location information of message to be written reads the message to be written from the shared drive unit;
The receiving node after the reading for being also used to complete the message to be written, is sent to the shared-memory management device It reads and completes information, the shared-memory management device is also used to forward reading completion information to the sending node.
7. system according to claim 6 is written into it in message write-in shared drive unit in the sending node Before, the sending node is also used to send message write request to the shared-memory management device, wherein the message write-in is asked It asks including storage space information shared by message to be written;
The shared-memory management device is also used to based on storage space information shared by the message to be written, in the shared drive Creation memory headroom corresponding with the message to be written in unit creates successfully in response to memory headroom, to transmission section Point, which is sent, is used to indicate successful second information of creation memory headroom and storage location information.
8. system according to claim 6, wherein the shared-memory management device is also used to:
In the reading completion information for receiving the receiving node and sending, and the reading is completed into information to the transmission After node forwarding, the message to be written in the shared drive unit is deleted, and to the storage message to be written Storage location carries out flag bit resetting.
9. system according to claim 6, wherein the message write request further includes the message of the message to be written Type and digital signature information;
The shared-memory management device is also used to based on the type of message and the digital signature information to described to be written Message is verified.
10. a kind of massage transmission device based on shared drive, including:
Verification unit is configured to be written into message write-in shared drive unit in response to sending node, to described to be written Message is verified;
First transmission unit is used for if being configured to verify successfully to the receiving node transmission for monitoring the message to be written Prompt the message to be written that the storage location information of the successful first information and the message to be written is written;And
Second transmission unit is configured to read in response to the receiving node and complete, will be used to indicate the reading read and completed Information is completed to send to the sending node.
11. device according to claim 10, wherein described device further includes:
Allocation unit is configured to be written into message write-in shared drive list in response to sending node in the verification unit Member, before being verified to the message to be written, the message write request sent in response to receiving the sending node, In the shared drive unit, memory space is distributed for message to be written, wherein the message write request includes to be written disappears Cease shared storage space information;And
First transmission unit, which is further configured to send to the sending node, is used to indicate creation memory headroom success The second information and storage location information.
12. device according to claim 11, wherein the allocation unit is further configured to:
Based on memory space indicated by storage space information shared by the message to be written, in the shared drive unit, The memory space to match for the message distribution to be written with memory space shared by the message to be written.
13. device according to claim 10, wherein described device further includes:
Reset cell is configured to read in second transmission unit in response to the receiving node and complete, will be used to indicate After the reading completion information that reading is completed is sent to the sending node, delete described to be written in the shared drive unit Enter message, and flag bit resetting is carried out to the storage location for storing the message to be written.
14. device according to claim 11, wherein the message write request further includes disappearing for the message to be written Cease type and digital signature information;The verification unit is further configured to:
The message to be written is verified based on the type of message and the digital signature information.
15. a kind of equipment, including:
One or more processors;
Storage device, for storing one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processors are real Now such as method as claimed in any one of claims 1 to 5.
16. a kind of computer readable storage medium, is stored thereon with computer program, wherein described program is executed by processor Shi Shixian method for example as claimed in any one of claims 1 to 5.
CN201810466924.9A 2018-05-16 2018-05-16 Message transmission method, system and device based on shared memory Active CN108833477B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810466924.9A CN108833477B (en) 2018-05-16 2018-05-16 Message transmission method, system and device based on shared memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810466924.9A CN108833477B (en) 2018-05-16 2018-05-16 Message transmission method, system and device based on shared memory

Publications (2)

Publication Number Publication Date
CN108833477A true CN108833477A (en) 2018-11-16
CN108833477B CN108833477B (en) 2020-09-29

Family

ID=64148123

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810466924.9A Active CN108833477B (en) 2018-05-16 2018-05-16 Message transmission method, system and device based on shared memory

Country Status (1)

Country Link
CN (1) CN108833477B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110489246A (en) * 2019-08-12 2019-11-22 北京中科寒武纪科技有限公司 Data transmission and EMS memory management process, device and Related product
CN114691051A (en) * 2022-05-30 2022-07-01 恒生电子股份有限公司 Data processing method and device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030145136A1 (en) * 2002-01-31 2003-07-31 Tierney Gregory E. Method and apparatus for implementing a relaxed ordering model in a computer system
CN101000596A (en) * 2007-01-22 2007-07-18 北京中星微电子有限公司 Chip and communication method of implementing communicating between multi-kernel in chip and communication method
CN101034381A (en) * 2006-03-08 2007-09-12 松下电器产业株式会社 Multi-master system and data transfer system
CN102426536A (en) * 2011-10-26 2012-04-25 深圳市亚特尔科技有限公司 Multitask data communication implementation method and system
CN107704325A (en) * 2016-08-08 2018-02-16 北京百度网讯科技有限公司 Method and apparatus for transmitting message between process
CN108011913A (en) * 2016-12-29 2018-05-08 北京车和家信息技术有限责任公司 Data transmission method, vehicle device display device, vehicle multimedia device and system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030145136A1 (en) * 2002-01-31 2003-07-31 Tierney Gregory E. Method and apparatus for implementing a relaxed ordering model in a computer system
CN101034381A (en) * 2006-03-08 2007-09-12 松下电器产业株式会社 Multi-master system and data transfer system
CN101000596A (en) * 2007-01-22 2007-07-18 北京中星微电子有限公司 Chip and communication method of implementing communicating between multi-kernel in chip and communication method
CN102426536A (en) * 2011-10-26 2012-04-25 深圳市亚特尔科技有限公司 Multitask data communication implementation method and system
CN107704325A (en) * 2016-08-08 2018-02-16 北京百度网讯科技有限公司 Method and apparatus for transmitting message between process
CN108011913A (en) * 2016-12-29 2018-05-08 北京车和家信息技术有限责任公司 Data transmission method, vehicle device display device, vehicle multimedia device and system

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110489246A (en) * 2019-08-12 2019-11-22 北京中科寒武纪科技有限公司 Data transmission and EMS memory management process, device and Related product
CN110489246B (en) * 2019-08-12 2022-06-07 中科寒武纪科技股份有限公司 Data transmission and memory management method, device and related product
CN114691051A (en) * 2022-05-30 2022-07-01 恒生电子股份有限公司 Data processing method and device
CN114691051B (en) * 2022-05-30 2022-10-04 恒生电子股份有限公司 Data processing method and device

Also Published As

Publication number Publication date
CN108833477B (en) 2020-09-29

Similar Documents

Publication Publication Date Title
CN109471744B (en) Main chain and parallel multi-sub-chain system architecture based on block chain
CN109508246A (en) Log recording method, system and computer readable storage medium
JP6934921B2 (en) A method and device for managing registration certificates by relaying between ECA and DCM in a security authentication management system for V2X communication.
CN109101330A (en) Data capture method, device and system
CN110831005B (en) Equipment adding method of Mesh network, gateway equipment and storage medium
CN108833477A (en) Method for message transmission, system and device based on shared drive
CN108924194A (en) Car networking communication means, car networking is closed and data transmission system
CN110648534A (en) Traffic data chaining method and device of Internet of things based on block chain
CN110032082A (en) Intelligent household equipment management system and method
CN109101664A (en) A kind of data transmission method, device, equipment and the medium of lightweight node
CN115037472B (en) Transaction processing method and system based on double-layer DAG consensus mechanism and service equipment
CN110555079A (en) Data processing method, device, equipment and storage medium
CN107135108A (en) The update method and system of network connection list
CN116055052A (en) Block chain-based data processing method, device, equipment and readable storage medium
CN112486825A (en) Multi-lane environment architecture system, message consumption method, device, equipment and medium
CN108834220A (en) On board unit, mobile unit, management system and on board unit management method
CN109981778B (en) Method, device, equipment and storage medium for realizing service of content distribution network
US8412844B2 (en) Validating download success
CN112581659A (en) Digital key user passing method, device, system and storage medium
CN106997665A (en) The distribution method and system on intelligent transportation regular bus parking stall
CN109101438A (en) Method and apparatus for storing data
CN112738153B (en) Gateway selection method, system, device, server and medium in service system
CN109639707A (en) Data transmission method, equipment, system and medium based on gateway
CN108595444A (en) Voice translation method and device
CN107155183A (en) The data ciphering method and system of smart home

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant