CN112988609A - Data processing method, device, storage medium and client - Google Patents

Data processing method, device, storage medium and client Download PDF

Info

Publication number
CN112988609A
CN112988609A CN201911216275.8A CN201911216275A CN112988609A CN 112988609 A CN112988609 A CN 112988609A CN 201911216275 A CN201911216275 A CN 201911216275A CN 112988609 A CN112988609 A CN 112988609A
Authority
CN
China
Prior art keywords
data
memory block
capacity
target data
spliced
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201911216275.8A
Other languages
Chinese (zh)
Other versions
CN112988609B (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.)
Hangzhou Hikrobot Technology Co Ltd
Original Assignee
Hangzhou Hikrobot 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 Hangzhou Hikrobot Technology Co Ltd filed Critical Hangzhou Hikrobot Technology Co Ltd
Priority to CN201911216275.8A priority Critical patent/CN112988609B/en
Publication of CN112988609A publication Critical patent/CN112988609A/en
Application granted granted Critical
Publication of CN112988609B publication Critical patent/CN112988609B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/023Free address space management
    • G06F12/0238Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/60Memory management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformation in the plane of the image
    • G06T3/40Scaling the whole image or part thereof
    • G06T3/4038Scaling the whole image or part thereof for image mosaicing, i.e. plane images composed of plane sub-images
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The embodiment of the invention provides a data processing method, a data processing device, a storage medium and a client. The method comprises the following steps: judging whether the data volume of the target data is larger than the capacity of the allocated memory blocks or not; if the data volume of the target data is judged to be larger than the capacity of the memory block, selecting data with the capacity equal to the capacity of the memory block from the target data through the memory block to perform specified operation processing, and continuing to execute the step of judging whether the data volume of the target data is larger than the capacity of the allocated memory block or not for the remaining target data; and if the data volume of the target data is judged to be smaller than or equal to the capacity of the memory block, performing specified operation processing on the target data through the memory block. The embodiment of the invention improves the success rate of data processing.

Description

