Data packing method and device, electronic equipment and storage medium

By matching with the preset packet configuration and finding the target storage address, efficient packet data is achieved in complex systems, solving the problem of wasted hardware resources and storage space, and improving bandwidth utilization.

CN119520640APending Publication Date: 2025-02-25BEIJING CO WHEELS TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311064432.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-22
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

In complex systems, simply grouping at least two application data of the same data type will lead to waste of hardware resources and storage space.

Method used

By matching with the preset group packet configuration, it is determined whether the target application data of all data types required for the group packet is received, and the storage address of the target application data is found from the preset lookup table, so that the packet can be grouped based on the target application data and the corresponding target group packet number.

Benefits of technology

This method reduces the waste of hardware resources and storage space, improves bandwidth utilization, and saves a lot of hardware resources and storage space when solving the specific configuration needs of complex systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119520640A_ABST
    Figure CN119520640A_ABST
Patent Text Reader

Abstract

The invention provides a data packaging method and device, electronic equipment and a storage medium, and relates to the technical field of data processing, and the main technical scheme comprises the following steps: through matching with preset packaging configuration, determining whether target application data of all data types required by packaging is received, the preset packing configuration comprises a data type of application data required by each data packet; searching a target storage address corresponding to the target application data from a preset lookup table under the condition of determining that the target application data of all the data types required by packaging is received; after the corresponding target application data is obtained from the target storage address, packaging is carried out based on the target application data and the corresponding target packaging number, compared with the related technology, according to the embodiment of the invention, package sending originally triggered by the application data is changed into package sending according to the configuration of the UDP package, and when the specific configuration requirement of a complex system is met, the user experience is improved. And a large amount of hardware resources and storage space are saved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of data processing technology, and in particular to a data packaging method and device, an electronic device, and a storage medium. Background Art

[0002] User Datagram Protocol (UDP) communication is a commonly used communication method. The general UDP packet sending method is: receive an application data, and package the application data into UDP format for sending. The above packet forming method has some disadvantages: since the UDP format needs to add a packet header of a certain length, the UDP packet forming method is executed once an application data is received, resulting in low bandwidth utilization. Therefore, in order to improve bandwidth utilization, the improvement method is to execute UDP packet forming once when at least two application data of the same data type are received.

[0003] In actual applications, a complex system may have many specific configuration requirements. For example, a UDP packet contains a combination of application data of multiple data types. In related technologies, the method of simply grouping at least two application data of the same data type is triggered by the application data to send the packet. When solving complex configuration requirements, not only the support of more hardware devices is required, but also the application data needs to be copied multiple times at the same time, which will result in a large waste of hardware resources and storage space. Summary of the invention

[0004] The present disclosure provides a data packaging method and device, an electronic device and a storage medium. The main purpose is to solve the problem that a large amount of hardware resources and storage space will be wasted when simply packaging at least two application data of the same data type to solve complex configuration requirements.

[0005] According to a first aspect of the present disclosure, a text generation method is provided, comprising:

[0006] Determining whether target application data of all data types required for package assembly are received by matching with a preset package assembly configuration, wherein the preset package assembly configuration includes the data type of the application data required for each data packet;

[0007] In the case of determining that target application data of all data types required for package assembly are received, searching a preset lookup table for a target storage address corresponding to the target application data, wherein the preset lookup table records a correspondence between the data type of the application data, the storage address corresponding to the data type, and the package assembly number;

[0008] After the corresponding target application data is acquired from the target storage address, packaging is performed based on the target application data and the corresponding target packaging number.

[0009] Optionally, after packaging based on the target application data and the corresponding target packaging number, the method further includes:

[0010] Acquire configuration information of the assembled data packet, wherein the configuration information includes a destination address of the data packet;

[0011] Send the data packet to the destination address.

[0012] Optionally, sending the data packet to the destination address includes:

[0013] When the data packet does not carry target application data of all data types required for packet assembly and a preset sending cycle is reached, sending the data packet to the destination address;

[0014] Alternatively, in the case where the data packet is loaded with target application data of all data types required for packet assembly, the data packet is sent to the destination address.

