CN109379246A - A kind of detection method and device of memory - Google Patents

A kind of detection method and device of memory Download PDF

Info

Publication number
CN109379246A
CN109379246A CN201811108892.1A CN201811108892A CN109379246A CN 109379246 A CN109379246 A CN 109379246A CN 201811108892 A CN201811108892 A CN 201811108892A CN 109379246 A CN109379246 A CN 109379246A
Authority
CN
China
Prior art keywords
memory
memory field
current
field
equipment
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
CN201811108892.1A
Other languages
Chinese (zh)
Other versions
CN109379246B (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.)
Ruijie Networks Co Ltd
Original Assignee
Ruijie Networks 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 Ruijie Networks Co Ltd filed Critical Ruijie Networks Co Ltd
Priority to CN201811108892.1A priority Critical patent/CN109379246B/en
Publication of CN109379246A publication Critical patent/CN109379246A/en
Application granted granted Critical
Publication of CN109379246B publication Critical patent/CN109379246B/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
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/10Active monitoring, e.g. heartbeat, ping or trace-route
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0631Management of faults, events, alarms or notifications using root cause analysis; using analysis of correlation between notifications, alarms or events based on decision criteria, e.g. hierarchy, tree or time analysis
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/06Management of faults, events, alarms or notifications
    • H04L41/0654Management of faults, events, alarms or notifications using network fault recovery
    • H04L41/0668Management of faults, events, alarms or notifications using network fault recovery by dynamic selection of recovery network elements, e.g. replacement by the most appropriate element after failure
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/16Threshold monitoring
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching
    • H04L67/5682Policies or rules for updating, deleting or replacing the stored data

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Cardiology (AREA)
  • General Health & Medical Sciences (AREA)
  • Mobile Radio Communication Systems (AREA)
  • Hardware Redundancy (AREA)

Abstract

This application discloses a kind of detection method and device of memory.This method executes step A: if judgement knows that there is no idling-resources for the second memory field, send heartbeat message to the second equipment by the memory headroom of the first memory field;Step B: the current memory space of the second memory field is compared with default covering threshold value;When the current memory space of the second memory field is not less than default covering threshold value, determine the second memory field before current time in of short duration exception;When the current memory space of the second memory field is less than default covering threshold value, A is returned to step.Equipment switching frequency caused by heartbeat message can not be sent after being taken this method reduce overall memory in the prior art by business to be processed, that is, reduces the switching times of equipment room, reduces packet loss, improve the accuracy of heartbeat detection.

Description

