CN115190089A - Message storage method, device, equipment and storage medium - Google Patents

Message storage method, device, equipment and storage medium Download PDF

Info

Publication number
CN115190089A
CN115190089A CN202210590359.3A CN202210590359A CN115190089A CN 115190089 A CN115190089 A CN 115190089A CN 202210590359 A CN202210590359 A CN 202210590359A CN 115190089 A CN115190089 A CN 115190089A
Authority
CN
China
Prior art keywords
message
storage
messages
space
storage space
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
CN202210590359.3A
Other languages
Chinese (zh)
Other versions
CN115190089B (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.)
Yusur Technology Co ltd
Original Assignee
Yusur Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Yusur Technology Co ltd filed Critical Yusur Technology Co ltd
Priority to CN202210590359.3A priority Critical patent/CN115190089B/en
Publication of CN115190089A publication Critical patent/CN115190089A/en
Application granted granted Critical
Publication of CN115190089B publication Critical patent/CN115190089B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L49/00Packet switching elements
    • H04L49/90Buffering arrangements
    • H04L49/9042Separate storage for different parts of the packet, e.g. header and payload
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/50Queue scheduling
    • H04L47/62Queue scheduling characterised by scheduling criteria
    • H04L47/625Queue scheduling characterised by scheduling criteria for service slots or service orders
    • H04L47/6275Queue scheduling characterised by scheduling criteria for service slots or service orders based on priority

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The disclosure relates to a message storage method, a device, equipment and a storage medium, wherein the method comprises the following steps: receiving a message; sequentially increasing storage spaces distributed for the messages, and sequentially storing the data of the messages into the distributed storage spaces from the head of the messages until the end mark of the message is detected in the storage spaces; and the size of the storage space is smaller than or equal to the space occupied by the preset minimum message. According to the method and the device, the storage space is sequentially and increasingly allocated to the received data message until the end mark of the message stored in the allocated storage space is detected, so that the storage space is allocated to the message as required, the space waste caused by uniformly allocating the storage space for the messages with different lengths is avoided, and the utilization rate of the storage space is improved.

Description