Data processing method, device, storage medium and client
[ technical field ] A method for producing a semiconductor device
The present invention relates to the field of computer technologies, and in particular, to a data processing method, an apparatus, a storage medium, and a client.
[ background of the invention ]
The instant positioning and Mapping (SLAM) technology is that a robot is placed in an unknown environment, the robot moves from an unknown position to build an incremental map of the environment, and meanwhile, the built map is used for autonomous positioning and navigation. SLAM technology enables a robot to achieve true autonomous navigation.
When map building is performed by the SLAM technology, the data volume of the map contour data obtained is generally large to ensure the map accuracy, so that the memory required in the map building process is also large. When the memory capacity of the client is insufficient and the data size of the map contour data is too large, the client cannot meet the memory with the capacity required in the map building process, so that the map building fails.
In summary, when the data size of the target data to be processed is large, for example, the data size of the map contour data is too large, and the memory capacity of the client is insufficient, the client cannot complete the processing of the target data through the memory, thereby causing a data processing failure.
[ summary of the invention ]
In view of this, embodiments of the present invention provide a data processing method, an apparatus, a storage medium, and a client, which are used to improve a success rate of data processing.
In one aspect, an embodiment of the present invention provides a data processing method, including:
judging whether the data volume of the target data is larger than the capacity of the allocated memory blocks or not;
if the data volume of the target data is judged to be larger than the capacity of the memory block, selecting data with the capacity equal to the capacity of the memory block from the target data through the memory block to perform specified operation processing, and continuing to execute the step of judging whether the data volume of the target data is larger than the capacity of the allocated memory block or not for the remaining target data;
and if the data volume of the target data is judged to be smaller than or equal to the capacity of the memory block, performing specified operation processing on the target data through the memory block.
Optionally, before the determining whether the data size of the target data is larger than the capacity of the allocated memory block, the method further includes:
allocating a memory block from an idle memory, wherein the capacity of the memory block is less than or equal to the capacity of the idle memory;
the method further comprises the following steps: if a memory capacity adjusting instruction is received, releasing the allocated memory blocks according to the memory capacity adjusting instruction, and allocating a new memory block from the current idle memory, wherein the capacity of the new memory block is different from the capacity of the memory block before the release;
the step of continuing to execute the determination of whether the data size of the target data is larger than the capacity of the allocated memory block for the remaining target data includes:
and continuing to execute the step of judging whether the data volume of the target data is larger than the capacity of the allocated memory block or not for the remaining target data and the new memory block.
Optionally, the target data comprises map contour data;
the selecting, by the memory block, data having a size equal to a capacity of the memory block from the target data to perform a predetermined operation process includes:
selecting data with the capacity equal to that of the memory block from the target data through the memory block, and converting the selected data into a picture to be spliced;
if it is determined that the data size of the target data is smaller than or equal to the capacity of the memory block, after performing the specified operation processing on the target data through the memory block, the method further includes:
and splicing the pictures to be spliced to generate a complete map.
Optionally, after the converting into the picture to be stitched, the method further includes:
acquiring splicing position information of the pictures to be spliced, wherein the splicing position information is used for representing the splicing position of the pictures to be spliced;
the splicing of the plurality of pictures to be spliced to generate the complete map comprises the following steps:
and splicing the pictures to be spliced into the complete map according to the splicing position information.
Optionally, the target data comprises map contour data;
the selecting, by the memory block, data having a size equal to a capacity of the memory block from the target data to perform a predetermined operation process includes:
selecting data with the capacity equal to that of the memory block from the target data through the memory block, and converting the selected data into a map to be spliced;
splicing the current picture to be spliced with the last spliced picture to generate the current spliced picture, and continuing to execute the step of judging whether the data volume of the target data is larger than the capacity of the allocated memory block or not aiming at the remaining target data;
if it is determined that the data size of the target data is smaller than or equal to the capacity of the memory block, after performing the specified operation processing on the target data through the memory block, the method further includes:
and splicing the current picture to be spliced and the picture spliced last time to generate a complete map.
Optionally, before the splicing the current picture to be spliced and the last spliced picture, the method further includes:
acquiring splicing position information of the pictures to be spliced, wherein the splicing position information is used for representing the splicing position of the pictures to be spliced;
the splicing of the current picture to be spliced and the picture spliced last time comprises the following steps:
and splicing the current picture to be spliced and the picture spliced last time according to the splicing position information.
Optionally, before the determining whether the data size of the target data is larger than the capacity of the allocated memory block, the method further includes:
acquiring raw sensor data;
calculating the original sensor data by using an SLAM algorithm to generate map contour data;
storing the map contour data as target data.
In another aspect, an embodiment of the present invention provides a data processing apparatus, including:
the judging module is used for judging whether the data volume of the target data is larger than the capacity of the allocated memory blocks;
an operation executing module, configured to perform specified operation processing on the target data through the memory block if the determining module determines that the data size of the target data is smaller than or equal to the capacity of the memory block; if the determining module determines that the data size of the target data is larger than the capacity of the memory block, selecting, by the memory block, data having a size equal to the capacity of the memory block from the target data to perform a specified operation process, and triggering the determining module to continue to execute, for the remaining target data, the step of determining whether the data size of the target data is larger than the capacity of the allocated memory block.
In another aspect, an embodiment of the present invention provides a storage medium, where the storage medium includes a stored program, and when the program runs, a device in which the storage medium is located is controlled to execute the data processing method according to any one of claims 1 to 7.
In another aspect, an embodiment of the present invention provides a client, including a memory and a processor, where the memory is used to store information including program instructions, and the processor is used to control execution of the program instructions, and the program instructions are loaded by the processor and executed to implement the steps of the data processing method.
On the other hand, the embodiment of the present invention provides a storage medium, where the storage medium includes a stored program, and when the program runs, a device in which the storage medium is located is controlled to execute the data processing method.
In another aspect, an embodiment of the present invention provides a client, including a memory and a processor, where the memory is used to store information including program instructions, and the processor is used to control execution of the program instructions, and the program instructions are loaded by the processor and executed to implement the steps of the data processing method.
In the technical solutions of the data processing method, the apparatus, the storage medium, and the client provided in the embodiments of the present invention, if it is determined that the data size of the target data is greater than the capacity of the allocated memory block, data having a size equal to the capacity of the memory block is selected from the target data through the memory block to perform the specified operation processing, and the step of determining whether the data size of the target data is greater than the capacity of the allocated memory block is continuously performed.
[ description of the drawings ]
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive labor.
Fig. 1 is a flowchart of a data processing method according to an embodiment of the present invention;
FIG. 2 is a flow chart of another data processing method according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of obtaining target data according to an embodiment of the present invention;
FIG. 4 is a diagram illustrating stitching location information according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present invention;
fig. 6 is a schematic diagram of a client according to an embodiment of the present invention.
[ detailed description ] embodiments
For better understanding of the technical solutions of the present invention, the following detailed descriptions of the embodiments of the present invention are provided with reference to the accompanying drawings.
It should be understood that the described embodiments are only some embodiments of the invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terminology used in the embodiments of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the examples of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be understood that the term "and/or" as used herein is merely one type of associative relationship that describes an associated object, meaning that three types of relationships may exist, e.g., A and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
Fig. 1 is a flowchart of a data processing method according to an embodiment of the present invention, as shown in fig. 1, the method includes:
step 101, judging whether the data volume of the target data is larger than the capacity of the allocated memory block, and executing step 102 if the data volume of the target data is larger than the capacity of the allocated memory block; if the data amount of the target data is determined to be smaller than or equal to the capacity of the allocated memory block, step 103 is executed.
The steps in the embodiments of the present invention may be performed by a client. In the embodiment of the present invention, for example, the client includes a personal computer, a tablet computer, a smart phone, or a notebook computer.
In the embodiment of the invention, when the memory of the client is insufficient, the specified operation processing of the target data cannot be completed at one time through the current memory. Wherein, the insufficient memory of the client means: the capacity of the current memory is smaller than the data size of the target data, so that the specified operation processing of the target data cannot be completed at one time through the current memory.
Because the memory of the client is insufficient, the specified operation processing of the target data cannot be completed at one time through the current memory, so that the memory block can be allocated from the memory of the client, and the specified operation processing of the target data can be completed in multiple times through the allocated memory block. For example: since the current memory capacity is 80MB and the data size of the target data is 500MB, the specified operation processing on the target data of 500MB cannot be completed by the memory of 80MB at one time, and thus, a memory block is allocated from the memory of 80MB, for example: the allocated memory block has a capacity of 50 MB.
In this step, if it is determined that the data size of the target data is greater than the capacity of the allocated memory block, it indicates that the designated operation processing on the target data cannot be completed once by the memory block, and the designated operation processing needs to be performed on the target data for multiple times; if the data volume of the target data is judged to be smaller than or equal to the capacity of the allocated memory block, the data volume of the target data indicates that the designated operation processing on the target data can be completed once through the memory block.
In embodiments of the present invention, the target data may include different types of data. For example: the target data may include map contour data or video data. In practical applications, the target data may also be other types of data, which are not listed here.
Step 102, selecting large data such as the capacity of the memory block from the target data by the memory block, performing the specified operation processing, and continuing to execute step 101 for the remaining target data.
In the embodiment of the present invention, data having a size equal to the capacity of the memory block may be selected from the target data, for example: the capacity of the content block is 50MB, and the data amount of the selected data is 50M because the data amount of the selected data is large, such as the capacity of the content block.
In the embodiment of the present invention, the designated operation processing may be set according to the type of the target data, and different types of target data correspond to different designated operation processing. For example: when the target data is map contour data, the designated operation processing comprises the steps of converting the map contour data into pictures to be spliced; when the target data is video data, the specified operation processing includes format conversion of the video data.
After the client performs the designated operation processing on the data selected from the target data, the client needs to continue to process the remaining target data except for the selected data in the target data, that is: execution continues at step 101.
And 103, performing specified operation processing on the target data through the memory block.
In this embodiment of the present invention, before step 101, the method may further include: and allocating a memory block from the idle memory, wherein the capacity of the memory block is less than or equal to that of the idle memory.
In the embodiment of the present invention, the method further includes: and if the memory capacity adjusting instruction is received, releasing the allocated memory block according to the memory capacity adjusting instruction, and allocating a new memory block from the current idle memory, wherein the capacity of the new memory block is different from that of the memory block before the release. Then, in step 102, continuing to execute step 101 for the remaining target data may specifically include: step 101 continues with the remaining target data and the new memory block.
The scheme realizes the dynamic adjustment of the capacity of the memory block. In the process of executing the data processing method according to the embodiment of the present invention, if a memory capacity adjustment instruction is received, the step of releasing the allocated memory block may be triggered. If the capacity of the current idle memory is increased compared with the capacity of the previous idle memory, the allocated memory blocks can be released according to the memory capacity adjusting instruction, and a new memory block is allocated, wherein the capacity of the new memory block is larger than that of the memory block before being released, so that the capacity of the memory block is increased; if the capacity of the previously allocated memory block is large and the memory is currently required to execute other data processing tasks, the allocated memory block can be released according to the memory capacity adjustment instruction, and a new memory block is allocated, wherein the capacity of the new memory block is smaller than that of the memory block before the release, so that the capacity of the memory block is reduced.
In the technical solution of the data processing method provided in the embodiment of the present invention, if it is determined that the data size of the target data is greater than the capacity of the allocated memory block, data having a size equal to the capacity of the memory block is selected from the target data through the memory block to perform the specified operation processing, and the step of determining whether the data size of the target data is greater than the capacity of the allocated memory block is continuously performed. The embodiment of the invention completes the processing of the target data with larger data volume through the memory block with smaller capacity, thereby realizing the memory optimization and improving the use efficiency of the memory.
The embodiment of the invention provides another data processing method, and the embodiment takes the example that target data comprises map contour data as an example for description. Fig. 2 is a flowchart of another data processing method according to an embodiment of the present invention, as shown in fig. 2, the method includes:
step 201, obtaining target data, wherein the target data comprises map contour data.
The steps in the embodiments of the present invention may be performed by a client.
Fig. 3 is a schematic diagram of acquiring target data in the embodiment of the present invention, and as shown in fig. 3, step 201 specifically includes:
step 2011, raw sensor data is acquired.
In this step, raw sensor data may be acquired by SLAM techniques, for example: the SLAM technology may include an image SLAM technology or a laser SLAM technology, where the laser navigation sensor has the characteristics of high precision, high speed, and capability of quickly responding to environmental changes in dynamic and static states, and the reliability and safety of the laser SLAM technology are high, so the embodiment is described by taking the laser SLAM technology as an example. For example: the raw sensor data may include laser scan data, video image data, point cloud data.
Specifically, a laser navigation sensor arranged on a robot or an Automatic Guided Vehicle (AGV) performs laser scanning to acquire original sensor data; the laser navigation sensor sends the acquired raw sensor data to the client side, so that the client side can acquire the raw sensor data.
In the embodiment of the invention, the robot or the AGV starts to collect the original sensor data under the control of the collection starting instruction input by the user. The laser navigation sensor on the robot or the AGV performs laser scanning according to a set time interval, and each time laser scanning is performed, one piece of original sensor data can be obtained, and the original sensor data is sent to the client, that is, the client in step 2011 is executed once to obtain the original sensor data. The set time interval can be set as required, for example, the set time interval includes 30 ms.
Step 2012, calculating the raw sensor data by using SLAM algorithm to generate map contour data.
In an embodiment of the present invention, the map contour data includes grid map data, and the grid map data may include a length and a width of the grid map, a length of each grid, and data of each grid, wherein the data of each grid includes a gray scale. Each grid in the grid map data corresponds to a pixel.
And 2013, storing the map contour data as target data.
In the embodiment of the invention, the client can locally store the map contour data, or the client stores the map contour data into the database, or the client stores the map contour data into the external storage device.
Step 202, allocating a memory block from the idle memory, where the capacity of the memory block is less than or equal to the capacity of the idle memory.
In the embodiment of the present invention, if there is an idle memory, a memory block may be allocated from the idle memory, as long as the allocated memory block is less than or equal to the capacity of the idle memory.
Step 203, determining whether the data size of the map contour data is larger than the capacity of the allocated memory block, and if the data size of the map contour data is larger than the capacity of the allocated memory block, executing step 204; if the data size of the map contour is smaller than or equal to the capacity of the allocated memory block, step 205 is executed.
In the embodiment of the present invention, the target data is map contour data, and when step 203 is executed for the first time, the data amount of the map contour data stored in step 2013 needs to be calculated in advance. Specifically, the data amount of the map contour data is calculated by multiplying the number of pixels in the map contour data by the data amount occupied by each pixel.
For example: since the data amount of the map contour data is 500MB and the capacity of the memory block is 50MB, if it is determined that the data amount of the map contour data is larger than the capacity of the memory block, which indicates that the memory block cannot complete the designated operation processing for the map contour data of 500MB at a time, the process continues to step 204.
For example: since the data size of the map contour data is 40MB and the capacity of the memory block is 50MB, it is determined that the data size of the current map contour data is smaller than or equal to the capacity of the memory block, and at this time, it indicates that the memory block can finish the designated operation processing on the map contour data of 50MB at a time, step 205 is continuously executed.
Step 204, selecting data with the capacity equal to the capacity of the memory block from the map contour data through the memory block, converting the selected data into a picture to be spliced, and continuing to execute step 203 for the rest of the map contour data.
In this step, data having a size larger than the capacity of the memory block can be selected from the map contour data, for example: the capacity of the content block is 50MB, and the data amount of the selected data is 50M because the data amount of the selected data is large, such as the capacity of the content block.
In the embodiment of the invention, as an alternative, the Direct2D can be called by the memory block to convert the rational data which is selected from the map contour data and has the capacity of the memory block and the like into the picture to be spliced. In the embodiment, the pictures to be spliced are generated through the graphic interface Direct2D of the Windows to realize the map building process, so that the visual interface display of the map pictures is realized. Wherein, Direct2D is an Application Programming Interface (API) with hardware acceleration, and Direct2D can provide high-performance and high-quality presentation for two-dimensional geometric objects, bitmaps, and texts. By utilizing the hardware acceleration performance of the Direct2D graphical interface, the display efficiency and the display effect of the visual interface are improved. Especially compared with the graphic interfaces such as GDI/GDI +, the adoption of Direct2D enables the display efficiency and the display effect of the visual interface to be remarkably improved.
In this step, data with large capacity of the memory block and the like in the map contour data can be converted into a transparency Red Green Blue (ARGB) value to generate a picture to be spliced.
Step 205, converting the map contour data into the picture to be stitched through the memory block.
In the embodiment of the invention, as an alternative, the Direct2D can be called to convert the map contour data into the picture to be spliced through the memory block.
In the embodiment of the invention, the shape of the picture to be spliced converted from the data with the same data size is a rectangle with the same size.
After step 205 is executed, the process of converting the target data into a plurality of pictures to be stitched by the memory block is realized.
And step 206, splicing the multiple pictures to be spliced to generate a complete map.
In the embodiment of the present invention, after step 204 and step 205, both may include: and acquiring splicing position information of the pictures to be spliced, wherein the splicing position information is used for representing the splicing position of the pictures to be spliced.
Fig. 4 is a schematic diagram of the splicing position information in the embodiment of the present invention, and as shown in fig. 4, the splicing of 4 pictures to be spliced is described as an example, and in an X-Y coordinate system, the splicing position information may include coordinates of vertices of the pictures to be spliced. For example: the coordinates of four vertexes of the picture 21 to be spliced are respectively (0,0), (x,0), (0, y) and (x, y), the coordinates of four vertexes of the picture 22 to be spliced are respectively (0, y), (x, y), (0,2y) and (x, 2y), the coordinates of four vertexes of the picture 23 to be spliced are respectively (0,2y), (x, 2y), (0,3y) and (x, 3y), and the coordinates of four vertexes of the picture 24 to be spliced are respectively (0,3y), (x, 3y), (0,4y) and (x, 4y)
In the embodiment of the present invention, step 206 specifically includes: and splicing the plurality of pictures to be spliced into a complete map according to the splicing position information. Alternatively, in step 206, a plurality of pictures to be stitched can be stitched into a complete map according to the coordinates of two vertices on any diagonal line of the pictures to be stitched.
As shown in fig. 4, the 4 pictures to be spliced are spliced into a complete map according to the splicing position information of the 4 pictures to be spliced. For example: splicing 4 pictures to be spliced into a complete map according to the coordinates (x,0) and (0, y) of 2 vertexes on the diagonal line of the picture 21 to be spliced, the coordinates (x, y) and (0,2y) of 2 vertexes on the diagonal line of the picture 22 to be spliced, the coordinates (x, 2y) and (0,3y) of 2 vertexes on the diagonal line of the picture 23 to be spliced and the coordinates (x, 3y) and (0,4y) of 2 vertexes on the diagonal line of the picture 24 to be spliced.
The scheme of the embodiment of the invention is as follows: after all the pictures to be spliced are generated, all the pictures to be spliced are spliced at one time to generate a complete map.
In practical application, as an alternative, the pictures to be stitched can be stitched each time after being generated to generate the complete map. In step 203, if it is determined that the data size of the map contour is larger than the capacity of the allocated memory block, the following steps are performed:
step S1, selecting data having a size equal to the size of the memory block from the map contour data by the memory block, and converting the selected data into a map to be merged;
and step S2, splicing the current picture to be spliced with the last spliced picture to generate the current spliced picture, and continuing to execute the step 203 according to the rest map contour data.
Specifically, step S2 includes: acquiring splicing position information of the pictures to be spliced, wherein the splicing position information is used for representing the splicing position of the pictures to be spliced; and splicing the current picture to be spliced and the picture spliced last time according to the splicing position information.
As shown in fig. 4, for example: the last spliced picture comprises a to-be-spliced picture 21 and a to-be-spliced picture 22 which are spliced, and the current to-be-spliced picture comprises a to-be-spliced picture 23. And splicing the picture 23 to be spliced with the picture spliced last time according to the splicing position information of the picture 23 to be spliced and the splicing position information of the picture spliced last time.
In step 203, if it is determined that the data amount of the map contour is smaller than or equal to the capacity of the allocated memory block, the following steps are further executed after step 205:
and step S3, acquiring splicing position information of the pictures to be spliced, wherein the splicing position information is used for representing the splicing position of the pictures to be spliced.
And step S4, splicing the current picture to be spliced with the picture spliced last time to generate a complete map, and continuing to execute the step 207.
As shown in fig. 4, for example: the last spliced picture comprises a to-be-spliced picture 21, a to-be-spliced picture 22 and a to-be-spliced picture 23, and the current to-be-spliced picture comprises a to-be-spliced picture 24. And splicing the picture 24 to be spliced with the picture spliced last time according to the splicing position information of the picture 24 to be spliced and the splicing position information of the picture spliced last time, so as to generate a complete map.
And step 207, displaying the complete map.
In this step, the client displays the complete map to realize the display of the complete map.
In this embodiment, steps 201 to 207 are performed once, that is, the data processing process for one map contour data is completed. By repeatedly executing steps 201 to 207, the data processing process for a plurality of map contour data can be realized. And stopping collecting the original sensor data until the robot or the AGV receives a collection stopping instruction input by a user, wherein the client does not obtain the original sensor data any more, namely step 201 is not executed any more. The embodiment realizes the scheme of establishing the map while acquiring data by using the SLAM technology.
In the embodiment of the invention, taking the example of obtaining the original sensor data of the 40000 square meter warehouse by using the laser SLAM technology, each pixel needs to be ensured to have 20mm precision during drawing, and the map profile data corresponding to the original sensor data of the 40000 square meter warehouse comprises 10000 × 10000 grids, namely the map profile data corresponds to 10000 × 10000 pixels, so that the data volume of the map profile data can be 381 MB. Because the data volume of the map contour data is large and the capacity of the memory block is small, the map contour data can be converted into the pictures to be spliced by the memory block for multiple times so as to complete the process of drawing, and the success rate of drawing is improved.
In the technical solution of the data processing method provided in the embodiment of the present invention, if it is determined that the data size of the map contour data is greater than the capacity of the allocated memory blocks, the memory block selects data with a size equal to the capacity of the memory block from the map contour data and performs a predetermined operation process, and continuing to execute the step of judging whether the data volume of the map contour data is larger than the capacity of the allocated memory blocks, in the embodiment, the map contour data is converted into the pictures to be spliced by the allocated memory blocks for multiple times, and then the pictures to be spliced are spliced to generate the map picture so as to complete the map building process, therefore, the map contour data is processed under the condition that the current memory capacity is small and the data volume of the map contour data is large, the limitation of the current memory capacity to the data processing process when the data volume of the map contour data is large is avoided, and the success rate of map building is improved.
Fig. 5 is a schematic structural diagram of a data processing apparatus according to an embodiment of the present invention, and as shown in fig. 5, the apparatus includes: a judging module 11 and an operation executing module 12.
The determining module 11 is configured to determine whether a data amount of the target data is greater than a capacity of the allocated memory block.
The operation executing module 12 is configured to perform specified operation processing on the target data through the memory block if the determining module 11 determines that the data size of the target data is smaller than or equal to the capacity of the memory block; if the determining module 11 determines that the data amount of the target data is greater than the capacity of the memory block, select, by the memory block, data with a size equal to the capacity of the memory block from the target data to perform a specified operation process, and trigger the determining module 11 to continue to execute, for the remaining target data, the step of determining whether the data amount of the target data is greater than the capacity of the allocated memory block.
In the embodiment of the present invention, the apparatus further includes: an allocation module 13 and a receiving module 14. The allocating module 13 is configured to allocate a memory block from an idle memory, where a capacity of the memory block is smaller than or equal to a capacity of the idle memory. The receiving module 14 is configured to receive a memory capacity adjustment instruction; the allocating module 13 is further configured to, if a memory capacity adjustment instruction is received, release the allocated memory block according to the memory capacity adjustment instruction, allocate a new memory block from the current idle memory, where the capacity of the new memory block is different from the capacity of the memory block before the release, and trigger the determining module 11 to continue to execute the step of determining whether the data amount of the target data is greater than the capacity of the allocated memory block with respect to the remaining target data and the new memory block.
In an embodiment of the present invention, the target data includes map contour data. The device also includes: a stitching module 15 and a first acquisition module 16.
The operation executing module 12 is specifically configured to select, from the map contour data, data with a size equal to the capacity of the memory block through the memory block, and convert the selected data into a picture to be stitched. The splicing module 15 is configured to splice the multiple pictures to be spliced to generate a complete map after the operation execution module 12 performs specified operation processing on the target data through the memory block.
The first obtaining module 16 is configured to obtain splicing position information of the picture to be spliced, where the splicing position information is used to indicate a splicing position of the picture to be spliced. The splicing module 15 is specifically configured to splice the multiple pictures to be spliced into the complete map according to the splicing position information.
The operation executing module 12 is specifically configured to select, from the map contour data, data with a size equal to the capacity of the memory block through the memory block, and convert the selected data into a map to be merged. The splicing module 15 is configured to splice a current picture to be spliced with a last spliced picture to generate a current spliced picture, and trigger the determining module 11 to continue to execute the step of determining, for the remaining target data, whether the data size of the target data is greater than the capacity of the allocated memory block. The splicing module 15 is further configured to splice the current picture to be spliced with the picture spliced last time after the operation execution module 12 performs the specified operation processing on the target data through the memory block, so as to generate a complete map.
The first obtaining module 16 is configured to obtain splicing position information of the picture to be spliced, where the splicing position information is used to indicate a splicing position of the picture to be spliced. The splicing module 15 is specifically configured to splice the multiple pictures to be spliced into the complete map according to the splicing position information.
In the embodiment of the present invention, the apparatus further includes: a second acquisition module 17, a calculation module 18 and a storage module 19.
The second acquisition module 17 is used to acquire raw sensor data. The calculation module 18 is configured to calculate the raw sensor data by using a SLAM algorithm to generate the map contour data. The storage module 19 is configured to store the map contour data as target data.
In the embodiment of the present invention, the apparatus further includes: the module 20 is shown.
The presentation module 20 is used to present the complete map.
In the technical solution of the data processing apparatus provided in the embodiment of the present invention, if it is determined that the data size of the target data is greater than the capacity of the allocated memory block, data having a size equal to the capacity of the memory block is selected from the target data through the memory block to perform the specified operation processing, and the step of determining whether the data size of the target data is greater than the capacity of the allocated memory block is continuously performed. The embodiment of the invention completes the processing of the target data with larger data volume through the memory block with smaller capacity, thereby realizing the memory optimization and improving the use efficiency of the memory.
An embodiment of the present invention provides a storage medium, where the storage medium includes a stored program, where, when the program runs, a device on which the storage medium is located is controlled to execute each step of the above-described embodiment of the data processing method, and for specific description, reference may be made to the above-described embodiment of the data processing method.
An embodiment of the present invention provides a client, including a memory and a processor, where the memory is used to store information including program instructions, and the processor is used to control execution of the program instructions, and the program instructions are loaded and executed by the processor to implement the steps of the embodiment of the data processing method.
Fig. 6 is a schematic diagram of a client according to an embodiment of the present invention. As shown in fig. 6, the client 3 of this embodiment includes: a processor 31, a memory 32, and a computer program 33 stored in the memory 32 and capable of running on the processor 31, wherein the computer program 33 is implemented by the processor 31 to implement the data processing method applied in the embodiment, and therefore, for avoiding repetition, detailed descriptions thereof are omitted here. Alternatively, the computer program is executed by the processor 31 to implement the functions of each model/unit applied in the data processing apparatus in the embodiments, which are not described herein for avoiding redundancy.
The client 3 includes, but is not limited to, a processor 31, a memory 32. Those skilled in the art will appreciate that fig. 6 is merely an example of a client 3 and does not constitute a limitation of the client 3 and may include more or fewer components than shown, or combine certain components, or different components, e.g., the client 3 may also include input-output devices, network access devices, buses, etc.
The Processor 31 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The storage 32 may be an internal storage unit of the client 3, such as a hard disk or a memory of the client 3. The memory 32 may also be an external storage device of the client 3, such as a plug-in hard disk provided on the client 3, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like. Further, the memory 32 may also include both an internal storage unit of the client 3 and an external storage device. The memory 32 is used for storing computer programs and other programs and data required by the client. The memory 32 may also be used to temporarily store data that has been output or is to be output.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments provided in the present invention, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions in actual implementation, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
The integrated unit implemented in the form of a software functional unit may be stored in a computer readable storage medium. The software functional unit is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) or a Processor (Processor) to execute some steps of the methods according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (10)