[0015] Optionally, before determining whether target application data of all data types required for package assembly are received by matching with a preset package assembly configuration, the method further includes:

[0016] After receiving target application data of a data type, the target storage address corresponding to the data type is searched from the preset lookup table, and the target application data is written into the target storage address.

[0017] Optionally, before determining whether target application data of all data types required for package assembly are received by matching with a preset package assembly configuration, the method further includes:

[0018] According to the preset packet grouping configuration, the received data type among all the data types required for packet grouping is marked.

[0019] According to a second aspect of the present disclosure, a data packaging system is provided, comprising: a packaging configuration memory, an application data arrival memory and a packaging module.

[0020] The package assembly configuration memory and the application data arrival memory are used to determine whether target application data of all data types required for package assembly are received by matching with the preset package assembly configuration, and when it is determined that target application data of all data types required for package assembly are received, search the target storage address corresponding to the target application data from the preset lookup table, and send the target storage address corresponding to the target application data to the package assembly module, wherein the preset package assembly configuration includes the data type of application data required for each data packet, and the preset lookup table records the correspondence between the data type of application data, the storage address corresponding to the data type and the package assembly number;

[0021] The package assembly module is used to obtain the corresponding target application data from the target storage address, and then perform package assembly based on the target application data and the corresponding target package assembly number.

[0022] Optionally, the packet assembly module is further used to obtain configuration information of the assembled data packet, the configuration information including a destination address of the data packet, and send the data packet to the destination address.

[0023] Optionally, the system further includes: a packet sending time memory and a timer,

[0024] The packet sending time memory and the timer are used to cooperate with the packet assembling module to send the data packet to the destination address when the data packet does not carry target application data of all data types required for packet assembling and a preset sending cycle is reached.

[0025] Optionally, the system further comprises: an application data storage lookup table and an application data storage device,

[0026] The application data storage lookup table is used to, after receiving target application data of a data type, look up the target storage address corresponding to the data type from the preset lookup table, write the target application data to the target storage address, and store it in the application data storage;

[0027] The application data storage device is used to store the target application data.

[0028] According to a third aspect of the present disclosure, a data packaging device is provided, comprising:

[0029] a determining unit, configured to determine whether target application data of all data types required for packet assembly are received by matching with a preset packet assembly configuration, wherein the preset packet assembly configuration includes the data type of the application data required for each data packet;

[0030] a search unit, configured to search for a target storage address corresponding to the target application data according to a preset search table when it is determined that target application data of all data types required for package assembly are received, wherein the preset search table records the correspondence between the data type of the application data, the storage address corresponding to the data type, and the package assembly number;

[0031] The packaging unit is used to obtain the corresponding target application data from the target storage address, and then perform packaging based on the target application data and the corresponding target packaging number.

[0032] Optionally, the device further comprises:

[0033] an acquiring unit, configured to acquire configuration information of the assembled data packet after the assembled data packet is assembled based on the target application data and the corresponding target assembly number, wherein the configuration information includes a destination address of the data packet;

[0034] A sending unit is used to send the data packet to the destination address.

[0035] Optionally, the sending unit includes:

[0036] A first sending module, configured to send the data packet to the destination address if the data packet does not contain target application data of all data types required for packet assembly and a preset sending cycle is reached;

[0037] The second sending module is used to send the data packet to the destination address when the data packet is loaded with target application data of all data types required for packet assembly.

[0038] Optionally, the device further comprises:

[0039] A processing unit is used to, before determining whether target application data of all data types required for package assembly are received by matching with a preset package assembly configuration, search for a target storage address corresponding to the data type according to the preset lookup table after receiving target application data of a data type, and write the target application data to the target storage address.

[0040] Optionally, the device further comprises:

[0041] The marking unit is used to mark the received data types among all the data types required for package assembly according to the preset package assembly configuration before determining whether the target application data of all the data types required for package assembly are received by matching with the preset package assembly configuration.

[0042] According to a fourth aspect of the present disclosure, there is provided an electronic device, including:

[0043] at least one processor; and

[0044] a memory communicatively connected to the at least one processor; wherein,