A kind of detection method and device of memory
Technical field
This application involves field of communication technology more particularly to a kind of detection method and device of memory.
Background technique
Distributed system is a kind of more device architectures of communication network interconnection, each equipment room by coordinate interaction come Execution task.In distributed communication system, it can use heartbeat mechanism and reliability detection carried out to equipment room.Heartbeat mechanism is Refer to that equipment room regularly sends a customized structural body, such as heartbeat message, to notify oneself current working condition of other side, with Ensure the mechanism of equipment room effectively connected.After detecting counterpart device exception, reparation operation is carried out to the warping apparatus, such as Equipment handover operation.
Operation of the equipment to the transmitting-receiving of heartbeat message dependent on operating system in the equipment, such as central processing unit (Central Process Unit, CPU) and/or memory source operation.The CPU of the first equipment is handling X industry in a distributed system Business caches other business in memory, and such as A business and B business, after the only complete release CPU of X business processing, CPU could be successively to A Business and B business are handled.Wherein, A business and B business need in order not to lose data message by datagram to be processed Text is cached in the buffer queue of oneself, and the data message cached needs to apply for committed memory.
If CPU is handled, the X business hours is longer, and memory is taken by the caching message of A business and B business, then equipment room Heartbeat message will be unable to normally send, the second equipment (or opposite equip.) confirms over time because not having free memory First unit exception, so as to cause equipment switching.
However, the period of CPU processing X business is a kind of memory of short duration the case where exhausting, X business has been handled in CPU, this Planting of short duration the case where exhausting will disappear, and the memory of the first equipment can restore normally, but the prior art cannot detect that memory is short The case where temporarily exhausting, and above equipment switching will appear packet loss phenomenon, influence service operation.
Summary of the invention
The embodiment of the present application provides a kind of detection method and device of memory, by reducing the portfolio to be processed of caching, Memory headroom is provided to send heartbeat message, is taken with reducing memory in the prior art by business to be processed, caused equipment Switching frequency reduces packet loss.
In a first aspect, providing a kind of detection method of memory, apply in the first equipment, the first equipment includes in first Area and the second memory field are deposited, this method may include:
Step A: if judgement know the second memory field there is no idling-resource, by the memory headroom of the first memory field to Second equipment sends a heartbeat message, and the first memory field includes the message occupied space of preset quantity heartbeat message;
Step B: the current memory space of the second memory field is compared with default covering threshold value, wherein carry out for the first time The current memory space compared is the initial memory space of the second memory field;
When the current memory space of the second memory field is not less than default covering threshold value, determine the second memory field when current Of short duration exception is in front of carving;
When the current memory space of the second memory field is less than default covering threshold value, A is returned to step;
Wherein, the second memory field is for caching current operation business and business to be processed, and and there are idling-resources When cache heartbeat message to be sent.
In an optional realization, a heartbeat is sent to the second equipment by the message occupied space of the first memory field After message, this method further include:
Discharge the message occupied space that the first memory district center jumps message.
When the current memory space of the second memory field is not less than default covering threshold value, this method further include:
Based on the current memory space of the second memory field, the message occupied space discharged in the first memory field is returned It mends, and updates the current memory space of the second memory field.
In an optional realization, when the current memory space of the second memory field is no more than default covering threshold value, return After receipt row step A, this method further include: if the number for returning to step A, which is equal to the first memory district center, jumps message Preset quantity, it is determined that the second memory field is in permanent abnormal.
In an optional realization, determine that the second memory field is in after permanent exception, this method further include:
Warning information is generated, warning information is used to indicate the second memory field and is in permanent abnormal.
In an optional realization, determine that the second memory field is in after permanent exception, this method further include:
The switching command that the second equipment is sent after the first preset period of time is received, switching command, which is used to indicate, switches to second Equipment handles the corresponding current business of current traffic.
In an optional realization, determine that the second memory field is in after permanent exception, this method further include:
It switches to the second equipment and handles the corresponding current business of the current traffic.
In an optional realization, preset quantity heartbeat message is by the first memory in the memory headroom of the first memory field The size of the memory headroom in area and each heartbeat message determine, and be divided between the transmission between adjacent cardiac message second it is default when Section, the second preset period of time is less than the first preset period of time.
In an optional realization, default covering threshold value is according to the current EMS memory occupation ratio-dependent for running business 's.
In an optional realization, this method further include:
If judgement knows that there are idling-resources for the second memory field, send heartbeat report to the second equipment by the second memory field Text.
Second aspect provides a kind of detection device, applies in the first equipment, the first equipment include the first memory field and Second memory field, the apparatus may include: transmission unit, comparing unit and determination unit;
Transmission unit, if for judging to know that there is no idling-resources for the second memory field, pass through the interior of the first memory field It deposits space and sends a heartbeat message to the second equipment, the first memory field includes that the message of preset quantity heartbeat message occupies sky Between;
Comparing unit is compared for the current memory space to the second memory field with default covering threshold value, wherein first The secondary current memory space being compared is the initial memory space of the second memory field;
Determination unit, for determining second when the current memory space of the second memory field is not less than default covering threshold value Memory field is in of short duration exception before current time;
When the current memory space of the second memory field is less than default covering threshold value, transmission unit is triggered;
Wherein, the second memory field is used to cache current operation business and business to be processed, and when there are idling-resource Cache heartbeat message to be sent.
In an optional realization, which further includes releasing unit and covering unit;
Releasing unit, for sending one to the second equipment by the message occupied space of the first memory field in transmission unit After heartbeat message, the first memory district center of release jumps the message occupied space of message.
Unit is covered, for being based on second when the current memory space of the second memory field is not less than default covering threshold value The current memory space of memory field covers the message occupied space of release described in the first memory field, and updates second The current memory space of memory field.
In an optional realization, determination unit is also used to the current memory space when the second memory field less than described When default covering threshold value, after returning to step A, if the number of triggering transmission unit, which is equal to the first memory district center, jumps message Preset quantity, it is determined that the second memory field is in permanent abnormal.
In an optional realization, which further includes generation unit;
Generation unit generates warning information after determining that the second memory field is in permanent exception, and warning information is used for Indicate that the second memory field is in permanent abnormal.
In an optional realization, which further includes receiving unit;
Receiving unit receives the second equipment when first is default after determining that the second memory field is in permanent exception The switching command sent after section, switching command, which is used to indicate, switches to the corresponding current industry of the second equipment processing current traffic Business.
In an optional realization, which further includes switch unit;
Switch unit switches to and works as described in the processing of the second equipment after determining that the second memory field is in permanent exception The corresponding current business of preceding portfolio.
In an optional realization, preset quantity heartbeat message is by the first memory in the memory headroom of the first memory field The size of the memory headroom in area and each heartbeat message determine, and be divided between the transmission between adjacent cardiac message second it is default when Section, the second preset period of time is less than the first preset period of time.
In an optional realization, default covering threshold value is according to the current EMS memory occupation ratio-dependent for running business 's.
One it is optional realize, transmission unit, if be also used to judge to know the second memory field there are idling-resource, Heartbeat message is sent to the second equipment by the second memory field.
The third aspect provides a kind of electronic equipment, which includes processor, communication interface, memory and lead to Believe bus, wherein processor, communication interface, memory complete mutual communication by communication bus;
Memory, for storing computer program;
Processor when for executing the program stored on memory, realizes any side in above-mentioned first aspect Method step.
Fourth aspect provides a kind of computer readable storage medium, and meter is stored in the computer readable storage medium Calculation machine program, the computer program realize any method and step in above-mentioned first aspect when being executed by processor.
Execute step A: empty by the memory of the first memory field if judgement knows that there is no idling-resources for the second memory field Between to the second equipment send a heartbeat message, the first memory field includes the message occupied space of preset quantity heartbeat message; Step B: the current memory space of the second memory field is compared with default covering threshold value, wherein what is be compared for the first time works as Preceding memory headroom is the initial memory space of the second memory field;When the current memory space of the second memory field is no more than default covering When threshold value, determine the second memory field before current time in of short duration exception;When the current memory space of the second memory field is small When default covering threshold value, A is returned to step.This method is by marking off the second memory field for overall memory and in second Area is deposited there is no the first memory field for sending heartbeat message when idling-resource, it is to be processed to reduce overall memory in the prior art Business can not send equipment switching frequency caused by heartbeat message after taking, that is, reduce the switching times of equipment room, reduce Packet loss, improves the accuracy of heartbeat detection.
Detailed description of the invention
Fig. 1 is the distributed system frame diagram that the detection method of memory provided in an embodiment of the present invention is applied;
Fig. 2 is a kind of schematic illustration of the heartbeat detection provided;
Fig. 3 is a kind of flow diagram of the detection method of memory provided in an embodiment of the present invention;
Fig. 4 is a kind of structural schematic diagram of detection device provided in an embodiment of the present invention;
Fig. 5 is the structural schematic diagram of a kind of electronic equipment provided in an embodiment of the present invention.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present application, technical solutions in the embodiments of the present application carries out clear, complete Site preparation description, it is clear that described embodiment is only some embodiments of the present application, is not whole embodiments.Based on this Apply for embodiment, every other implementation obtained by those of ordinary skill in the art without making creative efforts Example, shall fall in the protection scope of this application.
The detection method of memory provided in an embodiment of the present invention is applied in distributed system shown in Fig. 1, distribution system System includes more first equipment and corresponding second equipment of each first equipment (or " stand-by equipment ").First equipment and second is set It is standby to can be server, it is also possible to terminal, in order to guarantee the accuracy of detection, server, which can be, has stronger computing capability Application server or Cloud Server;Terminal can be with stronger computing capability user equipment (User Equipment, UE), the handheld device with wireless communication function, mobile unit, wearable device, calculate equipment or be connected to wireless-modulated solution Adjust other processing equipments, the mobile station (Mobile station, MS) etc. of device.
First equipment is treated processing business and is cached for handling current business.
Firstly, the first equipment and the second equipment need to establish communication connection, the first equipment can be with after establishing communication connection Business information is sent to the second equipment, business information may include the memory headroom size of current business.
The operating status of counterpart device is monitored between first equipment and the second equipment by heartbeat detection.Fig. 2 shows The schematic illustration of heartbeat detection, as shown in Fig. 2, the first equipment starts the timer (Timer) of itself configuration, in timer Heartbeat message is sent to the second equipment when timing cycle arrives.After second equipment receives the heartbeat message from the first equipment, The heartbeat counting (counter) to the first equipment is updated, if the second equipment does not receive first and sets in the first preset period of time Standby heartbeat message, it is believed that the first unit exception executes corresponding troubleshooting, that is, switches to the second equipment, to current industry Business is handled.
Correspondingly, the second equipment also can star the timer (Timer) of itself configuration, arrived in the timing cycle of timer Heartbeat message is sent to the first equipment when coming.After first equipment receives the heartbeat message from the second equipment, update to second The heartbeat counting (counter) of equipment, if the first equipment does not receive the heartbeat report of the second equipment in the first preset period of time Text, it is believed that the second unit exception executes corresponding troubleshooting, such as generates warning information and/or restarts to the second equipment.
In the prior art in the case where idling-resource is not present in the memory of the first equipment, the second equipment is when first is default In section, the second equipment does not receive the heartbeat message of the first equipment, can directly think the first unit exception, executes equipment switching behaviour Make, leads to packet loss in handoff procedure.
The above system of the embodiment of the present invention executes step A: if judgement knows that idling-resource is not present in the second memory field, A heartbeat message is sent to the second equipment by the memory headroom of the first memory field, the first memory field includes the preset quantity heart Jump the message occupied space of message;Step B: being compared the current memory space of the second memory field with default covering threshold value, Wherein, the current memory space being compared for the first time is the initial memory space of the second memory field;It is current when the second memory field When memory headroom is no more than default covering threshold value, determine the second memory field before current time in of short duration exception;When second When the current memory space of memory field is less than default covering threshold value, A is returned to step.This method is by reducing the prior art Middle overall memory can not send equipment switching frequency caused by heartbeat message after being taken by business to be processed, that is, reduce equipment Between switching times, reduce packet loss, improve the accuracy of heartbeat detection.
It should be noted that the second equipment in above system can also execute aforesaid operations, the embodiment of the present invention is herein It does not repeat them here.
Preferred embodiment of the present application is illustrated below in conjunction with Figure of description, it should be understood that described herein Preferred embodiment only for the purpose of illustrating and explaining the present invention and is not intended to limit the present invention, and in the absence of conflict, this Shen Please in embodiment and embodiment in feature can be combined with each other.
Fig. 3 is a kind of flow diagram of the detection method of memory provided in an embodiment of the present invention.As shown in figure 3, using In the first equipment, the first equipment includes the first memory field and the second memory field, this method may include:
Step 310, the EMS memory occupation ratio based on current traffic create the first memory field and the second memory field.
Before executing the step, the first equipment and the second equipment are established and are communicated to connect, and if TCP communication connects, first is set Standby to send business information to the second equipment, business information may include current traffic, the first device identification, such as MAC Address Information, current traffic include the portfolio of current operation business and the portfolio of business to be processed.
EMS memory occupation ratio of first equipment based on current traffic creates the first memory field and the second memory field.
Second memory field for caching current operation business, business to be processed, and when there are idling-resource caching to The heartbeat message of transmission.First memory field is used to cache heartbeat report to be sent when idling-resource is not present in the second memory field Text, the first memory field include the message occupied space of preset quantity heartbeat message, and message occupied space is heartbeat message occupancy Memory headroom.
In a kind of optional implementation, the buffer queue of heartbeat message is created in the first memory field, in buffer queue The number of heartbeat message determines by the memory headroom of the first memory field and the size of each heartbeat message, and between adjacent cardiac message Transmission between be divided into the second preset period of time, that is to say, that the buffer time of the buffer queue is the second preset period of time and heartbeat report The product of literary number, it is to be understood that buffer time is the preset extension time to abnormal phenomenon, abnormal phenomenon second The case where idling-resource is not present in memory field.
For example, memory headroom is 20M, the size of each heartbeat message is that (size of heartbeat message is only used as example to 1M herein Son is stated), the number of heartbeat message is 20 in buffer queue, if between the transmission in buffer queue between adjacent cardiac message It is divided into 6s, then buffer queue available buffer time is 2min.
Optionally, the second memory field may include that the memory headroom of business EMS memory occupation and the message memory of heartbeat message account for With space, such as memory headroom of business EMS memory occupation is 100M, and the message memory footprint of heartbeat message is 30M, then second The total 130M in memory field.
If step 320, judgement know that there is no idling-resources for the second memory field, pass through the first memory field to the second equipment Send a heartbeat message.
In the second memory field there are in the case where idling-resource, the first equipment is sent by the second memory field to the second equipment Heartbeat message.In the case where idling-resource is not present in the second memory field, the first equipment passes through the first memory field to the second equipment Heartbeat message is sent, and discharges the message occupied space of the heartbeat message, the first equipment receives second by the second memory field and sets The heartbeat message that preparation is come, therefore the first memory field does not increase the message occupied space of the received heartbeat message, that is to say, that In this case, the message occupied space of the first memory field is discharged with the sending of each heartbeat message.
If the first equipment receives the heartbeat message that the second equipment is sent by the second memory field in the first preset period of time, Then the memory headroom of the second memory field increases the message occupied space of the heartbeat message, and the memory headroom of the first memory field does not increase The message occupied space of the heartbeat message.
If the first equipment does not receive the heartbeat report that the second equipment is sent by the second memory field in the first preset period of time Text, the then message that the memory headroom of the memory headroom of the second memory field and the first memory field does not increase the heartbeat message occupy empty Between.
In one example, in the second memory field there are in the case where idling-resource, the initial memory of the first memory field is empty Between be 20M, current memory space 20M, the initial memory space of the second memory field is 30M, current memory space 28M.The One equipment sends the heartbeat message of 1M by the first memory field to the second equipment, and the memory headroom of the first memory field becomes 19M.If The heartbeat message for the 1M that the second equipment is sent is received in the first preset period of time, the memory headroom of the first memory field keeps 19M, The memory headroom of second memory field becomes 29M.If not receiving the heartbeat for the 1M that the second equipment is sent in the first preset period of time Message, the memory headroom of the first memory field keeps 19M at this time, and the memory headroom of the second memory field still keeps 28M.
Step 330 is compared the current memory space of the second memory field with default covering threshold value, determines in second Area is deposited before current time whether in of short duration exception.
First equipment the current memory space to the second memory field can be compared with default covering threshold value in real time, be preset Covering threshold value is the minimum memory value that the second memory field covers the message occupied space that the first memory field discharges.Wherein, The current memory space being compared for the first time is the initial memory space of the second memory field, and presetting covering threshold value can be according to current The EMS memory occupation ratio-dependent of operation business, the fixed value that can also be arranged according to the business of the first equipment long-term disposal.
In one embodiment, when the first equipment detects the current memory space of the second memory field not less than default covering When threshold value, determine that the second memory field is in of short duration exception before current time, current time is to compare the second memory field At the time of current memory space is not less than default covering threshold value.
Further, however, it is determined that the current memory space of the first memory field is less than initial memory space, i.e. the first memory field Message occupied space is released, then when the current memory space in the second memory field is not less than default covering threshold value, is based on second The current memory space of memory field can cover the message occupied space discharged in the first memory field, and update second The current memory space of memory field, that is, the memory headroom for executing the second memory field after covering is new current memory space.
If executing the second memory field after covering, there are idling-resources, empty by current memory new in the second memory field Between to the second equipment send heartbeat message.If executing the second memory field after covering is not present idling-resource, returns and execute step Rapid 320.
It is understood that if it is determined that the current memory space of the first memory field is equal to initial memory space, i.e., in first It deposits area and does not discharge message occupied space, then do not execute the covering of message occupied space.
For example, the initial memory space of the second memory field is 30M, the default covering threshold value of the second memory field is 25M, first The initial memory space of memory field is 20M.
After period T, the second memory field has cached a large amount of business to be processed, and the first equipment detects second at this time The current memory space of memory field is 0M, i.e. idling-resource is not present in the second memory field, uses the first memory field to second later Equipment sends heartbeat message and such as releases the message occupied space of 2M after the first memory field releases two heartbeat messages, this When the first equipment detect that the current memory space of the second memory field is that (i.e. the current memory space of the second memory field is from 0M by 28M Become 28M), since 28 greater than 25, therefore determine that the second memory field is in of short duration exception before current time, and in the second memory In the case that the current memory space in area is greater than 25M, the first memory field is released using the current 28M memory headroom of the second memory field The 2M message occupied space put is covered, and after covering, the new current memory space of the first memory field is 20M, the second memory The new current memory space in area is 26M, later since there are idling-resources for the second memory field, therefore passes through the new of the second memory field Current memory space to the second equipment send heartbeat message.
In one embodiment, covering threshold value is preset when the current memory space of the second memory field is less than, and there is no skies When not busy resource, 320 are returned to step.
When the number for returning to step A jumps the preset quantity of message less than the first memory district center, second is detected The current memory space of memory field is not less than default covering threshold value, it is determined that is presetting covering threshold value comparison with this in the second memory field It is in of short duration exception before.
If the number for returning to step 320 is equal to the preset quantity that the first memory district center jumps message, it is determined that second Memory field is in permanent abnormal.
For example, the memory headroom of the first memory field includes the message occupied space of 20 heartbeat messages, i.e. the first memory field 20 heartbeat messages can be issued.When idling-resource is not present in the second memory field, the first memory field has continuously sent out 10 hearts After jumping message, the portfolio of the second memory field caching tails off, make the second memory field there are idling-resource, at this time the second memory field Current memory space is greater than default covering threshold value, can cover to the memory headroom of the first memory field, determine second at this time Memory field is in of short duration exception before at the time of the current memory space for comparing the second memory field is greater than default covering threshold value.
But when idling-resource is not present in the second memory field, and the first memory field has continuously sent out 20 heartbeat messages Afterwards, the portfolio of the second memory field caching is constant, i.e., idling-resource is still not present in the second memory field, at this time second memory field Current memory space is less than default covering threshold value, it is not possible to cover to the memory headroom of the first memory field, determine the at this time Two memory fields are in permanent abnormal.
Optionally it is determined that the second memory field is in after permanent exception, warning information, alarm letter is can be generated in the first equipment The second memory field that breath is used to indicate the first equipment is in permanent abnormal, which can recorde in log information.
Optionally it is determined that the second memory field is in after permanent exception, since the first equipment is sent without the second equipment of normal direction Heartbeat message, therefore after the first preset period of time, the first equipment receives the switching command that the second equipment is sent, and switching command is for referring to Show and switches to the second equipment processing current business and business to be processed.
Alternatively, the first equipment can star equipment handover operation, cut after determining that the second memory field is in permanent exception Shift to the second equipment processing current business and business to be processed.
This method executes step A: if judgement knows that there is no idling-resources for the second memory field, pass through the first memory field Memory headroom sends a heartbeat message to the second equipment, and the first memory field includes that the message of preset quantity heartbeat message occupies Space;Step B: the current memory space of the second memory field is compared with default covering threshold value, wherein be compared for the first time Current memory space be the second memory field initial memory space;When the current memory space of the second memory field is no more than default When covering threshold value, determine the second memory field before current time in of short duration exception;When the current memory of the second memory field is empty Between when being less than default covering threshold value, return to step A.This method is by marking off the second memory field for overall memory and Two memory fields be not present idling-resource when send heartbeat message the first memory field, reduce in the prior art overall memory by Processing business can not send equipment switching frequency caused by heartbeat message after taking, that is, reduce the switching times of equipment room, Packet loss is reduced, the accuracy of heartbeat detection is improved.
Corresponding with the above method, the embodiment of the present invention also provides a kind of detection device, as shown in figure 4, the detection device It include: transmission unit 410, comparing unit 420 and determination unit 430;
Transmission unit 410, if for judging to know that there is no idling-resources for the second memory field, pass through the first memory field Memory headroom sends a heartbeat message to the second equipment, and the first memory field includes that the message of preset quantity heartbeat message occupies Space;
Comparing unit 420 is compared for the current memory space to the second memory field with default covering threshold value, In, the current memory space being compared for the first time is the initial memory space of the second memory field;
Determination unit 430, for when the current memory space of the second memory field is not less than default covering threshold value, determining the Two memory fields are in of short duration exception before current time;
When the current memory space of the second memory field is less than default covering threshold value, transmission unit 420 is triggered;
Wherein, the second memory field is used to cache current operation business and business to be processed, and when there are idling-resource Cache heartbeat message to be sent.
In an optional realization, which further includes releasing unit 440 and covering unit 450;
Releasing unit 440, for sending a heartbeat message to the second equipment by the first memory field in transmission unit 410 Later, the message occupied space of heartbeat message described in the first memory field is discharged.
Unit 450 is covered, for when the current memory space of the second memory field is not less than default covering threshold value, based on the The current memory space of two memory fields covers the message occupied space of release described in the first memory field, and updates institute State the current memory space of the second memory field.
In an optional realization, determination unit 430 is also used to be less than in advance when the current memory space of the second memory field If cover threshold value, after returning to step A, if the number for returning to step A, which is equal to the first memory district center, jumps message Preset quantity, it is determined that the second memory field is in permanent abnormal.
In an optional realization, which further includes generation unit 460;
Generation unit 460 generates warning information, warning information after determining that the second memory field is in permanent exception It is used to indicate the second memory field and is in permanent abnormal.
In an optional realization, which further includes receiving unit 470;
It is default first to receive the second equipment after determining that the second memory field is in permanent exception for receiving unit 470 The switching command sent after period, switching command, which is used to indicate, switches to the corresponding current industry of the second equipment processing current traffic Business.
In an optional realization, which further includes switch unit 480;
Switch unit 480 switches to described in the processing of the second equipment after determining that the second memory field is in permanent exception The corresponding current business of current traffic.
In an optional realization, preset quantity heartbeat message is by the first memory in the memory headroom of the first memory field The size of the memory headroom in area and each heartbeat message determine, and be divided between the transmission between adjacent cardiac message second it is default when Section, the second preset period of time is less than the first preset period of time.
In an optional realization, default covering threshold value is according to the current EMS memory occupation ratio-dependent for running business 's.
In an optional realization, transmission unit 410, if being also used to judge to know there is idle money in the second memory field Source then sends heartbeat message to the second equipment by the second memory field.
The function of each functional unit for the detection device that the above embodiment of the present invention provides, can be walked by above-mentioned each method It is rapid to realize, therefore, the specific work process and beneficial effect of each unit in detection device provided in an embodiment of the present invention, It does not repeat again herein.
The embodiment of the invention also provides a kind of electronic equipment, as shown in figure 5, include processor 510, communication interface 520, Memory 530 and communication bus 540, wherein processor 510, communication interface 520, memory 530 are complete by communication bus 540 At mutual communication.
Memory 530, for storing computer program;
Processor 510 when for executing the program stored on memory 530, realizes following steps:
Execute step A: empty by the memory of the first memory field if judgement knows that there is no idling-resources for the second memory field Between to the second equipment send a heartbeat message, the first memory field includes the message occupied space of preset quantity heartbeat message;
Step B: the current memory space of the second memory field is compared with default covering threshold value, wherein carry out for the first time The current memory space compared is the initial memory space of the second memory field;
When the current memory space of the second memory field is not less than default covering threshold value, determine the second memory field when current Of short duration exception is in front of carving;
When the current memory space of the second memory field is less than default covering threshold value, A is returned to step;
Wherein, the second memory field is used to cache current operation business and business to be processed, and when there are idling-resource Cache heartbeat message to be sent.
In an optional realization, a heartbeat is sent to the second equipment by the message occupied space of the first memory field After message, the first memory district center of release jumps the message occupied space of message.
It is current interior based on the second memory field when the current memory space of the second memory field is not less than default covering threshold value Space is deposited, the message occupied space discharged in the first memory field is covered, and the current memory for updating the second memory field is empty Between.
In an optional realization, when the current memory space of the second memory field is less than default covering threshold value, return After executing step A, if the number for returning to step A is equal to the preset quantity that the first memory district center jumps message, it is determined that Second memory field is in permanent abnormal.
It in an optional realization, determines that the second memory field is in after permanent exception, generates warning information, alarm letter Breath is used to indicate the second memory field and is in permanent abnormal.
It in an optional realization, determines that the second memory field is in after permanent exception, receives the second equipment first The switching command sent after preset period of time, switching command, which is used to indicate, to be switched to the processing of the second equipment current traffic is corresponding works as Preceding business.
It in an optional realization, determines that the second memory field is in after permanent exception, switches to the processing of the second equipment The corresponding current business of current traffic.
In an optional realization, preset quantity heartbeat message is by the first memory in the memory headroom of the first memory field The size of the memory headroom in area and each heartbeat message determine, and be divided between the transmission between adjacent cardiac message second it is default when Section, the second preset period of time is less than the first preset period of time.
In an optional realization, default covering threshold value is according to the current EMS memory occupation ratio-dependent for running business 's.
In an optional realization, if judgement knows that there are idling-resources for the second memory field, pass through the second memory field Heartbeat message is sent to the second equipment.
Communication bus mentioned above can be Peripheral Component Interconnect standard (Peripheral Component Interconnect, PCI) bus or expanding the industrial standard structure (Extended Industry Standard Architecture, EISA) bus etc..The communication bus can be divided into address bus, data/address bus, control bus etc..For just It is only indicated with a thick line in expression, figure, it is not intended that an only bus or a type of bus.
Communication interface is for the communication between above-mentioned electronic equipment and other equipment.
Memory may include random access memory (Random Access Memory, RAM), also may include non-easy The property lost memory (Non-Volatile Memory, NVM), for example, at least a magnetic disk storage.Optionally, memory may be used also To be storage device that at least one is located remotely from aforementioned processor.
Above-mentioned processor can be general processor, including central processing unit (Central Processing Unit, CPU), network processing unit (Network Processor, NP) etc.;It can also be digital signal processor (Digital Signal Processing, DSP), it is specific integrated circuit (Application Specific Integrated Circuit, ASIC), existing It is field programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic device, discrete Door or transistor logic, discrete hardware components.
The embodiment and beneficial effect solved the problems, such as due to each device of electronic equipment in above-described embodiment can join Each step in embodiment as shown in Figure 3 realizes, therefore, the specific works mistake of electronic equipment provided in an embodiment of the present invention Journey and beneficial effect, do not repeat again herein.
In another embodiment provided by the invention, a kind of computer readable storage medium is additionally provided, which can It reads to be stored with instruction in storage medium, when run on a computer, so that computer executes any institute in above-described embodiment The detection method stated.
In another embodiment provided by the invention, a kind of computer program product comprising instruction is additionally provided, when it When running on computers, so that computer executes any detection method in above-described embodiment.
It should be understood by those skilled in the art that, the embodiment in the embodiment of the present application can provide as method, system or meter Calculation machine program product.Therefore, complete hardware embodiment, complete software embodiment can be used in the embodiment of the present application or combine soft The form of the embodiment of part and hardware aspect.Moreover, being can be used in the embodiment of the present application in one or more wherein includes meter Computer-usable storage medium (including but not limited to magnetic disk storage, CD-ROM, the optical memory of calculation machine usable program code Deng) on the form of computer program product implemented.
It is referring to according to the method for embodiment, equipment (system) and calculating in the embodiment of the present application in the embodiment of the present application The flowchart and/or the block diagram of machine program product describes.It should be understood that can be realized by computer program instructions flow chart and/or The combination of the process and/or box in each flow and/or block and flowchart and/or the block diagram in block diagram.It can mention For the processing of these computer program instructions to general purpose computer, special purpose computer, Embedded Processor or other programmable datas The processor of equipment is to generate a machine, so that being executed by computer or the processor of other programmable data processing devices Instruction generation refer to for realizing in one or more flows of the flowchart and/or one or more blocks of the block diagram The device of fixed function.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates, Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one The step of function of being specified in a box or multiple boxes.
Although the preferred embodiment in the embodiment of the present application has been described, once a person skilled in the art knows Basic creative concept, then additional changes and modifications may be made to these embodiments.So appended claims are intended to explain Being includes preferred embodiment and all change and modification for falling into range in the embodiment of the present application.
Obviously, those skilled in the art embodiment in the embodiment of the present application can be carried out various modification and variations without It is detached from the spirit and scope of embodiment in the embodiment of the present application.If in this way, in the embodiment of the present application embodiment these modification Within the scope of belonging in the embodiment of the present application claim and its equivalent technologies with modification, then also it is intended in the embodiment of the present application It includes these modifications and variations.

