Storage space allocation method, device, vehicle, storage medium and program product

By limiting the storage space of downstream nodes, ensuring that the upstream nodes have available space, it solves the problem of image output failure caused by insufficient storage space in image processing tasks, reduces bandwidth pressure and prevents on-board equipment from black screen.

CN118710486BActive Publication Date: 2024-12-10XIAOMI EV TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411189424.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-27
Publication Date
2024-12-10
Estimated Expiration
2044-08-27

AI Technical Summary

Technical Problem

In a vehicle, when the downstream node of the image processing task occupies all storage space, the upstream node has no available storage space, resulting in the image output failure.

Method used

By limiting the amount of storage space occupied by downstream nodes, making it smaller than the total storage space allocated to image processing tasks, ensuring that upstream nodes have remaining storage space for image output. The specific method includes configuring a limiter to accumulate the number of storage addresses. When a certain threshold is reached, the storage space of the downstream node is returned to the upstream node to prevent the downstream node from occupying all storage space.

Benefits of technology

Effectively leave storage space for upstream nodes, ensuring that image output is not interrupted, reducing bandwidth pressure caused by storage space application and release, and avoiding the black screen of on-board equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118710486B_ABST
    Figure CN118710486B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a storage space allocation method, device, vehicle, storage medium and program product, and relates to the field of vehicle technology, including: determining the total amount of storage space allocated to an image processing task; the image processing task includes an upstream node and a downstream node, the upstream node is used to produce an image, and the downstream node is used to analyze the image; controlling the first amount of storage space occupied by the downstream node to be less than the total amount, so that the upstream node has storage space that can be occupied. Using the storage space allocation method proposed in the present disclosure, it can be ensured that the upstream node has storage space that can be occupied, thereby ensuring image output.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of vehicle technology, and in particular to a storage space allocation method, device, vehicle, storage medium and program product. Background Art

[0002] Currently, in the vehicle field, there is a shared memory cache technology that allocates a predetermined amount of storage space for image processing tasks, so that each image frame captured by the image acquisition device on the vehicle can occupy a separate storage space to perform image processing tasks.

[0003] In the related art, the amount of storage space allocated to the image processing task is limited. When the downstream node of the image processing task occupies all the storage space, the upstream node of the image processing task will have no available storage space, resulting in no image output. Summary of the invention

[0004] In order to overcome the problems existing in the related art, the present disclosure provides a storage space allocation method, device, vehicle, storage medium and program product.

[0005] According to a first aspect of an embodiment of the present disclosure, a method for allocating storage space is provided, comprising:

[0006] Determining the total amount of storage space allocated to an image processing task; the image processing task includes an upstream node and a downstream node, the upstream node is used to produce an image, and the downstream node is used to analyze the image;

[0007] The first amount of storage space occupied by the downstream node is controlled to be smaller than the total amount, so that the upstream node has storage space that can be occupied.

[0008] Optionally, controlling the first amount of storage space occupied by the downstream node to be smaller than the total amount includes:

[0009] Control a first quantity of storage space occupied by the downstream node to be less than or equal to a first upper limit value; the first upper limit value is less than the total quantity.

[0010] Optionally, controlling the first amount of storage space occupied by the downstream node to be less than or equal to a first upper limit value includes:

[0011] It is determined that a first amount of storage space occupied by the downstream node reaches the first upper limit value, and the storage space to be allocated to the downstream node is returned to the upstream node.

[0012] Optionally, the determining that the first amount of storage space occupied by the downstream node reaches the first upper limit value, and returning the storage space to be allocated to the downstream node to the upstream node, includes:

[0013] Receiving a storage address of a storage space sent by an upstream node through a limiter; the limiter is used to accumulate a first number of storage addresses sent by the upstream node;

[0014] It is determined that the first number of the storage addresses accumulated by the limiter reaches the first upper limit value, and the storage space to be allocated to the downstream node is returned to the upstream node.

[0015] Optionally, the method further comprises:

[0016] determining that the first number of the storage addresses accumulated by the limiter does not reach the first upper limit value, and sending the storage address of the storage space to be allocated to the downstream node to the downstream node;

[0017] The downstream node is controlled to occupy a storage space corresponding to the storage address according to the storage address.

[0018] Optionally, the method further comprises:

[0019] It is determined that the limiter receives release information sent by the downstream node, and updates the first quantity; the release information instructs the downstream node to release storage space.

[0020] Optionally, the method comprises:

[0021] Control the second quantity of storage space occupied by the upstream node to be less than or equal to a second upper limit value; the first upper limit value is greater than the second upper limit value, and the sum of the first upper limit value and the second upper limit value is equal to the total quantity.

[0022] Optionally, the limiter is configured between the upstream node and the downstream node.

[0023] According to a second aspect of an embodiment of the present disclosure, there is provided a storage space allocation device, comprising:

[0024] a total quantity module configured to determine the total quantity of storage space allocated to an image processing task; the image processing task includes an upstream node and a downstream node, the upstream node is used to produce an image, and the downstream node is used to analyze the image;

[0025] The limiting module is configured to control the first quantity of the storage space occupied by the downstream node to be smaller than the total quantity so that the upstream node has the storage space that can be occupied.

[0026] According to a third aspect of an embodiment of the present disclosure, a vehicle is provided, comprising:

[0027] processor;

[0028] a memory for storing processor-executable instructions;

[0029] Wherein, the processor is configured to:

[0030] Execute the steps of the storage space allocation method proposed in the first aspect of the embodiment of the present disclosure.

[0031] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored. When the program instructions are executed by a processor, the steps of the storage space allocation method provided in the first aspect of the present disclosure are implemented.

[0032] According to a fifth aspect of an embodiment of the present disclosure, a computer program product is provided, including a computer program, which, when executed by a processor, implements the steps of the storage space allocation method provided in the first aspect of the present disclosure.

[0033] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:

[0034] The first amount of storage space occupied by the downstream node can be limited to be smaller than the total amount of storage space allocated to the upstream node and the downstream node in the image processing task. In this way, excess storage space can be reserved for the upstream node to occupy. After the upstream node has storage space that can be occupied, the upstream node can use the reserved excess storage space to output the image.

[0035] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0037] Figure 1 The present invention is a flowchart of a method for allocating storage space according to an exemplary embodiment.

[0038] Figure 2 The diagram is a schematic diagram showing storage space occupied by an upstream node and a downstream node according to an exemplary embodiment.

[0039] Figure 3 It is a schematic diagram showing a limiter configured at a production end and a consumption end according to an exemplary embodiment.

[0040] Figure 4 The diagram is a schematic diagram showing storage space allocated between an upstream node and a downstream node according to an exemplary embodiment.

[0041] Figure 5 The invention is a block diagram of a storage space allocation device according to an exemplary embodiment.

[0042] Figure 6 is a block diagram of a vehicle according to an exemplary embodiment.

[0043] Figure 7 The invention is a block diagram of a storage space allocation device according to an exemplary embodiment.

[0044] Figure 8 is a block diagram of a chip system according to an exemplary embodiment. DETAILED DESCRIPTION

[0045] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0046] It should be noted that all actions of acquiring signals, information or data in the present disclosure are carried out in compliance with the relevant data protection laws and policies of the country where the device is located and with the authorization given by the owner of the corresponding device.

[0047] Figure 1 is a flow chart showing a method for allocating storage space according to an exemplary embodiment. Figure 1 As shown, the following steps are included.

[0048] In step S11 , the total amount of storage space allocated to the image processing task is determined.

[0049] The image processing task is used to generate images and analyze and process the generated images. The image processing task includes upstream nodes and downstream nodes.

[0050] The upstream node is used to produce images. See Figure 2As shown, the upstream nodes include an image acquisition device node, a preprocessing node (Image Signal Processor, ISP) and a video node (Encode). The image acquisition device node is used to acquire a first image of the environment around the image acquisition device; the preprocessing node is used to preprocess the first image acquired by the image acquisition device to obtain a preprocessed second image, and the preprocessing includes but is not limited to denoising, white balance, color correction, sharpening, etc.; the video node is used to encode the preprocessed second image from an image format to a video format, and compress the second image to obtain a third image, thereby reducing the data volume of the second image.

[0051] The downstream node is used to analyze the image produced by the upstream node. The downstream node includes a perception node (Graphics Processing Unit, GPU), which is used to analyze and process the compressed third image, including but not limited to identifying objects such as people, cars, numbers, etc. in the third image and performing image segmentation on the third image.

[0052] The storage space can be a memory cache area, and the memory cache area uses the memory as a buffer. It is understandable that when the upstream node and the downstream node process their respective tasks, they need to occupy the storage space to access the cached image frames in the storage space to complete their respective tasks. For example, the image acquisition device node in the upstream node will access the storage space and send the acquired image frames to the storage space. The preprocessing node in the upstream node needs to access the storage space and obtain the image in the storage space for preprocessing. The video node in the upstream node will access the storage space and obtain the image in the storage space for compression processing; the downstream node will access the storage space and obtain the image in the storage space for analysis and processing.