Message storage method, device, equipment and storage medium
Technical Field
The present disclosure relates to the field of data communication technologies, and in particular, to a method, an apparatus, a device, and a storage medium for storing a packet.
Background
With the continuous improvement of communication level, various network equipment types and quantity increase day by day, the communication requirements among different equipment are continuously improved, so that the data volume is increased explosively, and great pressure is brought to the traditional data processing and management platform.
In the face of a large amount of network data and various data formats, the current message storage mode is mainly based on a single storage space, and is distributed according to a uniform storage space no matter the size of a data frame, so that serious storage space waste exists.
Disclosure of Invention
In order to solve the technical problem or at least partially solve the technical problem, the present disclosure provides a message storage method, apparatus, device and storage medium.
In a first aspect, the present disclosure provides a message storage method, including:
receiving a message;
sequentially increasing storage spaces for distributing the messages, and sequentially storing the data of the messages into the distributed storage spaces from the head of the messages until an end mark of the message is detected in the storage spaces;
and the size of the storage space is smaller than or equal to the space occupied by the preset minimum message.
Optionally, the method further includes:
and establishing a corresponding relation between the message and the storage space.
Optionally, the method further includes:
receiving a release instruction, wherein the release instruction comprises information of a target storage space;
and releasing the target storage space according to the release instruction.
Optionally, the method further includes:
acquiring the use times of a target message;
and releasing the storage space corresponding to the target message in response to the fact that the using times are larger than or equal to the preset times.
Optionally, before the releasing the storage space corresponding to the target packet, the method further includes:
determining whether a reservation use request for the target message is received;
if the reserved use request aiming at the target message is not received, releasing the storage space corresponding to the target message;
and if the reserved use request is received, continuing to store the target message.
Optionally, the sequentially increasing allocates a storage space for the packet, and sequentially stores the data of the packet into the allocated storage space from the header of the packet until the end marker of the packet is detected in the storage space, where the method further includes:
detecting whether the residual space is larger than a preset space or not;
if the number of the messages is larger than the preset space, sequentially increasing storage spaces for distributing the messages, and sequentially storing the data of the messages into the distributed storage spaces from the head of the messages until the end mark of the message is detected in the storage spaces;
otherwise, refusing to store the message.
Optionally, the sequentially increasing allocates a storage space for the packet, and sequentially stores the data of the packet into the allocated storage space from the header of the packet until the end marker of the packet is detected in the storage space, where the method further includes:
determining whether other storage tasks are currently being performed;
if not, sequentially increasing storage spaces for the messages, and sequentially storing the data of the messages into the allocated storage spaces from the head of the messages until the end mark of the message is detected in the storage spaces;
if yes, after the current task is completed, sequentially increasing storage spaces for the messages, and sequentially storing the data of the messages into the allocated storage spaces from the head of the messages until the end mark of the message is detected in the storage spaces.
In a second aspect, the present disclosure provides a message storage apparatus, including:
the receiving module is used for receiving the message;
the storage module is used for sequentially increasing storage spaces for the messages and sequentially storing the data of the messages into the allocated storage spaces from the head of the messages until the end mark of the message is detected in the storage spaces; and the size of the storage space is smaller than the storage space required by the message. And the size of the storage space is smaller than the storage space required by the message.
In a third aspect, the present disclosure provides an electronic device, comprising:
a memory;
a processor; and
a computer program;
wherein the computer program is stored in the memory and configured to be executed by the processor to implement the method of the first aspect.
In a fourth aspect, the present disclosure provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the method according to the first aspect.
Compared with the prior art, the technical scheme provided by the embodiment of the disclosure has the following advantages:
the method, the device, the equipment and the storage medium for storing the messages are characterized in that storage spaces are sequentially and additionally distributed for received data messages, the size of the storage space distributed each time is set to be smaller than or equal to the space occupied by the preset minimum message until the end mark of the message stored in the distributed storage space is detected, the storage space is distributed for the messages according to the requirement, the space waste caused by uniformly distributing the storage spaces for the messages with different lengths is avoided, and the utilization rate of the storage space is improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the disclosure.
In order to more clearly illustrate the embodiments or technical solutions in the prior art of the present disclosure, the drawings used in the description of the embodiments or prior art will be briefly described below, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive exercise.
Fig. 1 is a flowchart of a message storage method provided in an embodiment of the present disclosure;
fig. 2 is a flowchart of another message storage method provided in the embodiment of the present disclosure;
FIG. 3 is a schematic diagram of memory slice address partitioning according to an embodiment of the disclosure;
fig. 4 is a schematic diagram of a correspondence between a packet and a memory slice according to the embodiment of the present disclosure;
fig. 5 is a schematic structural diagram of a message storage device according to the present disclosure;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure.
Detailed Description
In order that the above objects, features and advantages of the present disclosure may be more clearly understood, aspects of the present disclosure will be further described below. It should be noted that the embodiments and features of the embodiments of the present disclosure may be combined with each other without conflict.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present disclosure, but the present disclosure may be practiced otherwise than as described herein; it is to be understood that the embodiments disclosed in the specification are only a few embodiments of the present disclosure, and not all embodiments.
In the process of communication between network devices, for messages of different formats, the message lengths are inconsistent, and if a storage space of a fixed size is used for caching, the storage space is greatly wasted. And different lines correspond to different storage spaces, so that unified management and distribution of communication data cannot be realized, and great complexity and difficulty are caused to communication among the lines. In view of the foregoing problems, embodiments of the present disclosure provide a message storage method, which is described below with reference to specific embodiments.
Fig. 1 is a flowchart of a message storage method provided in an embodiment of the present disclosure, where the method may be executed by a message storage device, and the message storage device may be implemented in a software and/or hardware manner, and the message storage device may be configured in an electronic device, such as a server or a terminal, where the terminal specifically includes a mobile phone, a computer, or a tablet computer. The method comprises the following specific steps:
s101, receiving a message.
The memory usually has a plurality of line ports for receiving messages, and when a message comes to the line port to apply for writing into the memory, the message comes to the line port.
Illustratively, when a plurality of messages are transmitted to different line ports at the same time, before the messages are written into the memory, the messages applied for writing can be sorted according to the priority of the line ports, so that the storage space is allocated to the different messages in sequence in the subsequent steps. In some embodiments, the messages have priority information, and the messages without the priority information can be sorted according to the priority of the line junction receiving the messages by detecting the priority information in the messages for sorting.
S102, sequentially increasing storage spaces for the messages, and sequentially storing data of the messages into the allocated storage spaces from the head of the messages until an end mark of the message is detected in the storage spaces; the size of the storage space is smaller than or equal to the space occupied by the preset minimum message.
The lengths of different messages are not consistent, the specific length of the message cannot be known before the message is written into the memory, and in order to allocate the memory space for the messages with different lengths as required, the memory is divided into a plurality of memory spaces for allocation, and the memory spaces are used as basic units for allocation. For example, the entire memory space of the memory may be divided into a plurality of memory slices, and the memory slices may be used as the memory space for allocation. The size of the storage space is smaller than or equal to the space occupied by the preset minimum message, so that the allocated storage space is prevented from being far larger than the length of the data message when the storage space is allocated. When a message is written into a memory, memory spaces are sequentially added to allocate the message, for example, firstly, a memory slice is allocated to the message, the message is stored into the memory slice from the head data of the message, after the memory slice is completely used, whether an end mark of the message, namely a message end indicator, exists in the memory slice is detected, if not, a memory slice is continuously allocated to the message, the operations of storing and detecting are repeated until the message end indicator is detected in the memory slice, and when the message end indicator exists in the allocated memory slice, the message is stored completely.
According to the embodiment of the invention, the storage space is sequentially and additionally allocated to the received data messages, the size of the storage space allocated each time is set to be smaller than or equal to the space occupied by the preset minimum message until the end mark of the message stored in the allocated storage space is detected, so that the storage space is allocated to the message according to the requirement, the space waste caused by uniformly allocating the storage space for the messages with different lengths is avoided, and the utilization rate of the storage space is improved.
Fig. 2 is a flowchart of another message storage method provided in the embodiment of the present disclosure, which specifically includes the following steps:
s201, receiving a message.
Specifically, the implementation process and principle of S201 and S101 are consistent, and are not described herein again.
S202, sequentially increasing storage spaces for distributing the messages, and sequentially storing data of the messages into the distributed storage spaces from the head of the messages until an end mark of the message is detected in the storage spaces; the size of the storage space is smaller than or equal to the space occupied by the preset minimum message.
Specifically, the implementation process and principle of S202 and S102 are the same, and are not described herein again.
S203, establishing a corresponding relation between the message and the storage space.
The corresponding relation between the message and the storage space can be established by establishing the identifier of the message and binding the identifier of the message and the address of the storage space for storing the identifier of the message, so that the address stored by the message can be quickly determined through the identifier of the message so as to use the message.
Illustratively, the messages may be numbered according to the order of receiving the messages, and a first identifier is assigned to the messages, and if there are multiple messages arriving at different intersections at the same time, the messages may be numbered according to the priority ranking of the above embodiment, and the first identifier assigned to the message is used as a unique identifier of the message, for example, the first identifier may be 0x000, 0x001, 0x002, 0x003, and the like, so as to establish a correspondence between the message and the storage space in the following.
Correspondingly, when the memory is divided into a plurality of memory slices, a second identifier is given to the memory slice for the number of the memory slice, taking the size of the total memory space of the memory as 256KB for example, the memory space is divided into memory slices, and if a memory slice is divided into 256 bytes, then: 256KB/256b =1024 memory slices; the data bit width is 512 bits, that is, one address stores 64Byte message data, one memory slice contains 4 memory addresses, the address calculation of the memory space is 1024 memory slices, each memory slice has 4 addresses, therefore, 4096 addresses are needed in total, the address range is 0x 000-0 xFFF, the address bit width is 12 bits, the memory slices are numbered, the range of the second identifier is 0-1023, and the address area and the first address corresponding to the number access are shown in FIG. 3.
For example, referring to fig. 4, a first identifier of a message and a second identifier of a memory slice storing the message may be recorded, so that an operation of searching the memory slice may be completed according to an identity identifier of the message, thereby obtaining a message content to implement message output, and the management of a storage space is simpler and more convenient.
According to the embodiment of the invention, the corresponding relation between the message and the storage space is established, so that the address for storing the message is searched according to the message for outputting the message, the complexity of transmitting a large amount of address information is avoided, the operation process is simplified, and the management of the storage space is more convenient.
On the basis of the above embodiment, when the processor needs to call a message, the storage space outputs the message, and then the corresponding storage space is released according to whether the processor multiplexes the message. The manner in which the storage space is released may be varied and is particularly applicable in different situations, and several possible manners are described below.
In one possible approach, this includes: receiving a release instruction, wherein the release instruction comprises information of a target storage space; and releasing the target storage space according to the release instruction.
After the processor completes the related operation by using the message data, when the processor determines that the message is no longer used, a release instruction is sent, the release instruction has information of a storage space for storing the message, for example, the processor generates the release instruction including the second identifier, and after receiving the release instruction, the message storage device releases the storage slice pointed by the second identifier, that is, releases the target storage space, according to the release instruction.
Another possible approach includes: acquiring the use times of a target message; and releasing the storage space corresponding to the target message in response to the use times being greater than or equal to the preset times.
After the processor completes the related operation by using the message data, when the processor determines that the message still needs to be reused and determines the multiplexing times of the message, the multiplexing times is set as the preset times. And then, after the target message is output in the storage space each time, the message storage device acquires the use times of the target message, and performs response operation when the use times are determined to be greater than or equal to the preset times, so as to release the storage space corresponding to the target message.
Under the condition of the feasible mode, before the storage space corresponding to the target message is released, the method further comprises the following steps: determining whether a reservation use request aiming at a target message is received; if the reserved use request aiming at the target message is not received, releasing the storage space corresponding to the target message; and if the reserved use request is received, continuing to store the target message.
After the processor completes the related operation by using the message data, when the processor determines that the message is required to be reused, but the specific times of message multiplexing cannot be determined, a reserved use request aiming at the target message is sent, the message storage device determines whether the reserved use request of the target message is received or not before releasing the storage space corresponding to the target message, and if not, the storage space corresponding to the target message is released; if yes, the target message is stored continuously.
Illustratively, in the case that the processor determines that the message still needs to be reused, but cannot determine the specific times of message multiplexing, the processor further sends a multiplexing instruction for the target memory slice, so that the target memory slice continues to store the message, and correspondingly, when the target memory slice outputs the message again, a reservation release instruction is generated, the message storage device counts the times of receiving the multiplexing instruction and the times of receiving the reservation release instruction after the processor completes the operation using the message, and if the times of receiving the multiplexing instruction is greater than the times of receiving the reservation release instruction, it means that the message still needs to be used, and the target memory slice continues to store the message; if the number of times of receiving the multiplexing instruction is equal to the number of times of receiving the reservation release instruction, the target memory slice can end the message storage task and release the target memory slice.
The storage space for storing the target message is released by receiving the release instruction, whether the storage space for storing the target message is released is determined by judging whether the using times of the message are larger than the preset times or not and releasing the received reserved using request before the storage space is released, the storage space can be released in time, the storage space which needs to be stored continuously cannot be released mistakenly, and the flexibility of releasing the storage space is improved.
On the basis of the above embodiment, before sequentially increasing storage spaces allocated for the packets and sequentially storing data of the packets into the allocated storage spaces from the headers of the packets until an end marker of the packet is detected in the storage spaces, the method further includes: detecting whether the residual space is larger than a preset space; if the number of the messages is larger than the preset space, sequentially increasing storage spaces for the messages, and sequentially storing data of the messages into the allocated storage spaces from the head of the messages until an end mark of the message is detected in the storage spaces; otherwise, the message is refused to be stored.
Before storing the message, it is necessary to determine whether the remaining storage space is sufficient to store the received message. Specifically, before the message is written into the memory, the message length cannot be determined, but a critical value of the longest length of the messages in all formats, that is, the critical value that the longest length of all the messages cannot exceed, is determined, the critical value is set to the size of the preset space, whether the message can be stored is determined by judging whether the remaining space is larger than the preset space, if so, the subsequent storage step is performed, and if not, the message is discarded.
The embodiment of the disclosure determines whether to store the received data message by judging whether the remaining space is larger than the preset space, so that the missing of the stored message data caused by insufficient remaining storage can be avoided.
On the basis of the above embodiment, sequentially increasing storage spaces allocated for the packets, and sequentially storing data of the packets into the allocated storage spaces starting from the header of the packet until the end marker of the packet is detected in the storage space, the method further includes: determining whether other storage tasks are currently being performed; if not, sequentially increasing storage spaces for the messages, and sequentially storing the data of the messages into the allocated storage spaces from the head of the messages until the end mark of the message is detected in the storage spaces; if yes, after the current task is completed, sequentially increasing storage spaces for the messages, and sequentially storing data of the messages into the allocated storage spaces from the head of the messages until the end mark of the message is detected in the storage spaces.
When the message is stored, if other storage tasks are executed currently, the message storage is performed again after the current task is executed, so that the message is stored according to the sequence of receiving the message, and the data loss caused by disordered storage is avoided.
According to the message storage method and device, the message storage is carried out after the current storage task is determined to be completed, the messages are stored in sequence, and data loss caused by storage disorder is avoided.
Fig. 5 is a schematic structural diagram of a message storage apparatus provided in the present disclosure, where the message storage apparatus 500 includes: a receiving module 501, configured to receive a message; a storage module 502, configured to sequentially add storage spaces allocated to the packet, and sequentially store data of the packet in the allocated storage spaces from the head of the packet until an end marker of the packet is detected in the storage spaces; the size of the storage space is smaller than that of the storage space required by the message. The size of the storage space is smaller than that of the message.
Optionally, the message storage apparatus 500 further includes a management module 503, configured to establish a correspondence between the message and the storage space.
Optionally, the message storage apparatus 500 further includes a release module 504, configured to receive a release instruction, where the release instruction includes information of the target storage space; and releasing the target storage space according to the release instruction.
Optionally, the releasing module 504 further includes a first releasing unit 5041, configured to obtain the number of times of using the target packet; and responding to the use times larger than or equal to the preset times, and releasing the storage space corresponding to the target message.
Optionally, the releasing module 504 further includes a second releasing unit 5042, configured to determine whether a reserved usage request for the target packet is received before releasing the storage space corresponding to the target packet; if the reserved use request for the target message is not received, the second releasing unit 5042 is configured to release the storage space corresponding to the target message; if the reserved usage request is received, the storage module 502 continues to store the target message.
Optionally, the storage module 502 includes a first detecting unit 5021, configured to sequentially increase storage spaces allocated to the packets, and sequentially store data of the packets into the allocated storage spaces from the headers of the packets until an end marker of the packet is detected in the storage spaces, and detect whether the remaining space is larger than a preset space; if the number of the messages is larger than the preset space, the storage module 502 sequentially allocates storage spaces for the messages, and sequentially stores data of the messages into the allocated storage spaces from the head of the messages until the end mark of the message is detected in the storage spaces; otherwise, the storage module 502 is also configured to refuse to allocate the storage space.
Optionally, the storage module 502 further includes a second detecting unit 5022, configured to determine whether other storage tasks are currently being executed before a termination flag of a packet is detected in a storage space, where the storage space is sequentially added to allocate a storage space for the packet, and data of the packet is sequentially stored in the allocated storage space from a header of the packet; if not, the storage module 502 sequentially increases storage spaces allocated for the messages, and sequentially stores data of the messages into the allocated storage spaces from the head of the messages until an end mark of the message is detected in the storage spaces; if yes, the storage module 502 sequentially allocates storage spaces for the packets after the second detection unit 5022 detects that the current task is completed, and sequentially stores the data of the packets into the allocated storage spaces from the headers of the packets until the end marker of the packet is detected in the storage spaces.
The message storage apparatus in the embodiment shown in fig. 5 may be used to implement the technical solution of the above method embodiment, and the implementation principle and the technical effect are similar, which are not described herein again.
Fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure. As shown in fig. 6, the electronic device 60 includes: memory 61, processor 62, computer programs and communication interface 63; wherein the computer program is stored in the memory 61 and is configured to be executed by the processor 62 in a message storage method as described above.
In addition, the embodiment of the present disclosure also provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement the message storage method described in the foregoing embodiment.
It is noted that, in this document, relational terms such as "first" and "second," and the like, may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising a … …" does not exclude the presence of another identical element in a process, method, article, or apparatus that comprises the element.
The foregoing are merely exemplary embodiments of the present disclosure, which enable those skilled in the art to understand or practice the present disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the disclosure. Thus, the present disclosure is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A message storage method is characterized by comprising the following steps:
receiving a message;
sequentially increasing storage spaces distributed for the messages, and sequentially storing the data of the messages into the distributed storage spaces from the head of the messages until the end mark of the message is detected in the storage spaces;
the size of the storage space is smaller than or equal to the space occupied by the preset minimum message.
2. The method of claim 1, wherein the method further comprises:
and establishing a corresponding relation between the message and the storage space.
3. The method of claim 1, wherein the method further comprises:
receiving a release instruction, wherein the release instruction comprises information of a target storage space;
and releasing the target storage space according to the release instruction.
4. The method of claim 2, wherein the method further comprises:
acquiring the use times of a target message;
and responding to the condition that the using times are larger than or equal to the preset times, and releasing the storage space corresponding to the target message.
5. The method according to claim 4, wherein before releasing the storage space corresponding to the target packet, the method further comprises:
determining whether a reservation use request for the target message is received;
if the reserved use request aiming at the target message is not received, releasing the storage space corresponding to the target message;
and if the reserved use request is received, continuing to store the target message.
6. The method of claim 1, wherein memory space is allocated for the packet in sequential increments, and data of the packet is stored in the allocated memory space in sequential increments starting from a header of the packet until an end marker of the packet is detected in the memory space, the method further comprising:
detecting whether the residual space is larger than a preset space;
if the number of the messages is larger than the preset space, sequentially increasing storage spaces distributed for the messages, and sequentially storing the data of the messages into the distributed storage spaces from the head of the messages until the end marks of the messages are detected in the storage spaces;
otherwise, the memory space is refused to be allocated.
7. The method of claim 1, wherein the sequentially increasing allocates storage space for the packet and stores data of the packet into the allocated storage space sequentially from a header of the packet until an end marker of the packet is detected in the storage space, and the method further comprises:
determining whether other storage tasks are currently being performed;
if not, sequentially increasing storage spaces for the messages, and sequentially storing the data of the messages into the allocated storage spaces from the head of the messages until the end mark of the message is detected in the storage spaces;
if yes, after the current task is completed, sequentially increasing storage spaces for the messages, and sequentially storing the data of the messages into the allocated storage spaces from the head of the messages until the end mark of the message is detected in the storage spaces.
8. A message storage device, comprising:
the receiving module is used for receiving the message;
the storage module is used for sequentially increasing storage spaces for the messages and sequentially storing the data of the messages into the allocated storage spaces from the head of the messages until the end mark of the message is detected in the storage spaces; and the size of the storage space is smaller than the storage space required by the message. And the size of the storage space is smaller than the storage space required by the message.
9. An electronic device, comprising:
a memory;
a processor; and
a computer program;
wherein the computer program is stored in the memory and configured to be executed by the processor to implement the method of any one of claims 1-7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the method according to any one of claims 1-7.
CN202210590359.3A 2022-05-26 2022-05-26 Message storage method, device, equipment and storage medium Active CN115190089B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210590359.3A CN115190089B (en) 2022-05-26 2022-05-26 Message storage method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210590359.3A CN115190089B (en) 2022-05-26 2022-05-26 Message storage method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN115190089A true CN115190089A (en) 2022-10-14
CN115190089B CN115190089B (en) 2024-03-22