[0045] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method described in the first aspect.

[0046] According to a fifth aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the method described in the first aspect.

[0047] According to a sixth aspect of the present disclosure, a computer program product is provided, comprising a computer program, wherein when the computer program is executed by a processor, the method described in the first aspect is implemented.

[0048] The data packetization method and device, electronic device and storage medium provided by the present disclosure determine whether target application data of all data types required for packetization are received by matching with a preset packetization configuration, wherein the preset packetization configuration includes the data type of the application data required for each data packet; when it is determined that target application data of all data types required for packetization are received, a target storage address corresponding to the target application data is searched from a preset lookup table, wherein the preset lookup table records the correspondence between the data type of the application data, the storage address corresponding to the data type and the packetization number; after obtaining the corresponding target application data from the target storage address, packetization is performed based on the target application data and the corresponding target packetization number. Compared with the related art, the embodiment of the present application changes the packet sending originally triggered by the application data to packet sending according to the configuration of the UDP packet itself, saving a large amount of hardware resources and storage space when solving the specific configuration requirements of complex systems.

[0049] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present application, nor is it intended to limit the scope of the present application. Other features of the present application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.

[0051] Figure 1 A schematic diagram of a flow chart of a data packaging method provided by an embodiment of the present disclosure;

[0052] Figure 2 A schematic diagram of the composition of a data packet provided by an embodiment of the present disclosure;

[0053] Figure 3 A schematic diagram of the structure of a data packaging system provided by an embodiment of the present disclosure;

[0054] Figure 4 A schematic diagram of the structure of a data packaging device provided by an embodiment of the present disclosure;

[0055] Figure 5 A schematic diagram of the structure of another data packaging device provided by an embodiment of the present disclosure;

[0056] Figure 6 A schematic block diagram of an electronic device provided in accordance with an embodiment of the present disclosure. DETAILED DESCRIPTION

[0057] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, descriptions of well-known functions and structures are omitted in the following description.

[0058] The following describes a data packaging method, device, electronic device, and storage medium according to embodiments of the present disclosure with reference to the accompanying drawings.

[0059] Figure 1 A flowchart of a data packaging method provided in an embodiment of the present disclosure.

[0060] like Figure 1 As shown, the method comprises the following steps:

[0061] Step 101 : determining whether target application data of all data types required for package assembly are received by matching with a preset package assembly configuration, wherein the preset package assembly configuration includes the data type of application data required for each data packet.

[0062] The embodiments of the present disclosure may be applied to various communication modes. Specifically, the embodiments of the present disclosure are not limited thereto. For ease of description, the subsequent embodiments are described by applying to UDP communication.

[0063] In an embodiment of the present disclosure, the preset package assembly configuration is a package assembly configuration customized by a technician, and the data type of the application data includes but is not limited to text, pictures, videos, etc. Matching with the preset package assembly configuration refers to: matching the data type of the received target application data with the data type of the application data required for each data packet contained in the preset package assembly configuration; if the data type of the target application data is more than or equal to the data type of the required application data, then determining that the target application data of all data types required for package assembly is received; if the data type of the target application data is less than the data type of the required application data, then determining that the target application data of all data types required for package assembly is received.

[0064] Step 102, when it is determined that target application data of all data types required for package assembly have been received, a target storage address corresponding to the target application data is searched from a preset lookup table, wherein the preset lookup table records the data type of the application data, the corresponding relationship between the storage address corresponding to the data type and the package assembly number.

[0065] In the disclosed embodiment, the preset lookup table refers to: a lookup table whose content is a custom setting by a technician. The lookup table (Look-Up-Table) is referred to as LUT, which is essentially a RAM (Random Access Memory). Each LUT can be regarded as a 16x1 RAM with 4 address lines. When the lookup table receives the target application data, it will automatically query the target storage address corresponding to each type of target application data, and write the target data into the RAM according to the target storage address.

[0066] The content of the lookup table includes but is not limited to: the target storage address corresponding to each type of target application data, the number of the UDP packet corresponding to each type of target application data, etc. Specifically, the embodiment of the present disclosure does not limit this.