[0053] See also Figure 2 As shown, for each image frame, after the image acquisition device node acquires the image frame, it will first send the image frame to the storage space for caching. After the caching is completed, the image acquisition device node releases the storage space and sends the storage address of the storage space to the preprocessing node; the preprocessing node then occupies the storage space to preprocess the image frame, and releases the storage space after the preprocessing is completed, and sends the storage address of the storage space to the video node and the perception node; the video node then occupies the storage space to compress the image frame, and releases the storage space after the compression is completed; the perception node then occupies the storage space to perform analysis and processing such as target object recognition on the compressed image frame, and releases the storage space after the analysis and processing is completed, so that the upstream node or downstream node occupies the storage space to process the remaining image frames.

[0054] An image processing task is a task for producing and processing multiple image frames. A preset amount of storage space can be allocated to the image processing task in advance, and one image frame occupies one storage space. One image frame occupies one storage space, which means that the upstream node and the downstream node of the image processing task occupy the same storage space when processing the same image frame.

[0055] The total amount of storage space allocated to the image processing task can be predetermined. The total amount of storage space is neither too much nor too little. If the amount is too much, it will occupy more system storage space, affecting the use of storage space by other businesses. If the amount is too little, it will also result in insufficient storage space for the image processing task, and the task requirements of the image processing task cannot be met. Therefore, the embodiment of the present disclosure can set the total amount of storage space allocated to the image processing task to be greater than or equal to the first amount and less than or equal to the second amount. The first amount can be 4, and the second amount can be 10.

[0056] In step S12, the first amount of storage space occupied by the downstream node is controlled to be smaller than the total amount, so that the upstream node has storage space that can be occupied.

[0057] The first quantity is the quantity of storage space currently occupied by the downstream node, and the total quantity is the total quantity of storage space allocated to the upstream node and the downstream node.

[0058] It is understandable that the downstream nodes need to perform complex analysis and calculations on the image frames, such as target identification and image segmentation, while the upstream nodes only perform simple processing such as preprocessing and compression on the image frames. Therefore, the computational complexity of the downstream nodes is greater than that of the upstream nodes, and the time that the downstream nodes occupy the storage space will be longer than the time that the upstream nodes occupy the storage space. It is possible that the downstream nodes occupy all the storage space allocated to the image processing tasks, while the upstream nodes have no storage space to occupy, and the image frames obtained by the image acquisition device nodes have no available storage space for caching. Ultimately, these image frames that have no storage space to cache are lost, which is reflected in the vehicle-mounted equipment as a black screen and no image display.

[0059] For example, assuming that the total number of storage spaces allocated to the image processing task is 5, and the image acquisition device node captures 6 image frames, if the downstream node of the image processing task is analyzing and processing the first 5 image frames, all the storage space allocated to the image processing task is occupied. At this time, the image acquisition device has no available storage space for caching the newly captured 6th image frame, resulting in the loss of the 6th image frame, and the 6th image frame will not be displayed on the vehicle-mounted device.

[0060] Based on this, the first amount of storage space occupied by the downstream node can be limited to be less than the total amount of storage space allocated to the image processing task, so that there can be extra storage space for the upstream node to occupy. In addition, after the downstream node fails, the downstream node will not release the storage space, resulting in the downstream node gradually occupying all the storage space, while the upstream node has no extra storage space to occupy. By limiting the first amount of storage space occupied by the downstream node and limiting the first amount to be less than the total amount of storage space allocated to the image processing task, it can also ensure that the upstream node has storage space that can be occupied.

[0061] For example, assuming that the total number of storage spaces allocated to the image processing task is 5, the storage space occupied by the downstream node can be limited to less than 5. In this case, the downstream node occupies a maximum of 4 storage spaces, and one storage space will be left for the upstream node to occupy. The upstream node uses the remaining 1 storage space to cache the newly generated image frames.

[0062] Of course, when the downstream node occupies the storage space and does not release it, resulting in no available storage space at the upstream node, new storage space can be applied for the newly acquired image frames for the upstream node to occupy. However, image frames will be continuously generated, which will continuously require and release storage space, thereby occupying additional bandwidth of the system. In addition, in the field of vehicle technology, the image acquisition device has a high acquisition frame rate, a large number of image frames transmitted per second, and a large resolution of the image frame itself, resulting in a large amount of data in the image frame, which leads to greater pressure on the bandwidth for transmitting the image frames between various hardware.