1. A data processing method, comprising:
judging whether the data volume of the target data is larger than the capacity of the allocated memory blocks or not;
if the data volume of the target data is judged to be larger than the capacity of the memory block, selecting data with the capacity equal to the capacity of the memory block from the target data through the memory block to perform specified operation processing, and continuing to execute the step of judging whether the data volume of the target data is larger than the capacity of the allocated memory block or not for the remaining target data;
and if the data volume of the target data is judged to be smaller than or equal to the capacity of the memory block, performing specified operation processing on the target data through the memory block.
2. The data processing method according to claim 1, wherein before determining whether the data size of the target data is larger than the capacity of the allocated memory block, the method further comprises:
allocating a memory block from an idle memory, wherein the capacity of the memory block is less than or equal to the capacity of the idle memory;
the method further comprises the following steps: if a memory capacity adjusting instruction is received, releasing the allocated memory blocks according to the memory capacity adjusting instruction, and allocating a new memory block from the current idle memory, wherein the capacity of the new memory block is different from the capacity of the memory block before the release;
the step of continuing to execute the determination of whether the data size of the target data is larger than the capacity of the allocated memory block for the remaining target data includes:
and continuing to execute the step of judging whether the data volume of the target data is larger than the capacity of the allocated memory block or not for the remaining target data and the new memory block.
3. The data processing method of claim 1, wherein the target data includes map contour data;
the selecting, by the memory block, data having a size equal to a capacity of the memory block from the target data to perform a predetermined operation process includes:
selecting data with the capacity equal to that of the memory block from the target data through the memory block, and converting the selected data into a picture to be spliced;
if it is determined that the data size of the target data is smaller than or equal to the capacity of the memory block, after performing the specified operation processing on the target data through the memory block, the method further includes:
and splicing the pictures to be spliced to generate a complete map.
4. The data processing method according to claim 3, wherein after the converting into the picture to be stitched, further comprising:
acquiring splicing position information of the pictures to be spliced, wherein the splicing position information is used for representing the splicing position of the pictures to be spliced;
the splicing of the plurality of pictures to be spliced to generate the complete map comprises the following steps:
and splicing the pictures to be spliced into the complete map according to the splicing position information.
5. The data processing method of claim 1, wherein the target data includes map contour data;
the selecting, by the memory block, data having a size equal to a capacity of the memory block from the target data to perform a predetermined operation process includes:
selecting data with the capacity equal to that of the memory block from the target data through the memory block, and converting the selected data into a map to be spliced;
splicing the current picture to be spliced with the last spliced picture to generate the current spliced picture, and continuing to execute the step of judging whether the data volume of the target data is larger than the capacity of the allocated memory block or not aiming at the remaining target data;
if it is determined that the data size of the target data is smaller than or equal to the capacity of the memory block, after performing the specified operation processing on the target data through the memory block, the method further includes:
and splicing the current picture to be spliced and the picture spliced last time to generate a complete map.
6. The data processing method according to claim 5, wherein before the splicing the current picture to be spliced with the picture spliced last time, the method further comprises:
acquiring splicing position information of the pictures to be spliced, wherein the splicing position information is used for representing the splicing position of the pictures to be spliced;
the splicing of the current picture to be spliced and the picture spliced last time comprises the following steps:
and splicing the current picture to be spliced and the picture spliced last time according to the splicing position information.
7. The data processing method according to any one of claims 1 to 6, wherein before determining whether the data size of the target data is larger than the capacity of the allocated memory block, the method further includes:
acquiring raw sensor data;
calculating the original sensor data by using an SLAM algorithm to generate map contour data;
storing the map contour data as target data.
8. A data processing apparatus, comprising:
the judging module is used for judging whether the data volume of the target data is larger than the capacity of the allocated memory blocks;
an operation executing module, configured to perform specified operation processing on the target data through the memory block if the determining module determines that the data size of the target data is smaller than or equal to the capacity of the memory block; if the determining module determines that the data size of the target data is larger than the capacity of the memory block, selecting, by the memory block, data having a size equal to the capacity of the memory block from the target data to perform a specified operation process, and triggering the determining module to continue to execute, for the remaining target data, the step of determining whether the data size of the target data is larger than the capacity of the allocated memory block.
9. A storage medium, characterized in that the storage medium comprises a stored program, wherein when the program runs, a device in which the storage medium is located is controlled to execute the data processing method according to any one of claims 1 to 7.
10. A client comprising a memory for storing information comprising program instructions and a processor for controlling the execution of the program instructions, characterized in that the program instructions are loaded and executed by the processor to implement the steps of the data processing method according to any of claims 1 to 7.
CN201911216275.8A 2019-12-02 2019-12-02 Data processing method, device, storage medium and client Active CN112988609B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911216275.8A CN112988609B (en) 2019-12-02 2019-12-02 Data processing method, device, storage medium and client

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911216275.8A CN112988609B (en) 2019-12-02 2019-12-02 Data processing method, device, storage medium and client