[0067] Step 103 : after acquiring the corresponding target application data from the target storage address, packaging is performed based on the target application data and the corresponding target packaging number.

[0068] In the disclosed embodiment, the target package number means that all data packets have corresponding target package numbers, so that through the target package number, it is possible to confirm which data packet receives the target application data of all data types required for package assembly, and obtain the corresponding target application data for package assembly, wherein the target package number is custom-written by a technician and has no special meaning. It is only used to distinguish each data packet, and the target package number can be reused. For example, after data packet No. 1 is sent, other data packets can be numbered 1, as long as the target package numbers of the unsent data packets are not repeated.

[0069] In order to facilitate the understanding of the embodiments of the present disclosure, the embodiments of the present disclosure provide a schematic diagram of the composition of a data packet, such as Figure 2 As shown, the data packet is a UDP packet, wherein the Ethernet header, IP header, and UDP header together constitute the header of the UDP packet, and FCS is the frame check sequence of the UDP packet. For the header and frame check sequence of the UDP packet, please refer to the detailed description in the relevant technology, so it will not be repeated here. Regarding the application data combination part, that is, the part configured by the preset packet grouping configuration, the number and data type of the application data in the application data combination part need to be determined by the preset packet grouping configuration, that is, in the application data combination part, the number and data type of the application data need to be customized by the technician, for example: set the preset packet grouping configuration to: Data packet No. 1 requires two application data, and the data type is text and picture. When two target application data are received and the data types of the two target application data are text and picture respectively, it can be determined that data packet No. 1 has received target application data of all data types required for packet grouping.

[0070] The data packetization method provided by the present invention determines whether target application data of all data types required for packetization are received by matching with a preset packetization configuration, wherein the preset packetization configuration includes the data type of the application data required for each data packet; when it is determined that target application data of all data types required for packetization are received, the target storage address corresponding to the target application data is searched from a preset lookup table, wherein the preset lookup table records the correspondence between the data type of the application data, the storage address corresponding to the data type, and the packetization number; after obtaining the corresponding target application data from the target storage address, packetization is performed based on the target application data and the corresponding target packetization number. Compared with the related art, the embodiment of the present application changes the packet sending originally triggered by the application data to the packet sending according to the configuration of the UDP packet itself, which saves a lot of hardware resources and storage space when solving the specific configuration requirements of complex systems.

[0071] In one possible implementation of the disclosed embodiment, after the target application data is packaged, the packaged data packet needs to be sent to complete the communication. Therefore, after the package is packaged based on the target application data and the corresponding target package number, the following method can also be used but is not limited to: obtain the configuration information of the packaged data packet, the configuration information includes the destination address of the data packet; send the data packet to the destination address. Among them, the configuration information of the packaged data packet includes but is not limited to: destination MAC address, source MAC address, destination IP address, source IP address, destination port number, etc. According to this information, the packaged data packet can be sent to the destination address in a timely manner.

[0072] In an implementable manner of the embodiment of the present disclosure, the sending mode of the data packet can be divided into two types: one is periodic / timed sending, that is, regardless of whether the target application data of all data types required for the package assembly is received, the package is sent after a certain time period. The other is immediate sending, that is, after determining that the target application data of all data types required for the package assembly is received, it is sent immediately. Therefore, sending the data packet to the destination address can be implemented in the following manner but not limited to: when the data packet does not load the target application data of all data types required for the package assembly and reaches the preset sending period, the data packet is sent to the destination address; or, when the data packet is loaded with the target application data of all data types required for the package assembly, the data packet is sent to the destination address. Among them, the sending mode is customized by the technician according to the communication situation, for example: when the communication with the target address needs to be sent periodically, the data packet sent to this target address can be set to be sent periodically in the preset package assembly configuration. Regarding the setting of periodic sending, for example: sending once every 1 minute, sending once every 2 minutes, etc., specifically, it is customized according to the actual situation, and the embodiment of the present disclosure does not limit it.

