CN100372406C - Method and apparatus for transmitting data between substation plates - Google Patents

Method and apparatus for transmitting data between substation plates Download PDF

Info

Publication number
CN100372406C
CN100372406C CNB2005100087538A CN200510008753A CN100372406C CN 100372406 C CN100372406 C CN 100372406C CN B2005100087538 A CNB2005100087538 A CN B2005100087538A CN 200510008753 A CN200510008753 A CN 200510008753A CN 100372406 C CN100372406 C CN 100372406C
Authority
CN
China
Prior art keywords
data
buffer area
message
write
task
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.)
Expired - Fee Related
Application number
CNB2005100087538A
Other languages
Chinese (zh)
Other versions
CN1825990A (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CNB2005100087538A priority Critical patent/CN100372406C/en
Publication of CN1825990A publication Critical patent/CN1825990A/en
Application granted granted Critical
Publication of CN100372406C publication Critical patent/CN100372406C/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The present invention provides a method for transmitting data between substation plates, which is used for data transmission between a master control plate and a single plate. With the present invention, firstly the data of the master control plate is read and stored temporarily, and then the data stored temporarily is read and written in a storage medium. By increasing a step that the data read from the master control plate is stored temporarily, the present invention causes the process that the data is read form the master control plate and the process that the data is written in the storage medium at the side of the single plate to be two independent processes. A data read process and a data written process are turned into paralleling processes. Accordingly, the processes of read waiting and write-in waiting in the prior art are omitted, and thereby, the transmission efficiency of the data transmission at the side of the single plate is enhanced.

Description

The method of transmitting data between substation plates and device
Technical field
The present invention relates to moving communicating field, be specifically related to the method for base station master control borad to each veneer transmission data.
Background technology
The base station is made of master control borad and veneer, and master control borad is preserved the software of whole base station, and when each veneer need carry out software upgrading, master control borad was sent to each veneer to the software data that reads, and the veneer side writes the data that receive in separately the storage medium.The method of transmitting data between substation plates is at present: in the veneer side message is set and reads task, read the data from master control borad, order writes in the storage medium of veneer then.
But the method for transmitting data between substation plates in the prior art, because reading, writing of veneer side data is a process of order, that is to say, read and the ablation process of data is processes of a serial, therefore when the transmission data, there is defective: when data volume increases, message reads the time of task reading of data and time that data write storage medium will prolong thereupon, and this moment, the real process of transfer of data was: read, etc. to be read, write, write wait.Because the transfer of data of veneer side is the process of a serial, so data read writes the fashionable stand-by period and can't make full use of, thereby it is lower to cause the veneer side joint to receive the efficient of data.
On the other hand, the efficient of veneer side joint receipts data is write the effectiveness affects of storage medium, same because data to read with ablation process be the process of a serial, data just can be carried out data read after must waiting to be written finishing, when therefore the speed that causes data to write storage medium when the data volume increase slows down, message reads task and will not go to receive message for a long time, thereby will cause the efficient of veneer side data transmission to reduce.
Summary of the invention
The technical problem to be solved in the present invention is: a kind of method and device of transmitting data between substation plates are provided, can improve the efficiency of transmission of veneer side data.
For solving the problems of the technologies described above, the invention provides a kind of method of transmitting data between substation plates, be used for the transfer of data between master control borad and veneer, comprise step:
1) buffer area is set and message is set writes task at veneer;
2) read main control board data and write described buffer area;
3) message writes the data that order that task writes described buffer area according to data reads described buffer area,
And write the storage medium of veneer.
The described process that buffer area is set is specially:
Described buffer area is divided into a plurality of sub-buffer areas;
The process that described data write described buffer area is specially:
Described data are write described sub-buffer area successively according to described sub-buffer area sequence of addresses.
The process that described data write described buffer area specifically can also for:
Described data are numbered;
Data after the numbering are write described sub-buffer area;
In addition, described method also comprises:
Signalization amount mechanism;
When reading main control board data, judge according to described Semaphore Mechanism whether the data of interim storage are writing storage medium, if judged result is for being then wait; If judged result is that then execution in step 2);
When the data with described interim storage write storage medium, judge whether to read main control board data according to described Semaphore Mechanism, if judged result is for being then wait; If judged result is that then execution in step 3).
Wherein, described method also comprises: at veneer message is set and reads task; And,
Message reads task and reads from the data of master control borad and write described buffer area.
The present invention also provides a kind of device of transmitting data between substation plates, comprising:
Master control borad and the veneer that is connected with master control borad;
Described veneer comprises that message reads TU task unit, is used to read the data from master control borad;
The storage medium unit is used to store described data;
Described veneer also comprises:
Temporary storage cell is used to store the data that read TU task unit from message;
Message writes TU task unit, is used for from described temporary storage cell reading of data;
Message reads TU task unit and reads from the data of master control borad and write described temporary storage cell, and message writes TU task unit from described temporary storage cell reading of data and write described storage medium unit.
Wherein, described temporary storage cell also comprises the semaphore protected location, is used to guarantee that described message writes the read-write mutual exclusion that TU task unit and described message read TU task unit.
Compared with prior art, the invention has the beneficial effects as follows: when the veneer side is carried out transfer of data, the present invention will be from the interim step of storing of the data that master control borad reads by increasing, to be divided into two independently processes from the master control borad reading of data with the storage medium that data write the veneer side, make reading of data become parallel process with ablation process, read the process of waiting for and writing wait in the prior art thereby saved, thereby improved the efficiency of transmission of veneer side data transmission.
Further, data for same sub-buffer area, fully promptly be written into storage medium and cause loss of data in order to prevent that data from not reading as yet, the present invention reads task and message in message and writes and use Semaphore Mechanism to guarantee to read and write mutual exclusion between the task, promptly for same sub-buffer area, message reads task run, or message writes task run, thereby has guaranteed the correctness and the integrality of data.
In addition, message writes task and write calling over of buffer area originally according to data when reading the buffer area data among the present invention, has avoided data corruption.
Description of drawings
Fig. 1 is the structural representation of the device of the transmitting data between substation plates among the present invention;
Fig. 2 is the schematic flow sheet of the method for the transmitting data between substation plates among the present invention.
Embodiment
The base station is made of many veneers, and master control borad is preserved the software of whole base station, and when each veneer need carry out software upgrading, master control borad was sent to each veneer to software data, and write in the storage medium of each veneer.Because the processor that the veneer side adopts is lower with respect to the processor host frequency of master control borad side, disposal ability also is lower than master control borad, because the master control borad side is different with the disposal ability of veneer side, the master control borad disposal ability is better than veneer, therefore bottleneck occurred in the veneer side, this bottleneck can influence the data transmission efficiency of master control borad to veneer.The invention provides a kind of method and device of transmitting data between substation plates, to improve the data transmission efficiency of veneer side.Its core concept is to be divided into two relatively independent processes with reading the process of main control board data and process that data write storage medium, and the series process that reads in the prior art and write is changed into the parallel work-flow process.Below introduce implementation procedure of the present invention.
In order to realize this purpose, the invention provides a kind of method of transmitting data between substation plates, write the step that has increased in the middle of the process of storage medium the interim storage of data in the process that reads main control board data and data, promptly at first read main control board data and store temporarily; And then read the data of interim storage and write storage medium.Because buffer area will wait the data of storage medium to be written to store temporarily, therefore realized the parallel work-flow of read-write; Simultaneously; mistake does not appear when guaranteeing read-write in multi-task scheduling function and the semaphore defencive function of the present invention by the Semaphore Mechanism task; make regardless of the speed of writing storage medium; the efficient of accepting message can reach maximum; avoided the inconsistent efficiency that causes of data read and writing speed; save the stand-by period, thereby improved efficiency of transmission.
Simple in order to realize, realize the interim function of storing of data with buffer area in the present invention.
In addition, read in message in the present invention and also be provided with message between task and the storage medium and write task, be responsible for reading the data of interim storage in the buffer area and write storage medium; Only be used for reading the data of master control borad and be stored to buffer area and message reads task.When the veneer side joint was received the data that master control borad sends, message read task and constantly reads the data of coming from master control borad and write buffer area, and message writes task then constantly from the buffer area reading of data and write storage medium.
Simultaneously, after preventing data read and writing parallel work-flow, read-write order difference causes confusion, and provides two kinds of orders that guarantee that data are still read from master control borad according to data to write the method for memory block among the present invention, and concrete implementation step will describe in detail in conjunction with following two embodiment.
The present invention is divided into a plurality of sub-buffer areas with buffer area, because data deposit buffer area in and operation that data are taken out is read task and message by message respectively and write task and finish from buffer area among the present invention, therefore for same sub-buffer area, may occur that message reads task and message writes the situation that task is visited same sub-buffer area simultaneously, for the imperfect problem of the data that deposit storage medium in that prevents to cause in this case, the present invention reads task and message in message and writes and use the Semaphore Mechanism of operating system to guarantee the data write mutual exclusion between the task, promptly or message reads task run, or just write the storage medium task run.Semaphore Mechanism is the mechanism with the exclusive reference problem that solves shared resource.
Below be the detailed process of veneer side data transmission among the present invention:
Message reads the sub-buffer area that task at first finds does not have data, inquire about the semaphore of this sub-buffer area then, if semaphore shows that present message writes task and is not in the executable operations state, then successful picked up signal amount, otherwise, if this moment is because message writes task is in executing state and causes obtaining semaphore, then wait; After the picked up signal amount, message reads task the data of master control borad is write buffer area, and the signalization amount is for can read state.
After writing full this sub-buffer area, message reads task and continues data are write next sub-buffer area according to above-mentioned steps, all writes interim buffer area until the data with master control borad.
Message writes task writes buffer area according to data the data that call over, its process is: the semaphore that at first obtains this sub-buffer area, as in the fruit buffer area data being arranged, and show according to semaphore, message reads task not in operation at present, then successful picked up signal amount, otherwise, if can not get semaphore, then wait for.After obtaining semaphore, message writes task reading of data from this sub-buffer area, deposit data in storage medium, and the signalization amount is can write state.After the data that run through this sub-buffer area, the sequential read that writes buffer area according to data is got next data cached, until the data in the buffer area are all write storage medium.
Set forth the implementation procedure of this method below in conjunction with two specific embodiments:
First embodiment: Fig. 2 is the workflow diagram of first embodiment among the present invention.In the present embodiment, one section buffer area is set at first, described buffer area is divided into a plurality of sub-buffer areas; Message reads task described data is write described sub-buffer area successively according to described sub-buffer area address then, and message writes task and write calling over of buffer area originally according to data when reading the buffer area data, to avoid data corruption.The advantage of this method is: it is to write successively according to sub-buffer area address when the data with master control borad write buffer area that message reads task, and message reads according to sub-buffer area address when writing task and reading the buffer area data equally, realizes simple.It hereinafter is detailed process.
Message reads task and writes data according to the sequence of addresses of each sub-buffer area, at first obtains the semaphore (step 1) of this sub-buffer area, judges whether this sub-buffer area has data (step 2); If write full data in this sub-buffer area, then wait for; If do not have data in this sub-buffer area, judging then whether present semaphore status is in can write state (step 3), if, be that message writes task not in operation, then successful picked up signal amount (step 4) writes data then, and the signalization amount is for can read (step 5); If can not get semaphore then wait for;
When this sub-buffer area write full after, message reads task will data cached next individual sub-buffer area according to the buffer area sequence of addresses, ablation process is as indicated above, repeats no more.
Message writes task and reads the buffer area data according to the sequence of addresses of sub-buffer area equally: from the first address of buffer area, at first obtain the semaphore of this buffer memory, if do not have data in this sub-buffer area, then wait for; If in this sub-buffer area data are arranged, and at present message reads task in operation, and then successful picked up signal amount reads data cachedly then, and the signalization amount is for writing; Otherwise, if can not get semaphore then wait for;
When reading this sub-data in buffer of sky, message writes task and reads next sub-buffer area data according to the buffer area sequence of addresses, all writes storage medium until the data with buffer area.
Second embodiment: in the present embodiment, one section buffer area is set equally at first, described buffer area is divided into a plurality of sub-buffer areas; Different with first embodiment, in the present embodiment, message reads task and when reading main control board data the data that read is numbered, for example, can search the sub-buffer area that does not have data then with main control board data according to numbering of section, at random write described sub-buffer area, message writes task and write calling over of buffer area originally according to data when reading the buffer area data, and promptly the numbering of data is read, to avoid data corruption.It hereinafter is detailed process.
Message reads task and according to the numbering of main control board data data is write buffer area, at first obtains the semaphore of this sub-buffer area, if write full data in this sub-buffer area, then waits for; If do not have data in this sub-buffer area, and its present semaphore status be in can write state, promptly message writes task in operation, then successful picked up signal amount writes data then, and the signalization amount is for reading; If can not get semaphore then wait for;
After this sub-buffer area has been write completely, message reads the sub-buffer area that the task stochastic searching next one does not have data, to write this sub-buffer area according to the data that the number order of main control board data is numbered the next one then, ablation process is as indicated above, repeats no more.
Message writes task and reads the buffer area data according to the number order of main control board data equally: number from the head of main control board data, at first obtain the semaphore of the sub-buffer area of this data cached correspondence, if do not have data in this sub-buffer area, then wait for; If in this sub-buffer area data are arranged, and at present message reads task in operation, and then successful picked up signal amount reads data cachedly then, and the signalization amount is for writing; Otherwise, if can not get semaphore then wait for;
When reading this sub-data in buffer of sky, message writes task and reads next data of numbering in the corresponding sub-buffer area according to data number, all writes storage medium until the data with buffer area.
In order to use the method for transmitting data between substation plates of the present invention, the present invention also provides a kind of device of transmitting data between substation plates, and Fig. 1 is the structural representation of this device.This device comprises and is used for data are sent to the master control borad 1 of veneer and the veneer 2 of reception main control board data.The message that comprises described veneer 2 reads TU task unit 3, temporary storage cell 4, message and writes TU task unit 5 and storage medium unit 6.
When veneer received master control borad 1 data, message read TU task unit 3 and reads from the data of master control borad and write described temporary storage cell 4, and message writes TU task unit 5 from described temporary storage cell 4 reading of data and write described storage medium 6.
In addition, described temporary storage cell 4 also comprises the semaphore protected location, writes the read-write mutual exclusion that TU task unit and described message read TU task unit to guarantee described message.
Message reads task and writes data according to the order of sub-buffer area, promptly write a full sub-buffer area after, subsequent in order data are write next sub-buffer area.
The above only is a preferred implementation of the present invention; should be pointed out that for those skilled in the art, under the prerequisite that does not break away from the principle of the invention; can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.