Family

ID=83514246

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210590359.3A Active CN115190089B (en) 2022-05-26 2022-05-26 Message storage method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115190089B (en)

Citations (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1073251A2 (en) * 1999-07-26 2001-01-31 Texas Instruments Incorporated Packet buffer management
CN1855881A (en) * 2005-04-28 2006-11-01 华为技术有限公司 Method for dynamically sharing space of memory
US20080298363A1 (en) * 2007-05-29 2008-12-04 Bela Ban Message handling multiplexer
CN101692655A (en) * 2009-10-23 2010-04-07 烽火通信科技股份有限公司 Data frame storage management device
WO2010075795A1 (en) * 2008-12-31 2010-07-08 华为技术有限公司 Method and device for fragment information processing
JP2013135383A (en) * 2011-12-27 2013-07-08 Nippon Telegr & Teleph Corp <Ntt> Packet buffer device and packet buffer control method
CN103970672A (en) * 2014-04-09 2014-08-06 汉柏科技有限公司 Message memory management method and system
CN104396196A (en) * 2013-06-26 2015-03-04 华为技术有限公司 Data packet processing method and a data packet processing device and system
CN105656805A (en) * 2016-01-20 2016-06-08 中国人民解放军国防科学技术大学 Packet receiving method and device based on control block predistribution
CN106844248A (en) * 2017-02-16 2017-06-13 北京中航通用科技有限公司 The method and system of data transfer
CN107220187A (en) * 2017-05-22 2017-09-29 北京星网锐捷网络技术有限公司 A kind of buffer memory management method, device and field programmable gate array
US9864538B1 (en) * 2015-06-25 2018-01-09 Amazon Technologies, Inc. Data size reduction
US10044646B1 (en) * 2014-12-02 2018-08-07 Adtran, Inc. Systems and methods for efficiently storing packet data in network switches
CN109246036A (en) * 2017-07-10 2019-01-18 深圳市中兴微电子技术有限公司 A kind of method and apparatus handling fragment message
CN109669640A (en) * 2018-12-24 2019-04-23 浙江大华技术股份有限公司 A kind of date storage method, device, electronic equipment and medium
CN110417514A (en) * 2019-07-22 2019-11-05 北京地平线机器人技术研发有限公司 Data transmission method for uplink and device, data receiver method and device
CN114217738A (en) * 2021-11-25 2022-03-22 深圳益邦阳光有限公司 Dynamic queue type cyclic storage method, device, equipment and medium

Patent Citations (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1073251A2 (en) * 1999-07-26 2001-01-31 Texas Instruments Incorporated Packet buffer management
CN1855881A (en) * 2005-04-28 2006-11-01 华为技术有限公司 Method for dynamically sharing space of memory
US20080298363A1 (en) * 2007-05-29 2008-12-04 Bela Ban Message handling multiplexer
WO2010075795A1 (en) * 2008-12-31 2010-07-08 华为技术有限公司 Method and device for fragment information processing
CN101692655A (en) * 2009-10-23 2010-04-07 烽火通信科技股份有限公司 Data frame storage management device
JP2013135383A (en) * 2011-12-27 2013-07-08 Nippon Telegr & Teleph Corp <Ntt> Packet buffer device and packet buffer control method
CN104396196A (en) * 2013-06-26 2015-03-04 华为技术有限公司 Data packet processing method and a data packet processing device and system
CN103970672A (en) * 2014-04-09 2014-08-06 汉柏科技有限公司 Message memory management method and system
US10044646B1 (en) * 2014-12-02 2018-08-07 Adtran, Inc. Systems and methods for efficiently storing packet data in network switches
US9864538B1 (en) * 2015-06-25 2018-01-09 Amazon Technologies, Inc. Data size reduction
CN105656805A (en) * 2016-01-20 2016-06-08 中国人民解放军国防科学技术大学 Packet receiving method and device based on control block predistribution
CN106844248A (en) * 2017-02-16 2017-06-13 北京中航通用科技有限公司 The method and system of data transfer
CN107220187A (en) * 2017-05-22 2017-09-29 北京星网锐捷网络技术有限公司 A kind of buffer memory management method, device and field programmable gate array
CN109246036A (en) * 2017-07-10 2019-01-18 深圳市中兴微电子技术有限公司 A kind of method and apparatus handling fragment message
CN109669640A (en) * 2018-12-24 2019-04-23 浙江大华技术股份有限公司 A kind of date storage method, device, electronic equipment and medium
CN110417514A (en) * 2019-07-22 2019-11-05 北京地平线机器人技术研发有限公司 Data transmission method for uplink and device, data receiver method and device
CN114217738A (en) * 2021-11-25 2022-03-22 深圳益邦阳光有限公司 Dynamic queue type cyclic storage method, device, equipment and medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
W.W. CHU等: "Optimal File Allocation in a Multiple Computer System", 《IEEE TRANSACTIONS ON COMPUTERS》 *
刘伟伟等: "改进的帧间差分CAN报文存储方案研究", 《万方数据库》 *
王瑞朋;黄琼;唐伦;李伟;陈前斌;隆克平;: "嵌入式TCP/IP协议的内存管理技术", 微计算机信息, no. 08, 20 March 2006 (2006-03-20) *

Also Published As

Publication number Publication date
CN115190089B (en) 2024-03-22

Similar Documents

Publication Publication Date Title
CN112492063B (en) IP address pool allocation and application method, device, equipment and medium
CN101557345A (en) Method for providing equipment resource and equipment resource management device
EP3293969A1 (en) Method of terminal-based conference load-balancing, and device and system utilizing same
CN109120885B (en) Video data acquisition method and device
CN104348928B (en) A kind of method, management equipment, request equipment and the system of distribution address resource
CN115174490B (en) Data transmission method and network application terminal
CN101309305B (en) IP address allocating method and apparatus
US9584446B2 (en) Memory buffer management method and system having multiple receive ring buffers
CN114364031A (en) Service providing method, device and storage medium
CN110392119B (en) Data transmission method and base station
CN113055493B (en) Data packet processing method, device, system, scheduling device and storage medium
CN101127704B (en) A method and device for dynamic bandwidth allocation
CN107370895B (en) Number hiding device, number hiding method and number hiding system
CN113824634A (en) Data transmission method and device, computer equipment and readable storage medium
CN111198855B (en) Log data processing method and device
CN111614792B (en) Transparent transmission method, system, server, electronic device and storage medium
CN115190089A (en) Message storage method, device, equipment and storage medium
CN105243078A (en) File resource distribution method, system and apparatus
CN111930482A (en) Task processing method, device and equipment based on node cluster and storage medium
CN112689008B (en) Network connection pool management method, device, equipment and storage medium
US10237592B2 (en) Method and apparatus for video transmission
CN112689031A (en) IP address allocation method, device and medium
CN115114009A (en) Data query method, master node and slave nodes
CN106507224B (en) Method and related device for acquiring target file
CN112187540B (en) Issuing method of aggregation port configuration and network equipment

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