[0073] In one implementable manner of the disclosed embodiment, in order to save storage space and to obtain the target application data in a timely manner, after receiving the target application data, the target application data needs to be saved first, and when the target application data needs to be packaged, the corresponding target application data is obtained according to the target storage address for package assembly. Before matching with the preset package assembly configuration to determine whether all data types of target application data required for package assembly have been received, the following method may also be used but is not limited to: after receiving target application data of a data type, the target storage address corresponding to the data type is searched from the preset lookup table, and the target application data is written to the target storage address.

[0074] In one implementable manner of the embodiments of the present disclosure, when determining whether target application data of all data types required for package assembly have been received, the received data types need to be marked to determine which data types have been received and which data types have not been received. Therefore, before determining whether target application data of all data types required for package assembly have been received by matching with a preset package assembly configuration, the following method may also be used but is not limited to: marking the received data types among all data types required for package assembly according to the preset package assembly configuration.

[0075] Corresponding to the above data packaging method, Figure 3 A schematic diagram of the structure of a data packaging system provided by an embodiment of the present disclosure is shown in FIG. Figure 3 As shown, it includes: a package configuration memory, an application data arrival memory and a package module,

[0076] The package assembly configuration memory and the application data arrival memory are used to determine whether target application data of all data types required for package assembly are received by matching with the preset package assembly configuration, and when it is determined that target application data of all data types required for package assembly are received, search the target storage address corresponding to the target application data from the preset lookup table, and send the target storage address corresponding to the target application data to the package assembly module, wherein the preset package assembly configuration includes the data type of application data required for each data packet, and the preset lookup table records the correspondence between the data type of application data, the storage address corresponding to the data type and the package assembly number;

[0077] The package assembly module is used to obtain the corresponding target application data from the target storage address, and then perform package assembly based on the target application data and the corresponding target package assembly number.

[0078] In an implementable manner of the embodiment of the present disclosure, the packet assembly module is further used to obtain configuration information of the assembled data packet, the configuration information including a destination address of the data packet, and send the data packet to the destination address.

[0079] In one possible implementation of the embodiment of the present disclosure, the system further includes: a packet sending time memory and a timer,

[0080] The packet sending time memory and the timer are used to cooperate with the packet assembling module to send the data packet to the destination address when the data packet does not carry target application data of all data types required for packet assembling and a preset sending cycle is reached.

[0081] In one possible implementation of the embodiment of the present disclosure, the system further includes: an application data storage lookup table and an application data memory,

[0082] The application data storage lookup table is used to, after receiving target application data of a data type, look up the target storage address corresponding to the data type from the preset lookup table, write the target application data to the target storage address, and store it in the application data storage;

[0083] The application data storage device is used to store the target application data.

[0084] in, Figure 3 The application data storage LUT shown in is the application data storage lookup table; the application data storage RAM is the application data memory; the package assembly configuration RAM is the package assembly configuration memory; the application data arrival RAM is the application data arrival memory; the package assembly is the package assembly module, and the package sending time RAM is the package sending time memory; the application data is the target application data; the data flow is the process path of the target application data, including: ①②⑥⑦, and the control flow is the control information is the process path, including: ③④⑤. Central scheduling is the central scheduling module, which includes a package assembly configuration memory, an application data arrival memory, a package sending time memory and a timer. The application data storage LUT, the package assembly configuration RAM and the package assembly module all store preset lookup tables to provide the configuration information required for package assembly.

[0085] It should be noted here that in the data packetization system, the application data storage LUT stores the location where each type of target application data should be stored in the application data storage RAM, that is, the RAM address (target storage address). According to the type of the target application data, the corresponding RAM address is found and written into the application data storage RAM. At the same time, the application data storage LUT also stores the number of the UDP packet corresponding to each type of target application data, and the corresponding relationship includes but is not limited to: the corresponding relationship between 1 application data and N types of UDP packet numbers.

[0086] When the target application data is received, control information is sent to the central scheduling module, for example: the target application data in the corresponding UDP packet has arrived. The packet configuration RAM stores the type information of the target application data corresponding to each UDP packet, and the corresponding relationship includes but is not limited to: the corresponding relationship between 1 UDP packet number and N types of application data. The target application data is continuously received, and the packet configuration RAM and application data arrival RAM in the central scheduling module can determine whether each type of target application data corresponding to each UDP packet has arrived, and whether it has arrived completely.