Claims (20)

1. a kind of detection method of memory, which is characterized in that apply in the first equipment, first equipment includes the first memory Area and the second memory field, which comprises
Step A: if judgement knows that there is no idling-resources for the second memory field, send one to the second equipment by the first memory field A heartbeat message, first memory field include the message occupied space of preset quantity heartbeat message;
Step B: the current memory space of second memory field is compared with default covering threshold value, wherein carry out for the first time The current memory space compared is the initial memory space of second memory field;
When the current memory space of second memory field is not less than the default covering threshold value, second memory field is determined Of short duration exception is in front of current time;
When the current memory space of second memory field is less than the default covering threshold value, A is returned to step;
Wherein, second memory field is used to cache current operation business and business to be processed, and when there are idling-resource Cache heartbeat message to be sent.
2. the method as described in claim 1, which is characterized in that send a heart to the second equipment by first memory field After jumping message, the method also includes:
Discharge the message occupied space of heartbeat message described in first memory field;
When the current memory space of second memory field is not less than the default covering threshold value, the method also includes:
Based on the current memory space of second memory field, the message occupied space discharged in first memory field is carried out Covering, and update the current memory space of second memory field.
3. the method as described in claim 1, which is characterized in that described in being less than when the current memory space of second memory field When default covering threshold value, after returning to step A, the method also includes:
If the number for returning to step A is equal to the preset quantity that the first memory district center jumps message, it is determined that described the Two memory fields are in permanent abnormal.
4. method as claimed in claim 3, which is characterized in that determine that second memory field is in after permanent exception, institute State method further include:
Warning information is generated, the warning information is used to indicate second memory field and is in permanent abnormal.
5. method as claimed in claim 3, which is characterized in that determine that second memory field is in after permanent exception, institute State method further include:
The switching command that second equipment is sent after the first preset period of time is received, the switching command, which is used to indicate, to be switched to Second equipment handles the current business and the business to be processed.
6. method as claimed in claim 3, which is characterized in that determine that second memory field is in after permanent exception, institute State method further include:
It switches to second equipment and handles the current business and the business to be processed.
7. method as claimed in claim 5, which is characterized in that preset quantity described in the memory headroom of first memory field A heartbeat message determines by the memory headroom of first memory field and the size of each heartbeat message, and between adjacent cardiac message Transmission between be divided into the second preset period of time, second preset period of time is less than first preset period of time.
8. method as claimed in claim 1, which is characterized in that the default covering threshold value is according to the current fortune The EMS memory occupation ratio-dependent of industry business.
9. method as claimed in claim 1, which is characterized in that the method also includes:
If judgement knows that there are idling-resources for second memory field, are sent out by second memory field to second equipment Send heartbeat message.
10. a kind of detection device of memory, is applied in the first equipment, first equipment includes in the first memory field and second Deposit area characterized by comprising
Transmission unit, if for judging to know that there is no idling-resources for the second memory field, are set by the first memory field to second Preparation send a heartbeat message, and first memory field includes the message occupied space of preset quantity heartbeat message;
Comparing unit is compared for the current memory space to second memory field with default covering threshold value, wherein first The secondary current memory space being compared is the initial memory space of second memory field;
Determination unit, for determining when the current memory space of second memory field is not less than the default covering threshold value Second memory field is in of short duration exception before current time;
When the current memory space of second memory field is less than the default covering threshold value, the transmission unit is triggered;
Wherein, second memory field is used to cache current operation business and business to be processed, and when there are idling-resource Cache heartbeat message to be sent.
11. device as claimed in claim 10, which is characterized in that described device further includes releasing unit and covering unit;
The releasing unit, for transmission unit by first memory field to one heartbeat message of the second equipment transmission it Afterwards, the message occupied space of heartbeat message described in first memory field is discharged;
The covering unit, for when the current memory space of second memory field be not less than the default covering threshold value when, Based on the current memory space of second memory field, the message occupied space discharged in first memory field is returned It mends, and updates the current memory space of second memory field.
12. device as claimed in claim 10, which is characterized in that the determination unit is also used to when second memory field Current memory space be less than the default covering threshold value when, after returning to step A, if returning to step the number of A Equal to the preset quantity that the first memory district center jumps message, it is determined that second memory field is in permanent abnormal.
13. device as claimed in claim 12, which is characterized in that described device further includes generation unit;
The generation unit generates warning information, the alarm after determining that second memory field is in permanent exception Information is used to indicate second memory field and is in permanent abnormal.
14. device as claimed in claim 12, which is characterized in that described device further includes receiving unit;
The receiving unit receives second equipment the after determining that second memory field is in permanent exception The switching command sent after one preset period of time, the switching command are used to indicate that switch to second equipment processing described current Business and the business to be processed.
15. device as claimed in claim 12, which is characterized in that described device further includes switch unit;
The switch unit switches at second equipment after determining that second memory field is in permanent exception Manage the current business and the business to be processed.
16. device as claimed in claim 14, which is characterized in that present count described in the memory headroom of first memory field It measures a heartbeat message to be determined by the memory headroom of first memory field and the size of each heartbeat message, and adjacent cardiac message Between transmission between be divided into the second preset period of time, second preset period of time is less than first preset period of time.
17. the device as described in claim 10-16 is any, which is characterized in that the default covering threshold value is worked as according to The EMS memory occupation ratio-dependent of preceding operation business.
18. the device as described in claim 10-16 is any, which is characterized in that the transmission unit, if being also used to judge knows There are idling-resources for second memory field, then send heartbeat message to second equipment by second memory field.
19. a kind of electronic equipment, which is characterized in that the electronic equipment includes that processor, communication interface, memory and communication are total Line, wherein processor, communication interface, memory complete mutual communication by communication bus;
Memory, for storing computer program;
Processor when for executing the program stored on memory, realizes any method and step of claim 1-9.
20. a kind of computer readable storage medium, which is characterized in that be stored with computer in the computer readable storage medium Program realizes claim 1-9 any method and step when the computer program is executed by processor.
CN201811108892.1A 2018-09-21 2018-09-21 Memory detection method and device Active CN109379246B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811108892.1A CN109379246B (en) 2018-09-21 2018-09-21 Memory detection method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811108892.1A CN109379246B (en) 2018-09-21 2018-09-21 Memory detection method and device