Claims (7)

1. the method for a transmitting data between substation plates is used for the transfer of data between master control borad and veneer, it is characterized in that, comprises step:
1) buffer area is set and message is set writes task at veneer;
2) read main control board data and write described buffer area;
3) message writes task and reads the data of described buffer area according to the order that data write described buffer area, and writes the storage medium of veneer.
2. the method for transmitting data between substation plates according to claim 1 is characterized in that:
The described process that buffer area is set is specially:
Described buffer area is divided into a plurality of sub-buffer areas;
The process that described data write described buffer area is specially:
Described data are write described sub-buffer area successively according to described sub-buffer area sequence of addresses.
3. the method for transmitting data between substation plates according to claim 1 is characterized in that:
The described process that buffer area is set is specially:
Described buffer area is divided into a plurality of sub-buffer areas;
The process that described data write described buffer area is specially:
Described data are numbered;
Data after the numbering are write described sub-buffer area.
4. according to the method for claim 2 or 3 described transmitting data between substation plates, it is characterized in that described method also comprises:
Signalization amount mechanism;
When reading main control board data, judge according to described Semaphore Mechanism whether the data of interim storage are writing storage medium, if judged result is for being then wait; If judged result is that then execution in step 2);
When the data with described interim storage write storage medium, judge whether to read main control board data according to described Semaphore Mechanism, if judged result is for being then wait; If judged result is that then execution in step 3).
5. the method for transmitting data between substation plates according to claim 4 is characterized in that, described method also comprises: at veneer message is set and reads task; And,
Message reads task and reads from the data of master control borad and write described buffer area.
6. the device of a transmitting data between substation plates comprises:
Master control borad and the veneer that is connected with master control borad;
Described veneer comprises that message reads TU task unit, is used to read the data from master control borad;
The storage medium unit is used to store described data;
It is characterized in that described veneer also comprises:
Temporary storage cell is used to store the data that read TU task unit from message;
Message writes TU task unit, is used for from described temporary storage cell reading of data;
Message reads TU task unit and reads from the data of master control borad and write described temporary storage cell, and message writes TU task unit from described temporary storage cell reading of data and write described storage medium unit.
7. the device of transmitting data between substation plates according to claim 6, it is characterized in that: described temporary storage cell also comprises the semaphore protected location, is used to guarantee that described message writes the read-write mutual exclusion that TU task unit and described message read TU task unit.
CNB2005100087538A 2005-02-25 2005-02-25 Method and apparatus for transmitting data between substation plates Expired - Fee Related CN100372406C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2005100087538A CN100372406C (en) 2005-02-25 2005-02-25 Method and apparatus for transmitting data between substation plates

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2005100087538A CN100372406C (en) 2005-02-25 2005-02-25 Method and apparatus for transmitting data between substation plates