[0087] There are two modes for sending UDP packets: mode 1: periodic / timed sending, mode 2: immediate sending. All UDP packets are monitored according to their configuration information. If any of the above sending conditions are met, the corresponding configuration information of the UDP packet will be sent to the packet assembly module, including but not limited to: the number of the UDP packet to be sent, which application data has arrived, and the corresponding RAM address information.

[0088] The packet assembly module reads the corresponding target application data from the RAM address specified by the application data storage RAM according to the information sent by the central scheduling module. After reading the target application data, the target application data is placed in the corresponding position in the UDP packet for packet assembly. The packet assembly module stores the configuration information of each UDP packet, including but not limited to: destination MAC address, source MAC address, destination IP address, source IP address, destination port number, etc. Based on this information and the read target application data, the checksum is calculated, the UDP packet is assembled according to the UDP packet format, and then sent.

[0089] In summary, the embodiments of the present disclosure can achieve the following effects:

[0090] 1. By monitoring the preset packet assembly configuration and scheduling the target application data, only one packet assembly module is needed to assemble and send the data packets, avoiding the situation in the traditional practice where several packet assembly modules need to wait and send them one by one at the same time, thus saving a lot of hardware resources.

[0091] 2. By first saving the target application data, and then obtaining the corresponding target application data according to the target storage address for packaging when the target application data needs to be packaged, it avoids the traditional practice of directly copying multiple copies of the application data, saving them in the storage space, and then sending them one by one, thereby saving a lot of storage space.

[0092] 3. The original packet sending triggered by application data is changed to packet sending according to the configuration of the UDP packet itself, which saves a lot of hardware resources and storage space when solving the specific configuration requirements of complex systems.

[0093] Corresponding to the above-mentioned data packaging method, the present invention also provides a data packaging device. Since the device embodiment of the present invention corresponds to the above-mentioned method embodiment, the details not disclosed in the device embodiment can be referred to the above-mentioned method embodiment, and will not be repeated in the present invention.

[0094] Figure 4 A schematic diagram of the structure of a data packaging device provided by an embodiment of the present disclosure, such as Figure 4 As shown, including:

[0095] A determination unit 41 is used to determine whether target application data of all data types required for packet grouping are received by matching with a preset packet grouping configuration, wherein the preset packet grouping configuration includes the data type of the application data required for each data packet;

[0096] A search unit 42 is used to search a target storage address corresponding to the target application data from a preset search table when it is determined that target application data of all data types required for package assembly are received, wherein the preset search table records the correspondence between the data type of the application data, the storage address corresponding to the data type and the package assembly number;

[0097] The packaging unit 43 is used to obtain the corresponding target application data from the target storage address, and then perform packaging based on the target application data and the corresponding target packaging number.

[0098] The data packetization device provided by the present invention determines whether target application data of all data types required for packetization are received by matching with a preset packetization configuration, wherein the preset packetization configuration includes the data type of the application data required for each data packet; when it is determined that target application data of all data types required for packetization are received, the target storage address corresponding to the target application data is searched from a preset lookup table, wherein the preset lookup table records the correspondence between the data type of the application data, the storage address corresponding to the data type, and the packetization number; after obtaining the corresponding target application data from the target storage address, packetization is performed based on the target application data and the corresponding target packetization number. Compared with the related art, the embodiment of the present application changes the packet sending originally triggered by the application data to the packet sending according to the configuration of the UDP packet itself, which saves a lot of hardware resources and storage space when solving the specific configuration requirements of complex systems.

[0099] Furthermore, in a possible implementation of this embodiment, as Figure 5 As shown, the device also includes:

[0100] An acquiring unit 44 is configured to acquire configuration information of the assembled data packet after the assembled data packet is assembled based on the target application data and the corresponding target assembly number, wherein the configuration information includes a destination address of the data packet;

[0101] The sending unit 45 is used to send the data packet to the destination address.