[0063] In order to reduce bandwidth pressure, the embodiment of the present disclosure predetermines the total amount of storage space allocated to image processing tasks, and controls the first amount of storage space occupied by downstream nodes to be less than the total amount, to ensure that the upstream node has storage space that can be occupied. The total amount of storage space is pre-allocated, and there is no need to apply for new storage space when the downstream node occupies the storage space and does not release it, resulting in the upstream node having no available storage space. Therefore, there is no situation where storage space is constantly applied for and released, thereby reducing bandwidth pressure.

[0064] The following describes an exemplary embodiment involved in the above step S12, which is used to explain an exemplary solution for controlling the first amount of storage space occupied by downstream nodes to be smaller than the total amount, including:

[0065] Control a first quantity of storage space occupied by the downstream node to be less than or equal to a first upper limit value; the first upper limit value is less than the total quantity.

[0066] A first upper limit value of the storage space occupied by the downstream node can be limited by a limiter, which is configured between the upstream node and the downstream node. The limiter accumulates a first amount of storage space occupied by the downstream node and limits the first amount of storage space occupied by the downstream node to within a first upper limit value.

[0067] Optionally, the limiter can be configured between the preprocessing node of the upstream node and the perception node of the downstream node, so that the limiter can limit the first upper limit value of the first amount of storage space occupied by the perception node. The preprocessing node is the production end of the image in the image processing task, and the perception node is the consumption end of the image in the image processing task. Please refer to Figure 3 As shown, the limiter can be configured between the production end and the consumption end.

[0068] In addition, the image acquisition device node is also the production end of the image, and the video node is also the consumption end of the image.

[0069] The limiter adopts a bidirectional linked list structure and has a fixed capacity, which is the first upper limit value. Whenever a downstream node occupies storage space, the storage space is recorded in the limiter. When the number of recorded storage spaces reaches the maximum capacity value of the limiter, it is determined that the first number of storage spaces occupied by the downstream node has reached the first upper limit value.

[0070] For example, the capacity of the limiter is 6 storage spaces. Every time the downstream node occupies a storage space, the limiter records a storage space. When the number of storage spaces recorded by the limiter reaches 6, it is determined that the first number of storage spaces occupied by the downstream node reaches the first upper limit value.

[0071] Optionally, when a first amount of storage space occupied by the downstream node reaches a first upper limit value, the storage space to be allocated to the downstream node may be returned to the upstream node.

[0072] For example, assuming that the first upper limit value is 6 and the total number is 7, if there is storage space to be allocated to the downstream node, and the storage space occupied by the downstream node reaches 6, the storage space originally allocated to the downstream node will be returned to the upstream node, thereby avoiding the downstream node occupying all 7 storage spaces and causing the upstream node to have no storage space to occupy.

[0073] One implementation of returning the storage space to be allocated to the downstream node to the upstream node includes: releasing the storage space to be allocated to the downstream node, so that the upstream node can occupy the storage space when processing the next image frame.

[0074] Through the above technical solution, when the first amount of storage space occupied by the downstream node reaches the first upper limit value, the storage space originally to be allocated to the downstream node can be returned to the upstream node, so that the first amount of storage space occupied by the downstream node is limited within the first upper limit value. Since the first upper limit value is less than the total amount of storage space allocated to the image processing task, there is still storage space available for the upstream node to occupy in all the storage space allocated to the image processing task.

[0075] The following is an exemplary solution in which the limiter limits the first amount of storage space occupied by the downstream node to be less than or equal to the first upper limit value, including the following steps:

[0076] (1) Receive the storage address of the storage space sent by the upstream node through the limiter.

[0077] Optionally, the upstream node includes a preprocessing node, and the storage address of the storage space sent by the preprocessing node can be received through the limiter. The storage address is an identifier of the storage space, and the upstream node and the downstream node are used to access the storage space identified by the storage address according to the storage address.

[0078] See also Figure 4 As shown, the image processing device node sends the collected image frames to the storage space, and the preprocessing node occupies the storage space to preprocess the image frames. After the preprocessing is completed, the preprocessing node sends the storage address of the storage space to the limiter and the video node. The video node accesses the image frames in the storage space according to the storage address; the limiter accumulates the first number of storage addresses received according to the storage address.