Publications (2)

Publication Number Publication Date
CN109379246A true CN109379246A (en) 2019-02-22
CN109379246B CN109379246B (en) 2021-03-05

Family

ID=65401759

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811108892.1A Active CN109379246B (en) 2018-09-21 2018-09-21 Memory detection method and device

Country Status (1)

Country Link
CN (1) CN109379246B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111131458A (en) * 2019-12-25 2020-05-08 深圳市网心科技有限公司 Heartbeat keep-alive method, electronic device, system and medium
CN111162965A (en) * 2019-12-17 2020-05-15 杭州迪普科技股份有限公司 Method and device for monitoring Buffer
WO2022057754A1 (en) * 2020-09-21 2022-03-24 华为技术有限公司 Memory control method and device
CN114791832A (en) * 2022-04-24 2022-07-26 深圳软牛科技有限公司 IOS system repair method and device when equipment space is insufficient and related components

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102968380A (en) * 2012-11-02 2013-03-13 深圳市同洲电子股份有限公司 Method and device for managing memory partitions of memory filesystem
CN102984029A (en) * 2012-11-30 2013-03-20 福建星网锐捷网络有限公司 Heartbeat detection device and method applied to distributed system and network equipment
CN103186469A (en) * 2011-12-27 2013-07-03 上海博泰悦臻电子设备制造有限公司 Memory allocation method and device, and memory recovery method
CN103365784A (en) * 2013-06-27 2013-10-23 华为技术有限公司 Method and device for memory recycle and allocation
CN104991850A (en) * 2015-06-27 2015-10-21 广州华多网络科技有限公司 Heartbeat package control method and apparatus for application program
CN108111630A (en) * 2018-01-22 2018-06-01 北京奇艺世纪科技有限公司 A kind of Zookeeper group systems and attaching method thereof and system

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103186469A (en) * 2011-12-27 2013-07-03 上海博泰悦臻电子设备制造有限公司 Memory allocation method and device, and memory recovery method
CN102968380A (en) * 2012-11-02 2013-03-13 深圳市同洲电子股份有限公司 Method and device for managing memory partitions of memory filesystem
CN102984029A (en) * 2012-11-30 2013-03-20 福建星网锐捷网络有限公司 Heartbeat detection device and method applied to distributed system and network equipment
CN103365784A (en) * 2013-06-27 2013-10-23 华为技术有限公司 Method and device for memory recycle and allocation
CN104991850A (en) * 2015-06-27 2015-10-21 广州华多网络科技有限公司 Heartbeat package control method and apparatus for application program
CN108111630A (en) * 2018-01-22 2018-06-01 北京奇艺世纪科技有限公司 A kind of Zookeeper group systems and attaching method thereof and system

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111162965A (en) * 2019-12-17 2020-05-15 杭州迪普科技股份有限公司 Method and device for monitoring Buffer
CN111131458A (en) * 2019-12-25 2020-05-08 深圳市网心科技有限公司 Heartbeat keep-alive method, electronic device, system and medium
WO2022057754A1 (en) * 2020-09-21 2022-03-24 华为技术有限公司 Memory control method and device
CN114791832A (en) * 2022-04-24 2022-07-26 深圳软牛科技有限公司 IOS system repair method and device when equipment space is insufficient and related components
CN114791832B (en) * 2022-04-24 2024-02-27 深圳软牛科技集团股份有限公司 IOS system repairing method and device when equipment space is insufficient and related components