Publications (2)

Publication Number Publication Date
CN1825990A CN1825990A (en) 2006-08-30
CN100372406C true CN100372406C (en) 2008-02-27

Family

ID=36936365

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2005100087538A Expired - Fee Related CN100372406C (en) 2005-02-25 2005-02-25 Method and apparatus for transmitting data between substation plates

Country Status (1)

Country Link
CN (1) CN100372406C (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106909460B (en) * 2017-01-24 2018-06-05 广东德诚科教有限公司 Data buffering method, device and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1303053A (en) * 2000-01-04 2001-07-11 国际商业机器公司 Queue supervisor of buffer
CN1356840A (en) * 2000-12-06 2002-07-03 深圳市中兴通讯股份有限公司 Method fyor dynamic remote downloading of small base station program in public handheld telephone system
US20030163607A1 (en) * 2002-02-26 2003-08-28 Lg Industrial Systems Co., Ltd. Communication device using three-step communication buffers
JP2003333056A (en) * 2002-05-13 2003-11-21 Canon Inc Communication network, node equipment used therein and transmission control method used therein
CN1529457A (en) * 2003-09-29 2004-09-15 中兴通讯股份有限公司 Communication system base station and server database real-time synchronizing method
CN1585373A (en) * 2004-05-28 2005-02-23 中兴通讯股份有限公司 Ping pong buffer device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1303053A (en) * 2000-01-04 2001-07-11 国际商业机器公司 Queue supervisor of buffer
CN1356840A (en) * 2000-12-06 2002-07-03 深圳市中兴通讯股份有限公司 Method fyor dynamic remote downloading of small base station program in public handheld telephone system
US20030163607A1 (en) * 2002-02-26 2003-08-28 Lg Industrial Systems Co., Ltd. Communication device using three-step communication buffers
JP2003333056A (en) * 2002-05-13 2003-11-21 Canon Inc Communication network, node equipment used therein and transmission control method used therein
CN1529457A (en) * 2003-09-29 2004-09-15 中兴通讯股份有限公司 Communication system base station and server database real-time synchronizing method
CN1585373A (en) * 2004-05-28 2005-02-23 中兴通讯股份有限公司 Ping pong buffer device

Also Published As

Publication number Publication date
CN1825990A (en) 2006-08-30

Similar Documents

Publication Publication Date Title
CN102197384B (en) Method and system for improving serial port memory communication latency and reliability
CN102043686B (en) Disaster tolerance method, backup server and system of memory database
CN101707565B (en) Method and device for transmitting and receiving zero-copy network message
CN103823636B (en) IO scheduling method and device
CN104252405A (en) Log information output method and device
US20080109627A1 (en) Nonvolatile Memory Device And Method For Accessing Nonvolatile Memory Device
CN103631534B (en) Data storage system and managing method thereof
CN100442783C (en) Method and device of read-write buffer storage location based on field programable logical array
CN101526883B (en) Data stream transmission and dispatch method, system for executing same and controller of the system
CN104008069B (en) A kind of data guard method, device and equipment
CN115905086A (en) Control method and controller for synchronously reading and writing single-port SRAM (static random Access memory) based on AXI (advanced extensible interface)
CN105573872B (en) The HD management method and apparatus of data-storage system
US7600074B2 (en) Controller of redundant arrays of independent disks and operation method thereof
CN109815059A (en) A kind of data back up method, system and board and storage medium
CN100372406C (en) Method and apparatus for transmitting data between substation plates
CN113109778A (en) Multi-system radar preprocessing implementation method based on interrupt response mechanism
CN101739284A (en) Computer and information processing method
CN102033823B (en) Method and device for storing data
CN106844234A (en) Method for writing data and device, dual-active system
CN100356309C (en) Method and system for efficient command performance of multiple units sharing the same data interface port
CN108008919A (en) A kind of high-speed data handles SSD
CN101194235A (en) Memory control apparatus and memory control method
CN100444144C (en) Direct internal storage eccess operation method of microcomputer system
CN100501699C (en) Method and system for capturing and storing bare nucleus in exception in multi-core processor
CN102110054B (en) Communication method and device for PCI (peripheral component interconnect) equipment and system memory

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20080227

Termination date: 20170225

CF01 Termination of patent right due to non-payment of annual fee