[0079] (2) determining that the first number of the storage addresses accumulated by the limiter reaches the first upper limit value, and returning the storage space to be allocated to the downstream node to the upstream node.

[0080] When the limiter receives the storage address sent by the upstream node, it can first determine whether the first number of storage addresses accumulated previously has reached the first upper limit value. If it is determined that the first number of storage addresses accumulated by the limiter has reached the first upper limit value, it means that the downstream node occupies a large amount of storage space. In order to avoid the downstream node occupying all the storage space, the storage space indicated by the storage address this time can be released and returned to the upstream node to process the next image frame.

[0081] For example, see Figure 4 As shown, taking the first upper limit value of 2 as an example, when the limiter receives the storage address A sent by the upstream node, it can first determine whether the accumulated first number of storage addresses reaches 2. If reached, the storage space identified by the storage address A can be released and returned to the upstream node, so that the upstream node can occupy the storage space identified by the storage address A when processing the next image frame.

[0082] (3) Determining that the first number of the storage addresses accumulated by the limiter does not reach the first upper limit value, sending the storage address of the storage space to be allocated to the downstream node to the downstream node; and controlling the downstream node to occupy the storage space corresponding to the storage address according to the storage address.

[0083] When the limiter receives the storage address sent by the upstream node, it can first determine whether the first number of storage addresses accumulated before has reached the first upper limit value. If the first number of storage addresses accumulated by the limiter is less than the first upper limit value, it means that on the basis of ensuring that the upstream node has occupiable storage space, there is still excess storage space for the downstream node to occupy. At this time, the storage address sent by the upstream node can be forwarded to the downstream node, so that the downstream node occupies the storage space corresponding to the storage address according to the storage address, and then accesses the image frame in the storage space to analyze and process the image frame.

[0084] Optionally, when the limiter receives the storage address sent by the preprocessing node, if it is determined that the first number of the storage addresses accumulated by the limiter does not reach the first upper limit value, the storage address of the storage space to be allocated to the downstream node is sent to the downstream node.

[0085] In some scenarios, assuming that the total amount of storage space allocated to the upstream node and the downstream node is 10, the limiter limits the first amount of storage space occupied by the downstream node to not exceed the first upper limit value of 6. When the first amount of storage space occupied by the downstream node is 4, the upstream node has 6 available storage spaces to occupy; when the first amount of storage space occupied by the downstream node is 6 and reaches the first upper limit value, the upstream node still has 4 available storage spaces to occupy, and these 4 storage spaces are reserved for the upstream node and cannot be occupied by the downstream node.

[0086] It can be understood that in the above scheme, each time the limiter receives a storage address sent by an upstream node, it will add one to the first number of storage addresses previously recorded, and after determining that the release information sent by the downstream node is received, it will update the recorded first number and subtract one from the first number. The release information is used to indicate that the downstream node has released a certain storage space.

[0087] For example, assuming that the first number of storage addresses currently recorded by the limiter is 3, after receiving the storage address sent by the upstream node, the first number will be updated to 4; after receiving the release information sent by the downstream node, the first number 4 will be subtracted by one, and the updated first number is 3.

[0088] Through the above technical solution, the limiter can limit the first amount of storage space occupied by the downstream node to within the first upper limit value, and the first amount of storage space occupied by the downstream node can be arbitrarily changed within the first upper limit value to ensure that the total amount of storage space allocated to the image processing task, minus the remaining amount of storage space beyond the first upper limit value, can be occupied by the upstream node. In this process, the embodiment of the present disclosure reserves the amount of storage space that the downstream node will not occupy for the upstream node, so that no matter how much storage space the downstream node occupies within the first upper limit value, the upstream node can have storage space that can be occupied, thereby avoiding the phenomenon of a black screen of the vehicle-mounted device caused by the upstream node having no storage space to occupy.

[0089] In addition to controlling the first amount of storage space occupied by the downstream node, the second amount of storage space occupied by the upstream node may also be controlled as described below, including:

[0090] Control the second quantity of storage space occupied by the upstream node to be less than or equal to a second upper limit value; the first upper limit value is greater than the second upper limit value, and the sum of the first upper limit value and the second upper limit value is equal to the total quantity.

[0091] A first upper limit value of a first amount of storage space occupied by a downstream node may be controlled to be greater than a second upper limit value of a second amount of storage space occupied by an upstream node.

