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

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

Info

Publication number
CN115190089B
CN115190089B CN202210590359.3A CN202210590359A CN115190089B CN 115190089 B CN115190089 B CN 115190089B CN 202210590359 A CN202210590359 A CN 202210590359A CN 115190089 B CN115190089 B CN 115190089B
Authority
CN
China
Prior art keywords
message
storage space
space
allocated
storage
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210590359.3A
Other languages
Chinese (zh)
Other versions
CN115190089A (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

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 method, a device, equipment and a storage medium for storing a message, wherein the method comprises the following steps: receiving a message; sequentially increasing storage space for the message, and sequentially storing the data of the message into the allocated storage space from the head of the message until the end mark of the message is detected in the storage space; 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 allocated for the received data messages in sequence until the end mark of the messages stored in the allocated storage space is detected, so that the storage space is allocated for the messages according to the needs, 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 disclosure relates to the technical field of data communication, and in particular relates to a method, a device, equipment and a storage medium for storing a message.
Background
Along with the continuous improvement of communication level, various network equipment types and numbers are increased, and the communication demands among different equipment are continuously improved, so that the data volume is increased in an explosive manner, and huge 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, no matter the size of a data frame, the data frame is distributed according to the unified storage space, and serious storage space waste exists.
Disclosure of Invention
In order to solve the above technical problems or at least partially solve the above technical problems, the present disclosure provides a method, an apparatus, a device, and a storage medium for storing a message.
In a first aspect, the present disclosure provides a method for storing a message, including:
receiving a message;
sequentially increasing storage space for the message, and sequentially storing the data of the message into the allocated storage space from the head of the message until the end mark of the message is detected in the storage space;
the size of the storage space is smaller than or equal to the space occupied by the preset minimum message.
Optionally, the method further comprises:
and establishing a corresponding relation between the message and the storage space.
Optionally, 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.
Optionally, the method further comprises:
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 preset times.
Optionally, before the releasing the storage space corresponding to the target message, the method further includes:
determining whether a reservation use request for the target message is received;
if the reservation use request aiming at the target message is not received, releasing the storage space corresponding to the target message;
and if the reservation use request is received, continuing to store the target message.
Optionally, the sequentially increasing allocates a storage space for the message, and sequentially stores data of the message into the allocated storage space from a header of the message until an end mark of the message is detected in the storage space, where the method further includes:
detecting whether the residual space is larger than a preset space;
if the data of the message is larger than the preset space, sequentially increasing the storage space for the message, and sequentially storing the data of the message into the allocated storage space from the head of the message until the end mark of the message is detected in the storage space;
otherwise, refusing to store the message.
Optionally, the sequentially increasing allocates a storage space for the message, and sequentially stores data of the message into the allocated storage space from a header of the message until an end mark of the message 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 space for the message, and sequentially storing the data of the message into the allocated storage space from the head of the message until the end mark of the message is detected in the storage space;
if yes, after the current task is finished, sequentially increasing storage space for the message, and sequentially storing the data of the message into the allocated storage space from the head of the message until the end mark of the message is detected in the storage space.
In a second aspect, the present disclosure provides a message storage device, including:
the receiving module is used for receiving the message;
the storage module is used for sequentially increasing the storage space allocated for the message, and sequentially storing the data of the message into the allocated storage space from the head of the message until the end mark of the message is detected in the storage space; the size of the storage space is smaller than the storage space required by the message. 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 according to the first aspect.
In a fourth aspect, the present disclosure provides 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 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 provided, the storage space is sequentially allocated for the received data messages, the size of the storage space allocated each time is set to be smaller than or equal to the space required 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 as required for the messages, 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.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description, serve to explain the principles of the disclosure.
In order to more clearly illustrate the embodiments of the present disclosure or the solutions in the prior art, the drawings that are required for the description of the embodiments or the prior art will be briefly described below, and it will be obvious to those skilled in the art that other drawings can be obtained from these drawings without inventive effort.
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 method for storing messages according to an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of memory slice address partitioning according to an embodiment of the present disclosure;
fig. 4 is a schematic diagram of a correspondence relationship between a packet and a memory slice provided in an embodiment of the disclosure;
fig. 5 is a schematic structural diagram of a message storage device provided in the present disclosure;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the disclosure.
Detailed Description
In order that the above objects, features and advantages of the present disclosure may be more clearly understood, a further description of aspects of the present disclosure will be provided below. It should be noted that, without conflict, the embodiments of the present disclosure and features in the embodiments may be combined with each other.
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 will be apparent that the embodiments in the specification are only some, but not all, embodiments of the disclosure.
In the process of communication between network devices, for messages in different formats, the lengths of the messages are inconsistent, and if a storage space with a fixed size is adopted for caching, great waste of the storage space can be caused. And different lines correspond to different storage spaces, so that unified management and distribution of communication data cannot be realized, and great complexity is caused to communication between the lines. In view of the foregoing, embodiments of the present disclosure provide a method for storing a message, which is described below with reference to specific embodiments.
Fig. 1 is a flowchart of a message storage method provided by an embodiment of the present disclosure, where the method may be performed by a message storage device, and the message storage device may be implemented in software and/or hardware, and the message storage device may be configured in an electronic device, for example, a server or a terminal, where the terminal specifically includes a mobile phone, a computer, a tablet computer, or the like. The method comprises the following specific steps:
s101, receiving a message.
The memory receives a message from a plurality of line ports, and when the message is applied to write into the memory from the line port, the message is received from the line port.
When a plurality of messages are transmitted to different intersections at the same time, the messages applied for writing can be ordered according to the priority of the intersections before the messages are written into the memory, so that the memory space is allocated for the different messages in sequence in the subsequent steps. In some embodiments, the messages are provided with priority information, and at this time, the messages without the priority information may be ranked according to the priority of the line junction receiving the messages by detecting the priority information in the messages and ranking the messages.
S102, sequentially increasing storage space for the message, and sequentially storing data of the message into the allocated storage space from the head of the message until an end mark of the message is detected in the storage space; 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 inconsistent, the specific length of the messages cannot be known before the messages are written into the memory, and in order to allocate the memory space according to the needs for the messages with different lengths, 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 are used as the memory space for allocation. The size of the storage space is smaller than or equal to the space required by the preset minimum message, so that the allocated storage space is prevented from being far longer than the length of the data message when the storage space is allocated. When writing a message into a memory, sequentially increasing memory space allocated to the message, for example, firstly allocating a memory slice to the message, starting from the header data of the message, storing the message into the memory slice, detecting whether the memory slice has an ending mark of the message, namely an ending indicator of the message after the memory slice is completely used, if not, continuing to allocate a memory slice to the message, repeating the above-mentioned storing and detecting operations until the ending indicator of the message is detected in the memory slice, and when the ending indicator of the message is detected to be stored in the allocated memory slice, meaning that the storing of the message is completed.
According to the embodiment of the disclosure, the storage space is sequentially allocated for the received data messages, the size of the storage space allocated each time is set to be smaller than or equal to the space required 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 for the message according to the need, 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 an embodiment of the disclosure, which specifically includes the following steps:
s201, receiving the message.
Specifically, the implementation process and principle of S201 and S101 are consistent, and will not be described herein.
S202, sequentially increasing storage space for the message, and sequentially storing data of the message into the allocated storage space from the head of the message until an end mark of the message is detected in the storage space; 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 consistent, and will not be described herein.
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 message identifier and binding the message identifier with the address of the storage space storing the message identifier, so that the address stored by the message can be rapidly determined by the message identifier so as to use the message.
For example, the messages may be numbered according to the sequence of receiving the messages, and the first identifiers may be given to the messages, if there are multiple messages coming to different intersections at the same time, the first identifiers given to the messages may be numbered according to the priority ordering of the above embodiment, and the first identifiers given to the messages may be, for example, 0x000, 0x001, 0x002, 0x003, etc. as unique identifiers of the messages, so as to establish the correspondence between the messages and the storage space in the following.
Accordingly, when dividing the memory into a plurality of memory slices, a second identifier of the memory slice may be given to the memory slice number, taking the total memory space size of the memory as 256KB as an example, performing memory slice division on the memory space, and dividing one memory slice by 256Byte, then it is required to: 256KB/256 b=1024 memory slices; the data bit width is 512 bits, namely one address stores the message data of 64 bytes, one memory slice contains 4 memory addresses, the address calculation of the memory space is carried out, 1024 memory slices are provided, each memory slice has 4 addresses, so 4096 addresses are required, 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 number access corresponding address area and the first address are shown in figure 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 the operation of searching the memory slice may be completed according to the identity identifier of the message, thereby obtaining the content of the message to realize the output of the message, which is simpler and more convenient for management of the memory space.
According to the embodiment of the disclosure, the address of the message is searched and stored according to the message by establishing the corresponding relation between the message and the storage space so as to output the message, so that the trouble that a large amount of address information needs to be transmitted is avoided, the operation flow is simplified, and the management of the storage space is more convenient.
Based on the above embodiment, when the processor needs to call a message, the memory space will output the message, and then the corresponding memory space will be released according to whether the processor multiplexes the message. There are various ways to release the storage space, and several possible ways are described below.
In one possible manner, the method 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.
After the processor completes the operation related to the message data, when the processor determines that the message is not used any more, a release instruction is sent, and the release instruction has information of a storage space for storing the message, for example, the processor generates a release instruction comprising a second identifier, and the message storage device releases a storage piece pointed by the second identifier, namely, releases the target storage space according to the release instruction after receiving the release instruction.
In another possible manner, the method 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 finishes the related operation by using the message data, when the processor determines that the message still needs to be reused, the processor determines the multiplexing times of the message, and the multiplexing times are set as preset times. And after the storage space outputs the target message each time, the message storage device can acquire the use times of the target message, and when the use times are determined to be greater than or equal to the preset times, response operation is carried out to release the storage space corresponding to the target message.
In this possible manner, before releasing the storage space corresponding to the target message, the method further includes: determining whether a reservation use request for a target message is received; if the reservation use request aiming at the target message is not received, releasing the storage space corresponding to the target message; if the reservation request is received, the target message is stored continuously.
After the processor finishes the related operation by using the message data, when the processor determines that the message still needs to be reused, but cannot determine the specific times of multiplexing the message, a reservation use request for the target message is sent at the moment, the message storage device determines whether the reservation use request of the target message is received before releasing the storage space corresponding to the target message, and if not, the storage space corresponding to the target message is released; if so, continuing to store the target message.
The method includes that when a processor determines that a message still needs to be reused, but cannot determine the specific times of message multiplexing, the processor also sends a multiplexing instruction for a target memory slice to enable the target memory slice to continuously store the message, and correspondingly, when the target memory slice outputs the message again, a reserved release instruction is generated, after the processor finishes operation by using the message, the message storage device counts the times of receiving the multiplexing instruction and the times of receiving the reserved release instruction, if the times of receiving the multiplexing instruction is larger than the times of receiving the reserved release instruction, the message still needs to be used, and the target memory slice continuously stores 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 the target memory slice is released.
According to the embodiment of the disclosure, 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 use times of the message is larger than the preset times and releasing the mode of receiving the reservation use request before releasing the storage space, so that the storage space can be released in time, the storage space which is required to be stored continuously is not released in error, and the flexibility of releasing the storage space is improved.
On the basis of the above embodiment, after allocating storage spaces for messages in sequence, 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, the method further includes: detecting whether the residual space is larger than a preset space; if the data is larger than the preset space, sequentially increasing the storage space for the message, and sequentially storing the data of the message into the allocated storage space from the head of the message until the end mark of the message is detected in the storage space; otherwise, refusing to store the message.
Before the message is stored, whether the remaining storage space is enough to store the received message is also needed to be judged. Specifically, before the message is written into the memory, the length of the message cannot be determined, but the 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 set to the size of a 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.
According to the embodiment of the disclosure, whether the received data message is stored or not is determined by judging whether the residual space is larger than the preset space, so that the defect of missing of stored message data caused by insufficient residual storage can be avoided.
On the basis of the above embodiment, the method further includes, sequentially adding storage spaces allocated to the messages, and sequentially storing data of the messages into the allocated storage spaces from the header of the messages until the end mark of the messages is detected in the storage spaces: determining whether other storage tasks are currently being performed; if not, sequentially increasing the storage space for the message, and sequentially storing the data of the message into the allocated storage space from the head of the message until the end mark of the message is detected in the storage space; if yes, after the current task is finished, sequentially increasing storage space for the message, and sequentially storing the data of the message into the allocated storage space from the head of the message until the end mark of the message is detected in the storage space.
When the message is stored, if other storage tasks are currently executed, the execution of the current task is waited to be completed, and then the message is stored, so that the message is stored according to the sequence of receiving the message, and the data loss caused by the storage confusion is avoided.
According to the embodiment of the disclosure, the message storage is performed after the execution of the current storage task is determined, so that the message is stored sequentially, and the data loss caused by the storage confusion is avoided.
Fig. 5 is a schematic structural diagram of a message storage device provided in the present disclosure, where a message storage device 500 includes: a receiving module 501, configured to receive a packet; the storage module 502 is configured to allocate a storage space for the message in a sequentially increased manner, and sequentially store data of the message from a header of the message into the allocated storage space until an end mark of the message is detected in the storage space; the size of the storage space is smaller than the storage space required by the message. The size of the storage space is smaller than the storage space required by the message.
Optionally, the message storage device 500 further includes a management module 503, configured to establish a correspondence between the message and the storage space.
Optionally, the message storage device 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 use of the target packet; 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.
Optionally, the releasing module 504 further includes a second releasing unit 5042, configured to determine, before releasing the storage space corresponding to the target packet, whether a reservation use request for the target packet is received; if no reservation request for the target message is received, the second releasing unit 5042 is configured to release the storage space corresponding to the target message; if a reservation 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, when sequentially increasing storage spaces allocated for the messages, sequentially storing data of the messages into the allocated storage spaces from a header of the messages, and detecting whether the remaining space is greater than a preset space until an end mark of the messages is detected in the storage spaces; if the data is larger than the preset space, the storage module 502 allocates the storage space for the message in sequence, and sequentially stores the data of the message into the allocated storage space from the head of the message until the end mark of the message is detected in the storage space; otherwise, the storage module 502 is further configured to refuse to allocate 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 sequentially increasing storage space is allocated for the message, and data of the message is sequentially stored in the allocated storage space from a header of the message until an end mark of the message is detected in the storage space; if not, the storage module 502 allocates storage space for the message in sequence, and sequentially stores the data of the message into the allocated storage space from the head of the message until the end mark of the message is detected in the storage space; if so, the storage module 502 allocates storage space for the message after the second detection unit 5022 detects that the current task is completed, and sequentially stores the data of the message into the allocated storage space from the head of the message until the end mark of the message is detected in the storage space.
The message storage device of the embodiment shown in fig. 5 may be used to implement the technical solution of the above method embodiment, and its implementation principle and technical effects are similar, and are not described herein again.
Fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the disclosure. The electronic device provided in the embodiment of the present disclosure may execute the processing flow provided in the embodiment of the method for storing a message, as shown in fig. 6, the electronic device 60 includes: a memory 61, a processor 62, computer programs and a communication interface 63; wherein the computer program is stored in the memory 61 and configured to be executed by the processor 62 for the message storing method as described above.
In addition, the embodiment of the present disclosure further 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 method for storing a packet according to the foregoing embodiment.
It should be noted that in this document, relational terms such as "first" and "second" and the like are 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. Moreover, 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 one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing is merely a specific embodiment of the disclosure to enable one skilled in the art to understand or practice the 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 and described herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (9)

1. A method for storing messages, comprising:
receiving a message;
dividing the memory into a plurality of memory spaces for allocation, taking the memory spaces as a basic unit for allocation, sequentially increasing the memory spaces for the messages, sequentially storing the data of the messages into the allocated memory spaces from the head of the messages until the end mark of the messages is detected in the memory spaces, and comprising the following steps:
a storage space is allocated for the message, the message is stored in the storage space from the head data of the message, after the storage space is completely used, whether the storage space has the end mark of the message or not is detected, if not, the storage space is continuously allocated for the message, and the operation of storing and detecting is repeated until the end mark of the message is detected in the storage space;
the size of the storage space is smaller than or equal to the space required to occupy by a preset minimum message;
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 preset times.
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 1, wherein before the 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 reservation use request aiming at the target message is not received, releasing the storage space corresponding to the target message;
and if the reservation use request is received, continuing to store the target message.
5. The method of claim 1, wherein sequentially increasing allocates memory space for the message and sequentially stores data of the message into the allocated memory space from a header of the message until an end marker for the message is detected in the memory space, the method further comprising:
detecting whether the residual space is larger than a preset space;
if the data of the message is larger than the preset space, sequentially increasing the storage space for the message, and sequentially storing the data of the message into the allocated storage space from the head of the message until the end mark of the message is detected in the storage space;
otherwise, refusing to allocate the storage space.
6. The method of claim 1, wherein the sequentially increasing allocates memory space for the message and sequentially stores data of the message into the allocated memory space from a header of the message until an end marker of the message is detected in the memory space, the method further comprising:
determining whether other storage tasks are currently being performed;
if not, sequentially increasing storage space for the message, and sequentially storing the data of the message into the allocated storage space from the head of the message until the end mark of the message is detected in the storage space;
if yes, after the current task is finished, sequentially increasing storage space for the message, and sequentially storing the data of the message into the allocated storage space from the head of the message until the end mark of the message is detected in the storage space.
7. A message storage device, comprising:
the receiving module is used for receiving the message;
the storage module is used for sequentially increasing the storage space allocated for the message, sequentially storing the data of the message into the allocated storage space from the head of the message until the end mark of the message is detected in the storage space, and is specifically used for: a storage space is allocated for the message, the message is stored in the storage space from the head data of the message, after the storage space is completely used, whether the storage space has the end mark of the message or not is detected, if not, the storage space is continuously allocated for the message, and the operation of storing and detecting is repeated until the end mark of the message is detected in the storage space; the storage space is used for being distributed, the storage space is used as a basic unit for distribution, and the size of the storage space is smaller than that of the storage space required by the message;
the release module is used for acquiring the use times of the 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.
8. 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-6.
9. A computer readable storage medium, on which a computer program is stored, which computer program, when being executed by a processor, implements the method according to any of claims 1-6.
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 CN115190089A (en) 2022-10-14
CN115190089B true 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 (16)

* 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
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

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8611378B2 (en) * 2007-05-29 2013-12-17 Red Hat, Inc. Message handling multiplexer

Patent Citations (16)

* 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
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
Optimal File Allocation in a Multiple Computer System;W.W. Chu等;《IEEE Transactions on Computers》;全文 *
嵌入式TCP/IP协议的内存管理技术;王瑞朋;黄琼;唐伦;李伟;陈前斌;隆克平;;微计算机信息;20060320(08);全文 *
改进的帧间差分CAN报文存储方案研究;刘伟伟等;《万方数据库》;全文 *

Also Published As

Publication number Publication date
CN115190089A (en) 2022-10-14

Similar Documents

Publication Publication Date Title
US6757802B2 (en) Method for memory heap and buddy system management for service aware networks
CN109542857B (en) Audit log storage method, audit log query method, audit log storage device, audit log query device and related equipment
CN108845877B (en) Method, device and system for managing memory
CN109308269B (en) Memory management method and device
CN103139255A (en) Method for allocating resource identification and identification section
US20180188990A1 (en) Method, apparatus and system for inserting disk
CN105763595A (en) Method of improving data processing efficiency and server
CN112214313A (en) Memory allocation method and related equipment
CN115599544A (en) Memory management method and device, computer equipment and storage medium
US7761683B2 (en) Variable width memory system and method
CN110825533B (en) Data transmitting method and device
CN115190089B (en) Message storage method, device, equipment and storage medium
CN106571935B (en) Resource scheduling method and equipment
CN104951370B (en) A kind of EMS memory management process and device
CN110489356B (en) Information processing method, information processing device, electronic equipment and storage medium
CN111198855B (en) Log data processing method and device
CN112732528A (en) Index acquisition method, system, equipment and storage medium based on IT operation and maintenance monitoring
CN112883239B (en) Resource allocation method and device, computer equipment and storage medium
CN107391388B (en) Method and equipment for storing data based on instant messaging
CN107493181B (en) Indication method and device of virtual expansion port
CN113157611A (en) Data transmission control method, device, equipment and readable storage medium
CN112600765A (en) Method and device for scheduling configuration resources
CN109284234A (en) A kind of memory address allocation method and system
CN106507224B (en) Method and related device for acquiring target file
CN112685333B (en) Heap memory management method and device

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