Publications (2)

Publication Number Publication Date
CN112988609A true CN112988609A (en) 2021-06-18
CN112988609B CN112988609B (en) 2023-05-02

Family

ID=76331310

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911216275.8A Active CN112988609B (en) 2019-12-02 2019-12-02 Data processing method, device, storage medium and client

Country Status (1)

Country Link
CN (1) CN112988609B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114637698A (en) * 2022-05-18 2022-06-17 深圳市倍思科技有限公司 Map memory allocation method and device for robot, robot and storage medium

Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050071597A1 (en) * 2003-09-30 2005-03-31 Woo-Hyong Lee Method and apparatus for executing dynamic memory management with object-oriented program
WO2007109920A1 (en) * 2006-03-27 2007-10-04 Zte Corporation A method for constructing and using a memory pool
CN102279808A (en) * 2011-09-06 2011-12-14 晨星软件研发(深圳)有限公司 Method and device for managing video memory of embedded equipment
CN102446139A (en) * 2011-11-14 2012-05-09 奇智软件(北京)有限公司 Method and device for data storage
CN103761709A (en) * 2014-01-07 2014-04-30 西安电子科技大学 Parallel real-time SAR image spot and noise reducing method based on multiple DSPs
CN103970680A (en) * 2014-04-28 2014-08-06 上海华为技术有限公司 Memory management method and device and embedded system
US20140282589A1 (en) * 2013-03-13 2014-09-18 Samsung Electronics Company, Ltd. Quota-based adaptive resource balancing in a scalable heap allocator for multithreaded applications
CN105957011A (en) * 2016-05-25 2016-09-21 北京小米移动软件有限公司 Picture processing method and device
CN106294193A (en) * 2015-06-03 2017-01-04 杭州海康威视系统技术有限公司 Storage device and piecemeal based on this storage device storage method
CN106407130A (en) * 2016-09-12 2017-02-15 深圳易充新能源(深圳)有限公司 Method for managing Nandflash memory data
CN107783812A (en) * 2016-08-24 2018-03-09 阿里巴巴集团控股有限公司 Virutal machine memory management method and device
CN109189074A (en) * 2018-09-28 2019-01-11 华南农业大学 A kind of interior for storage environment is autonomous to build drawing method
US20190096041A1 (en) * 2017-09-25 2019-03-28 Texas Instruments Incorporated Methods and system for efficient processing of generic geometric correction engine
CN109547727A (en) * 2018-10-16 2019-03-29 视联动力信息技术股份有限公司 Data cache method and device
CN109800181A (en) * 2018-12-12 2019-05-24 深圳市景阳科技股份有限公司 A kind of method for writing data based on disk, data transfer apparatus and terminal device
CN109976686A (en) * 2017-12-28 2019-07-05 浙江宇视科技有限公司 Distributed display system and method