[0092] For example, the total amount of storage space allocated to the upstream node and the downstream node is 10, the first upper limit value of the first amount of storage space occupied by the downstream node can be limited to 6, and the second upper limit value of the second amount of storage space occupied by the upstream node can be limited to 4. In this way, when the storage space allocated to the upstream node and the downstream node are both occupied, it can be ensured that the amount of storage space occupied by the downstream node is greater than the amount of storage space occupied by the upstream node, so that the downstream node can have sufficient storage space to analyze and process the image frames.

[0093] Through the above technical solution, since the speed at which the downstream node processes image frames is slower than the speed at which the upstream node processes image frames, the downstream node needs to occupy the storage space for a longer time and needs a larger amount of storage space. Therefore, the first upper limit value of the first amount of storage space occupied by the downstream node can be controlled to be greater than the second upper limit value of the second amount of storage space occupied by the upstream node. When the storage space of the upstream node allocated to the image processing task and the upstream node are both occupied, it can be ensured that the amount of storage space occupied by the downstream node is greater than the amount of storage space occupied by the upstream node, so that the downstream node has more storage space to process image frames.

[0094] It is understandable that the above solution can be used not only in vehicles, but also in devices with image acquisition devices such as mobile phones and computers, and the present disclosure does not impose any restrictions on this.

[0095] Figure 5 is a block diagram of a storage space allocation device according to an exemplary embodiment. Figure 5 The storage space allocation device 500 includes: a total quantity module 510 and a restriction module 520.

[0096] A total quantity module 510 is configured to determine a total quantity of storage space allocated to an image processing task; the image processing task includes an upstream node and a downstream node, the upstream node is used to generate an image, and the downstream node is used to analyze an image;

[0097] The limiting module 520 is configured to control the first quantity of the storage space occupied by the downstream node to be smaller than the total quantity, so that the upstream node has the storage space that can be occupied.

[0098] Optionally, the limiting module 520 is further configured to control a first quantity of the storage space occupied by the downstream node to be less than or equal to a first upper limit value; the first upper limit value is less than the total quantity.

[0099] Optionally, the limiting module 520 is further configured to determine that a first amount of storage space occupied by the downstream node reaches the first upper limit value, and return the storage space to be allocated to the downstream node to the upstream node.

[0100] Optionally, the restriction module 520 includes:

[0101] A receiving submodule, configured to receive a storage address of a storage space sent by an upstream node through a limiter; the limiter is used to accumulate a first number of storage addresses sent by the upstream node;

[0102] The return submodule is configured to determine that the first number of the storage addresses accumulated by the limiter reaches the first upper limit value, and return the storage space to be allocated to the downstream node to the upstream node.

[0103] Optionally, the storage space allocation device 500 includes:

[0104] a sending module, configured to determine that the first number of the storage addresses accumulated by the limiter does not reach the first upper limit value, and send the storage address of the storage space to be allocated to the downstream node to the downstream node;

[0105] The occupation module is configured to control the downstream node to occupy the storage space corresponding to the storage address according to the storage address.

[0106] Optionally, the storage space allocation device 500 includes:

[0107] The receiving module is configured to determine that the limiter receives the release information sent by the downstream node, and update the first quantity; the release information instructs the downstream node to release the storage space.

[0108] Optionally, the storage space allocation device 500 includes:

[0109] The control module is configured to control the second amount of storage space occupied by the upstream node to be less than or equal to a second upper limit value; the first upper limit value is greater than the second upper limit value, and the sum of the first upper limit value and the second upper limit value is equal to the total amount.

[0110] Optionally, the limiter is configured between the upstream node and the downstream node.

[0111] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0112] The present disclosure also provides a computer-readable storage medium having computer program instructions stored thereon, which, when executed by a processor, implement the steps of the storage space allocation method provided by the present disclosure.

[0113] Figure 6 6 is a block diagram of a vehicle 600 according to an exemplary embodiment. For example, the vehicle 600 may be a hybrid vehicle, a non-hybrid vehicle, an electric vehicle, a fuel cell vehicle, or other types of vehicles. The vehicle 600 may be an autonomous vehicle, a semi-autonomous vehicle, or a non-autonomous vehicle.

[0114] Reference Figure 6 , the vehicle 600 may include various subsystems, for example, an infotainment system 610, a perception system 620, a decision control system 630, a drive system 640, and a computing platform 650. The vehicle 600 may also include more or fewer subsystems, and each subsystem may include multiple components. In addition, each subsystem and each component of the vehicle 600 may be interconnected by wire or wireless means.

[0115] In some embodiments, the infotainment system 610 may include a communication system, an entertainment system, and a navigation system, etc.