[0102] Furthermore, in a possible implementation of this embodiment, as Figure 5 As shown, the sending unit 35 includes:

[0103] A first sending module 451 is used to send the data packet to the destination address when the data packet does not contain target application data of all data types required for packet assembly and a preset sending period has been reached;

[0104] The second sending module 452 is used to send the data packet to the destination address when the data packet is loaded with target application data of all data types required for packet assembly.

[0105] Furthermore, in a possible implementation of this embodiment, as Figure 5 As shown, the device also includes:

[0106] The processing unit 46 is used to search the target storage address corresponding to the data type from the preset lookup table after receiving the target application data of a data type before determining whether the target application data of all data types required for package assembly are received by matching with the preset package assembly configuration, and write the target application data to the target storage address.

[0107] Furthermore, in a possible implementation of this embodiment, as Figure 5 As shown, the device also includes:

[0108] The marking unit 47 is used to mark the received data types among all the data types required for package assembly according to the preset package assembly configuration before determining whether the target application data of all the data types required for package assembly are received by matching with the preset package assembly configuration.

[0109] It should be noted that the above explanation of the method embodiment is also applicable to the device of this embodiment, and the principle is the same, which is not limited in this embodiment.

[0110] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.

[0111] Figure 6 A schematic block diagram of an example electronic device 600 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0112] like Figure 6As shown, the device 600 includes a computing unit 601, which can perform various appropriate actions and processes according to a computer program stored in a ROM (Read-Only Memory) 602 or a computer program loaded from a storage unit 608 to a RAM (Random Access Memory) 603. In the RAM 603, various programs and data required for the operation of the device 600 can also be stored. The computing unit 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An I / O (Input / Output) interface 605 is also connected to the bus 604.

[0113] A number of components in the device 600 are connected to the I / O interface 605, including: an input unit 606, such as a keyboard, a mouse, etc.; an output unit 607, such as various types of displays, speakers, etc.; a storage unit 608, such as a disk, an optical disk, etc.; and a communication unit 609, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 609 allows the device 600 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0114] The computing unit 601 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a CPU (Central Processing Unit), a GPU (Graphic Processing Units), various dedicated AI (Artificial Intelligence) computing chips, various computing units running machine learning model algorithms, DSP (Digital Signal Processor), and any appropriate processor, controller, microcontroller, etc. The computing unit 601 performs the various methods and processes described above, such as a data packaging method. For example, in some embodiments, the data packaging method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 608. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 600 via the ROM 602 and / or the communication unit 609. When the computer program is loaded into the RAM 603 and executed by the computing unit 601, one or more steps of the method described above may be performed. Alternatively, in other embodiments, the computing unit 601 may be configured to execute the aforementioned data packaging method in any other appropriate manner (for example, by means of firmware).

[0115] Various embodiments of the systems and techniques described above herein may be implemented in digital electronic circuit systems, integrated circuit systems, FPGAs (Field Programmable Gate Arrays), ASICs (Application-Specific Integrated Circuits), ASSPs (Application Specific Standard Products), SOCs (System On Chips), CPLDs (Complex Programmable Logic Devices), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include: being implemented in one or more computer programs that may be executed and / or interpreted on a programmable system including at least one programmable processor that may be a dedicated or general-purpose programmable processor that may receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0116] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0117] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. More specific examples of machine-readable storage media may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a RAM, a ROM, an EPROM (Electrically Programmable Read-Only-Memory) or a flash memory, an optical fiber, a CD-ROM (Compact Dis sc Read-Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0118] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (Cathode-Ray Tube) or LCD (Liquid Crystal Display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0119] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: LAN (Local Area Network), WAN (Wide Area Network), the Internet, and blockchain networks.

[0120] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship between the client and the server is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services ("Virtual Private Server", or "VPS" for short). The server may also be a server of a distributed system, or a server combined with a blockchain.

[0121] It should be noted that artificial intelligence is a discipline that studies how computers can simulate certain human thought processes and intelligent behaviors (such as learning, reasoning, thinking, planning, etc.), and includes both hardware-level and software-level technologies. Artificial intelligence hardware technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, and big data processing; artificial intelligence software technologies mainly include computer vision technology, speech recognition technology, natural language processing technology, as well as machine learning / deep learning, big data processing technology, knowledge graph technology, and other major directions.