Also Published As

Publication number Publication date
CN109379246B (en) 2021-03-05

Similar Documents

Publication Publication Date Title
CN109379246A (en) A kind of detection method and device of memory
EP2701074B1 (en) Method, device, and system for performing scheduling in multi-processor core system
CN110808922B (en) Message processing method and device, storage medium and electronic equipment
KR101981334B1 (en) Mobile communication system and method applying distributed data packet handling
CN105027081B (en) A kind of switching method and device of poll and interruption
CN103581042B (en) Method and device for sending data package
CN107302493B (en) Message processing method, message processing device and intelligent terminal
CN107547301A (en) A kind of master/slave device switching method and device
CN106533826A (en) Network state detection method and system
CN103607302A (en) Fault information report method, monitoring equipment and management equipment
CN108632049B (en) Method and device for virtual network function expansion
EP3310093A1 (en) Traffic control method and apparatus
CN110417761B (en) Communication method and device based on dual-computer redundancy
CN107197493B (en) A kind of method for switching network, network switching device and intelligent terminal
CN107832127A (en) Application control method and related product
CN110445932A (en) Exception falls card processing method, device, storage medium and terminal
CN109343944A (en) Data processing method, device, terminal and the storage medium of eSIM card
CN106034037A (en) Disaster recovery switching method and device based on virtual machine
CN110035399B (en) Message transmission method and related equipment
CN106304389B (en) A kind of indicating means and device of resource collision
CN105264499B (en) Message treatment method, device and reception core in a kind of shared queue
CN106533882B (en) Message processing method and device
CN113225830B (en) Data network uplink scheduling method and device and electronic equipment
EP3299960A1 (en) Virtual machine deployment method, device and network function virtualization orchestrator (nfvo)
CN105704773B (en) A kind of method, mobile communication system and mobile terminal switching mobile telecommunication channel

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
EE01 Entry into force of recordation of patent licensing contract
EE01 Entry into force of recordation of patent licensing contract

Application publication date: 20190222

Assignee: BEIJING STAR-NET RUIJIE NETWORKS Co.,Ltd.

Assignor: RUIJIE NETWORKS Co.,Ltd.

Contract record no.: X2022350000023

Denomination of invention: A memory detection method and device

Granted publication date: 20210305

License type: Common License

Record date: 20220808