[0116] The perception system 620 may include several sensors for sensing information about the environment around the vehicle 600. For example, the perception system 620 may include a global positioning system (the global positioning system may be a GPS system, or a Beidou system or other positioning systems), an inertial measurement unit (IMU), a laser radar, a millimeter wave radar, an ultrasonic radar, and a camera.

[0117] The decision control system 630 may include a computing system, a vehicle controller, a steering system, a throttle, and a braking system.

[0118] The drive system 640 may include components that provide powered motion for the vehicle 600. In one embodiment, the drive system 640 may include an engine, an energy source, a transmission system, and wheels. The engine may be one or a combination of an internal combustion engine, an electric motor, and an air compression engine. The engine is capable of converting energy provided by the energy source into mechanical energy.

[0119] Some or all functions of the vehicle 600 are controlled by a computing platform 650. The computing platform 650 may include at least one first processor 651 and a first memory 652, and the first processor 651 may execute instructions 653 stored in the first memory 652.

[0120] The first processor 651 may be any conventional processor, such as a commercially available CPU. The processor may also include a graphics processor (Graphic Process Unit, GPU), a field programmable gate array (Field Programmable Gate Array, FPGA), a system on chip (System on Chip, SOC), an application specific integrated circuit (Application Specific Integrated Circuit, ASIC) or a combination thereof.

[0121] The first memory 652 can be implemented by any type of volatile or non-volatile memory device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0122] In addition to the instructions 653 , the first memory 652 may also store data, such as road maps, route information, and data such as the location, direction, and speed of the vehicle. The data stored in the first memory 652 may be used by the computing platform 650 .

[0123] In the embodiment of the present disclosure, the first processor 651 may execute instruction 653 to complete all or part of the steps of the above-mentioned storage space allocation method.

[0124] Figure 7 700 is a block diagram of a storage space allocation device according to an exemplary embodiment. For example, the device 700 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0125] Reference Figure 7 , the device 700 may include one or more of the following components: a processing component 702 , a second memory 704 , a power component 706 , a multimedia component 708 , an audio component 710 , an input / output interface 712 , a sensor component 714 , and a communication component 716 .

[0126] The processing component 702 generally controls the overall operation of the device 700, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 702 may include one or more second processors 720 to execute instructions to complete all or part of the steps of the above-mentioned method for allocating storage space. In addition, the processing component 702 may include one or more modules to facilitate the interaction between the processing component 702 and other components. For example, the processing component 702 may include a multimedia module to facilitate the interaction between the multimedia component 708 and the processing component 702.

[0127] The second memory 704 is configured to store various types of data to support operations on the device 700. Examples of such data include instructions for any application or method operating on the device 700, contact data, phone book data, messages, pictures, videos, etc. The second memory 704 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0128] The power supply component 706 provides power to the various components of the device 700. The power supply component 706 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 700.

[0129] The multimedia component 708 includes a screen that provides an output interface between the device 700 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 708 includes a front camera and / or a rear camera. When the device 700 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have focal length and optical zoom capabilities.

[0130] The audio component 710 is configured to output and / or input audio signals. For example, the audio component 710 includes a microphone (MIC), and when the device 700 is in an operation mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the second memory 704 or sent via the communication component 716. In some embodiments, the audio component 710 also includes a speaker for outputting audio signals.

[0131] The input / output interface 712 provides an interface between the processing component 702 and the peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.

[0132] The sensor assembly 714 includes one or more sensors for providing various aspects of status assessment for the device 700. For example, the sensor assembly 714 can detect the open / closed state of the device 700, the relative positioning of components, such as the display and keypad of the device 700, the sensor assembly 714 can also detect the position change of the device 700 or a component of the device 700, the presence or absence of user contact with the device 700, the orientation or acceleration / deceleration of the device 700, and the temperature change of the device 700. The sensor assembly 714 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 714 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 714 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0133] The communication component 716 is configured to facilitate wired or wireless communication between the device 700 and other devices. The device 700 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 716 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 716 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0134] In an exemplary embodiment, the apparatus 700 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to execute the above-mentioned storage space allocation method.

[0135] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a second memory 704 including instructions, and the instructions can be executed by the second processor 720 of the device 700 to complete the above storage space allocation method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0136] In another exemplary embodiment, a computer program product is further provided. The computer program product includes a computer program executable by a programmable device, and the computer program has a code portion for executing the above-mentioned storage space allocation method when executed by the programmable device.