[0122] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0123] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.

Claims

1. A data packaging method, characterized in that: include: Determining whether target application data of all data types required for package assembly are received by matching with a preset package assembly configuration, wherein the preset package assembly configuration includes the data type of the application data required for each data packet; In the case of determining that target application data of all data types required for package assembly are received, searching a preset lookup table for a target storage address corresponding to the target application data, wherein the preset lookup table records a correspondence between the data type of the application data, the storage address corresponding to the data type, and the package assembly number; After the corresponding target application data is acquired from the target storage address, packaging is performed based on the target application data and the corresponding target packaging number.

2. The method according to claim 1, characterized in that After packaging based on the target application data and the corresponding target packaging number, the method further includes: Acquire configuration information of the assembled data packet, wherein the configuration information includes a destination address of the data packet; Send the data packet to the destination address.

3. The method according to claim 2, characterized in that The sending the data packet to the destination address comprises: When the data packet does not carry target application data of all data types required for packet assembly and a preset sending cycle is reached, sending the data packet to the destination address; Alternatively, in the case where the data packet is loaded with target application data of all data types required for packet assembly, the data packet is sent to the destination address.

4. The method according to claim 1, characterized in that: Before determining whether target application data of all data types required for packaging are received by matching with a preset packaging configuration, the method further includes: After receiving target application data of a data type, the target storage address corresponding to the data type is searched from the preset lookup table, and the target application data is written into the target storage address.

5. The method according to claim 4, characterized in that Before determining whether target application data of all data types required for packaging are received by matching with a preset packaging configuration, the method further includes: According to the preset packet grouping configuration, the received data type among all the data types required for packet grouping is marked.

6. A data packaging system, characterized in that: include: Packaging configuration memory, application data arrival memory and packaging module, The package assembly configuration memory and the application data arrival memory are used to determine whether target application data of all data types required for package assembly are received by matching with the preset package assembly configuration, and when it is determined that target application data of all data types required for package assembly are received, search the target storage address corresponding to the target application data from the preset lookup table, and send the target storage address corresponding to the target application data to the package assembly module, wherein the preset package assembly configuration includes the data type of application data required for each data packet, and the preset lookup table records the correspondence between the data type of application data, the storage address corresponding to the data type and the package assembly number; The package assembly module is used to obtain the corresponding target application data from the target storage address, and then perform package assembly based on the target application data and the corresponding target package assembly number.

7. The system according to claim 6, characterized in that The packet assembly module is further used to obtain configuration information of the assembled data packet, wherein the configuration information includes a destination address of the data packet, and send the data packet to the destination address.

8. The system according to claim 6, characterized in that The system also includes: a packet sending time memory and a timer, The packet sending time memory and the timer are used to cooperate with the packet assembling module to send the data packet to the destination address when the data packet does not carry target application data of all data types required for packet assembling and a preset sending cycle is reached.

9. The system according to claim 6, characterized in that The system further comprises: an application data storage lookup table and an application data storage device, The application data storage lookup table is used to, after receiving target application data of a data type, look up the target storage address corresponding to the data type from the preset lookup table, write the target application data to the target storage address, and store it in the application data storage; The application data storage device is used to store the target application data.

10. A data packaging device, characterized in that: include: a determining unit, configured to determine whether target application data of all data types required for packet assembly are received by matching with a preset packet assembly configuration, wherein the preset packet assembly configuration includes the data type of the application data required for each data packet; a search unit, configured to search a target storage address corresponding to the target application data from a preset search table when it is determined that target application data of all data types required for package assembly are received, wherein the preset search table records the correspondence between the data type of the application data, the storage address corresponding to the data type, and the package assembly number; The packaging unit is used to obtain the corresponding target application data from the target storage address, and then perform packaging based on the target application data and the corresponding target packaging number.

11. An electronic device, characterized in that: include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 5.

12. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-5.

13. A computer program product, characterized in that The invention comprises a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 5.