Patent Citations (16)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050071597A1 (en) * 2003-09-30 2005-03-31 Woo-Hyong Lee Method and apparatus for executing dynamic memory management with object-oriented program
WO2007109920A1 (en) * 2006-03-27 2007-10-04 Zte Corporation A method for constructing and using a memory pool
CN102279808A (en) * 2011-09-06 2011-12-14 晨星软件研发(深圳)有限公司 Method and device for managing video memory of embedded equipment
CN102446139A (en) * 2011-11-14 2012-05-09 奇智软件(北京)有限公司 Method and device for data storage
US20140282589A1 (en) * 2013-03-13 2014-09-18 Samsung Electronics Company, Ltd. Quota-based adaptive resource balancing in a scalable heap allocator for multithreaded applications
CN103761709A (en) * 2014-01-07 2014-04-30 西安电子科技大学 Parallel real-time SAR image spot and noise reducing method based on multiple DSPs
CN103970680A (en) * 2014-04-28 2014-08-06 上海华为技术有限公司 Memory management method and device and embedded system
CN106294193A (en) * 2015-06-03 2017-01-04 杭州海康威视系统技术有限公司 Storage device and piecemeal based on this storage device storage method
CN105957011A (en) * 2016-05-25 2016-09-21 北京小米移动软件有限公司 Picture processing method and device
CN107783812A (en) * 2016-08-24 2018-03-09 阿里巴巴集团控股有限公司 Virutal machine memory management method and device
CN106407130A (en) * 2016-09-12 2017-02-15 深圳易充新能源(深圳)有限公司 Method for managing Nandflash memory data
US20190096041A1 (en) * 2017-09-25 2019-03-28 Texas Instruments Incorporated Methods and system for efficient processing of generic geometric correction engine
CN109976686A (en) * 2017-12-28 2019-07-05 浙江宇视科技有限公司 Distributed display system and method
CN109189074A (en) * 2018-09-28 2019-01-11 华南农业大学 A kind of interior for storage environment is autonomous to build drawing method
CN109547727A (en) * 2018-10-16 2019-03-29 视联动力信息技术股份有限公司 Data cache method and device
CN109800181A (en) * 2018-12-12 2019-05-24 深圳市景阳科技股份有限公司 A kind of method for writing data based on disk, data transfer apparatus and terminal device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
许健: "一种Linux多线程应用下内存池的设计与实现", 《电子技术应用》 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114637698A (en) * 2022-05-18 2022-06-17 深圳市倍思科技有限公司 Map memory allocation method and device for robot, robot and storage medium