[0137] Some embodiments of the present disclosure also provide a chip system, such as Figure 8 As shown, the chip system includes at least one third processor 801 and at least one interface circuit 802. The third processor 801 and the interface circuit 802 can be interconnected through lines. For example, the interface circuit 802 can be used to receive signals from other devices (such as the memory of the electronic device). For another example, the interface circuit 802 can be used to send signals to other devices (such as the third processor 801). Exemplarily, the interface circuit 802 can read the instructions stored in the memory and send the instructions to the third processor 801. When the instructions are executed by the third processor 801, the storage space allocation device can perform the various steps in the above embodiments. Of course, the chip system can also include other discrete devices, and some embodiments of the present disclosure do not specifically limit this.

[0138] In some embodiments of the present disclosure, the interface circuit 802 can obtain data, program instructions and / or information from the internal storage area of ​​the chip system; it can also obtain data, program instructions and / or information from outside the chip system.

[0139] Those skilled in the art may also understand that the various illustrative logical blocks and steps listed in the embodiments of the present application may be implemented by electronic hardware, computer software, or a combination of the two. Whether such functions are implemented by hardware or software depends on the specific application and the design requirements of the entire system. Those skilled in the art may use various methods to implement the functions described for each specific application, but such implementation should not be understood as exceeding the scope of protection of the embodiments of the present application.

Claims

1. A method for allocating storage space, It is characterized in that include: determining a total amount of storage space allocated to the image processing task; The image processing task includes an upstream node and a downstream node, the upstream node is used to generate an image, the downstream node is used to analyze an image, and the computational amount of the downstream node is greater than the computational amount of the upstream node; the upstream node and the downstream node occupy the storage space to access the image frames cached in the storage space; The first amount of storage space occupied by the downstream node is controlled to be smaller than the total amount, so that the upstream node has storage space that can be occupied.

2. The method according to claim 1, It is characterized in that The controlling the first amount of storage space occupied by the downstream node to be smaller than the total amount includes: Control a first quantity of storage space occupied by the downstream node to be less than or equal to a first upper limit value; the first upper limit value is less than the total quantity.

3. The method according to claim 2, It is characterized in that The controlling the first amount of storage space occupied by the downstream node to be less than or equal to a first upper limit value includes: It is determined that a first amount of storage space occupied by the downstream node reaches the first upper limit value, and the storage space to be allocated to the downstream node is returned to the upstream node.

4. The method according to claim 3, It is characterized in that The determining that the first amount of storage space occupied by the downstream node reaches the first upper limit value, and returning the storage space to be allocated to the downstream node to the upstream node, includes: Receiving a storage address of a storage space sent by an upstream node through a limiter; the limiter is used to accumulate a first number of storage addresses sent by the upstream node; It is determined that the first number of the storage addresses accumulated by the limiter reaches the first upper limit value, and the storage space to be allocated to the downstream node is returned to the upstream node.

5. The method according to claim 4, It is characterized in that The method further comprises: determining that the first number of the storage addresses accumulated by the limiter does not reach the first upper limit value, and sending the storage address of the storage space to be allocated to the downstream node to the downstream node; The downstream node is controlled to occupy a storage space corresponding to the storage address according to the storage address.

6. The method according to claim 4, It is characterized in that The method further comprises: It is determined that the limiter receives release information sent by the downstream node, and updates the first quantity; the release information instructs the downstream node to release storage space.

7. The method according to claim 2, It is characterized in that The method comprises: Control the second quantity of storage space occupied by the upstream node to be less than or equal to a second upper limit value; the first upper limit value is greater than the second upper limit value, and the sum of the first upper limit value and the second upper limit value is equal to the total quantity.

8. The method according to any one of claims 4 to 6, It is characterized in that The limiter is arranged between the upstream node and the downstream node.

9. A storage space allocation device, It is characterized in that include: a total quantity module configured to determine a total quantity of storage space allocated to the image processing task; The image processing task includes an upstream node and a downstream node, the upstream node is used to generate an image, the downstream node is used to analyze an image, and the computational amount of the downstream node is greater than the computational amount of the upstream node; the upstream node and the downstream node occupy the storage space to access the image frames cached in the storage space; The limiting module is configured to control the first quantity of the storage space occupied by the downstream node to be smaller than the total quantity so that the upstream node has the storage space that can be occupied.

10. A vehicle, It is characterized in that include: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to: Execute the steps of the method according to any one of claims 1 to 8.

11. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the method described in any one of claims 1 to 8 are implemented.

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