Also Published As

Publication number Publication date
CN112988609B (en) 2023-05-02

Similar Documents

Publication Publication Date Title
US11842438B2 (en) Method and terminal device for determining occluded area of virtual object
CN111062981B (en) Image processing method, device and storage medium
US9286858B2 (en) Hit testing method and apparatus
KR20180050702A (en) Image transformation processing method and apparatus, computer storage medium
US11908039B2 (en) Graphics rendering method and apparatus, and computer-readable storage medium
KR20160048901A (en) System and method for determining the extent of a plane in an augmented reality environment
CN115578433B (en) Image processing method, device, electronic equipment and storage medium
CN111640180A (en) Three-dimensional reconstruction method and device and terminal equipment
US10825129B2 (en) Eliminating off screen passes using memoryless render target
CN106845477B (en) Method and device for establishing region of interest based on multiple reconstructed images
CN112988609A (en) Data processing method, device, storage medium and client
CN110264546B (en) Image synthesis method and device, computer-readable storage medium and terminal
CN115761119A (en) Neighborhood voxel storage method and device, computer equipment and storage medium
US11636566B2 (en) Computing system and methods of operating the computing system
CN117058288A (en) Graphics processor, multi-core graphics processing system, electronic device, and apparatus
CN116958375A (en) Graphics processor, system, apparatus, device, and method
CN113763552A (en) Three-dimensional geographic model display method and device, computer equipment and storage medium
EP3809314A1 (en) 3d object detection from calibrated 2d images background
CN113379814A (en) Three-dimensional space relation judgment method and device
CN106991643B (en) Real-time line checking method and real-time line checking system with low resource consumption
CN110580274A (en) GIS data rendering method
CN113610883B (en) Point cloud processing system and method, computer device, and storage medium
CN115761123B (en) Three-dimensional model processing method, three-dimensional model processing device, electronic equipment and storage medium
CN113312979B (en) Image processing method and device, electronic equipment, road side equipment and cloud control platform
WO2023199594A1 (en) Information processing system, information processing method, and program

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
CB02 Change of applicant information

Address after: Room 304, B / F, building 2, 399 Danfeng Road, Hangzhou, Zhejiang, 310051

Applicant after: Hangzhou Hikvision Robot Co.,Ltd.

Address before: Room 304, B / F, building 2, 399 Danfeng Road, Hangzhou, Zhejiang, 310051

Applicant before: HANGZHOU HIKROBOT TECHNOLOGY Co.,Ltd.

CB02 Change of applicant information
GR01 Patent grant
GR01 Patent grant