CN116302508B - High-speed distributed image synthesis method and system for space application - Google Patents
High-speed distributed image synthesis method and system for space application Download PDFInfo
- Publication number
- CN116302508B CN116302508B CN202310170397.8A CN202310170397A CN116302508B CN 116302508 B CN116302508 B CN 116302508B CN 202310170397 A CN202310170397 A CN 202310170397A CN 116302508 B CN116302508 B CN 116302508B
- Authority
- CN
- China
- Prior art keywords
- image data
- image
- data packet
- distributed
- message queue
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000001308 synthesis method Methods 0.000 title claims abstract description 15
- 230000015572 biosynthetic process Effects 0.000 claims abstract description 49
- 238000003786 synthesis reaction Methods 0.000 claims abstract description 49
- 230000010076 replication Effects 0.000 claims abstract description 21
- 238000000034 method Methods 0.000 claims abstract description 17
- 239000000872 buffer Substances 0.000 claims abstract description 15
- 230000003139 buffering effect Effects 0.000 claims description 4
- 238000004590 computer program Methods 0.000 claims description 3
- 230000002194 synthesizing effect Effects 0.000 claims 3
- 230000006870 function Effects 0.000 abstract description 10
- 238000012545 processing Methods 0.000 abstract description 6
- 238000010586 diagram Methods 0.000 description 8
- 238000002474 experimental method Methods 0.000 description 7
- 238000004891 communication Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 238000003780 insertion Methods 0.000 description 2
- 230000037431 insertion Effects 0.000 description 2
- 238000012795 verification Methods 0.000 description 2
- 241000283715 Damaliscus lunatus Species 0.000 description 1
- 238000013459 approach Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000013467 fragmentation Methods 0.000 description 1
- 238000006062 fragmentation reaction Methods 0.000 description 1
- 230000009191 jumping Effects 0.000 description 1
- 230000007246 mechanism Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000002688 persistence Effects 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 230000011218 segmentation Effects 0.000 description 1
- 238000012163 sequencing technique Methods 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5061—Partitioning or combining of resources
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/52—Program synchronisation; Mutual exclusion, e.g. by means of semaphores
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/544—Buffers; Shared memory; Pipes
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T1/00—General purpose image data processing
- G06T1/20—Processor architectures; Processor configuration, e.g. pipelining
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/50—Image enhancement or restoration by the use of more than one image, e.g. averaging, subtraction
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1095—Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20212—Image combination
- G06T2207/20221—Image fusion; Image merging
-
- Y—GENERAL 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
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE 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/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention relates to the technical field of image acquisition, and discloses a high-speed distributed image synthesis method and system for space application, wherein the method comprises the following steps: caching the image data packet pushed by the ground receiving system through a message queue and copying the flow; and acquiring the image data packet subjected to flow replication in the message queue in real time through a plurality of cluster servers, and performing concurrent image synthesis by using a distributed lock. The invention buffers the high-speed data issued by the space station through the message queue, and provides fault tolerance guarantee for the speed of downstream data processing; according to the provided functions of the message queue, the same data can be pushed to different servers, so that the flow replication function is realized; the parallel image synthesis is realized through the distributed system, the problems of multi-input equipment, disordered image frames and high-speed image synthesis under high concurrency are solved, and the efficiency of inclusion of disassembled high-speed downlink multi-source disordered image data into images is greatly improved.
Description
Technical Field
The invention relates to the technical field of image acquisition, in particular to a high-speed distributed image synthesis method and system for space application.
Background
In the field of image acquisition, a common application scenario is that a single high-speed camera acquires images at an ultrafast rate, and three-level caching technology is used for caching image data layer by layer until the image data is last durable. If the original image is required to be transmitted through a network, the original image is firstly disassembled into image frames, then the data are packed layer by using a standard network 7-layer protocol, the receiving end unpacks the data according to the standard network 7-layer protocol, and after unpacking, the image is spliced and synthesized according to a start and end mark in the image frames.
The space station is provided with a large number of image acquisition devices, after acquiring image data, the acquisition devices are firstly transmitted to a server cluster deployed in the space station, and the server disassembles and packages the original image into data packets conforming to the world communication protocol and transmits the data by specialized instruments in the space station. At the entrance of the ground system, the data of the heaven-earth protocol is unpacked.
In the on-orbit experiment process, ground scientists need to quickly judge the load state or the experiment progress according to the image data, make decisions and timely control the load, so that the real-time inclusion of disassembled high-speed downlink multisource disordered image data into images faces a great challenge.
Disclosure of Invention
The invention aims to solve the technical problems existing in the prior art and provides a high-speed distributed image synthesis method and system for space application.
In order to solve the technical problems, the invention provides a high-speed distributed image synthesis method facing space application, which comprises the following steps: caching image data packets pushed by a ground receiving system through a message queue, and carrying out flow copying, wherein the image data packets are generated for a plurality of image acquisition devices in a space station and are issued to the ground receiving system; and acquiring the flow-replicated image data packets in the message queue in real time through a plurality of cluster servers, and performing concurrent image synthesis by using a distributed lock.
In order to solve the technical problem, the present invention further provides a high-speed distributed image synthesis system facing to space application, including: a message queue, a plurality of cluster servers, and a distributed lock; the message queue receives an image data packet pushed by the ground receiving system and performs flow copying, and the image data packet is generated for a plurality of image acquisition devices in the space station and is issued to the ground receiving system; and the plurality of cluster servers acquire the image data packets subjected to flow replication in the message queue in real time, and perform concurrent image synthesis by using a distributed lock.
In order to solve the technical problem, the invention also provides a high-speed distributed image synthesis system facing to the space application, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the high-speed distributed image synthesis method facing to the space application provided by the technical scheme is realized when the processor executes the program.
The beneficial effects of the invention are as follows: the high-speed data issued by the space station is buffered through the message queue, so that fault tolerance guarantee is provided for the speed of downstream data processing; according to the provided functions of the message queue, the same data can be pushed to different servers, so that the flow replication function is realized; the plurality of cluster servers acquire the image data packets subjected to flow replication in the message queue in real time, and perform concurrent image synthesis by using the distributed locks, so that the problems of multi-input equipment, disordered image frames and high-speed image synthesis under high concurrency are solved, and the efficiency of inclusion of disassembled high-speed downlink multi-source disordered image data into images is greatly improved.
Additional aspects of the invention and advantages thereof will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
Drawings
FIG. 1 is a flow chart of a high-speed distributed image synthesis method for space application provided by an embodiment of the invention;
FIG. 2 is a schematic diagram of a message queue core provided in an embodiment of the present invention;
FIG. 3 is a flowchart of an application distributed lock according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a distributed lock provided by an embodiment of the present invention;
FIG. 5 is a schematic diagram of an image data packet format according to an embodiment of the present invention;
FIG. 6 is a flowchart of image synthesis according to an embodiment of the present invention;
fig. 7 is a schematic diagram of hash fragmentation according to a device ID in a data packet according to an embodiment of the present invention;
fig. 8 is a schematic diagram of performing hash slicing again according to the image acquisition time recorded in the data packet according to the embodiment of the present invention;
fig. 9 is a schematic structural diagram of buffering an image data packet by using a data structure of a TreeMap ordered tree according to an embodiment of the present invention;
FIG. 10 is a schematic diagram of a high-speed distributed image synthesis system for space-oriented applications according to an embodiment of the present invention;
fig. 11 is a block diagram of a high-speed distributed image synthesis system for space application according to an embodiment of the present invention.
Detailed Description
Other advantages and effects of the present disclosure will become readily apparent to those skilled in the art from the following disclosure, which describes embodiments of the present disclosure by way of specific examples. It will be apparent that the described embodiments are only some, but not all, of the embodiments of the present disclosure. The disclosure may be embodied or practiced in other different specific embodiments, and details within the subject specification may be modified or changed from various points of view and applications without departing from the spirit of the disclosure. It should be noted that the following embodiments and features in the embodiments may be combined with each other without conflict. All other embodiments, which can be made by one of ordinary skill in the art without inventive effort, based on the embodiments in this disclosure are intended to be within the scope of this disclosure.
It is noted that various aspects of the embodiments are described below within the scope of the following claims. It should be apparent that the aspects described herein may be embodied in a wide variety of forms and that any specific structure and/or function described herein is merely illustrative. Based on the present disclosure, one skilled in the art will appreciate that one aspect described herein may be implemented independently of any other aspect, and that two or more of these aspects may be combined in various ways. For example, an apparatus may be implemented and/or a method practiced using any number of the aspects set forth herein. In addition, such apparatus may be implemented and/or such methods practiced using other structure and/or functionality in addition to one or more of the aspects set forth herein.
The embodiment of the invention is used for disassembling the original picture data according to the world transmission protocol after the plurality of image acquisition devices in the space station acquire the images, and the ground receiving system rapidly re-synthesizes the images after receiving the data.
Fig. 1 is a flowchart of a high-speed distributed image synthesis method for space application according to an embodiment of the present invention. As shown in fig. 1, the method includes:
s1, caching an image data packet pushed by a ground receiving system through a message queue, copying the flow, generating the image data packet for a plurality of image acquisition devices in a space station, and transmitting the image data packet to the ground receiving system.
A message queue core schematic is shown in fig. 2. The message queue may be divided into a plurality of topic names Topi c. Top 1, top c2 and Top 3 in FIG. 2 represent different Topic names, respectively. In practical applications, the name of Topic will be named according to the actual needs, provided that the producer (space station) and consumer (ground system) know the name of Topic at the same time. In the embodiment of the invention, 3 Topic are TGTH, TGMT and TGWT respectively, and represent a Tiangong Tianhe experiment cabin, a Tiangong Meng Tian experiment cabin and a Tiangong Suan experiment cabin. The embodiment of the invention is designed to divide the data into 3 Top ic received data (the message queue has a message persistence mechanism (stored on a hard disk or persisted)) by setting different topic names, thereby facilitating the retrieval and fault detection of subsequent data.
Message queues may implement traffic replication across multiple groups. As shown in fig. 2, group1 and Group2 represent two groups, each Group may have several servers (or only one server) inside, and the same data may be consumed between different groups, where the same data may only be consumed by one server if there are multiple servers inside the same Group. Therefore, different groups are used to consume the same Top ic, and the effect of flow replication can be achieved.
The message queue middleware of the embodiment of the invention can adopt a kafka message queue. The kafka message queue is more focused on batch processing of streaming data, and is suitable for streaming by splitting original image data into data frames in the application scene. The kafka message queue is the middleware with the highest throughput in comparison with other message queues. The comparison results are shown in Table 1:
TABLE 1
S2, obtaining the image data packet subjected to flow copying in the message queue in real time through a plurality of cluster servers, and performing concurrent image synthesis by using a distributed lock.
In the embodiment of the invention, the ground receiving system is responsible for receiving 1.1Gb/s real-time disordered data issued by all image acquisition equipment of a space station and pushing the data to a message queue in a distributed image synthesis system; the message queue is responsible for receiving a large number of image data packets sent to the ground by the space station, and buffering high-speed data issued by the space station through the message queue so as to provide fault tolerance guarantee for the speed of downstream data processing; and according to the provided function of the message queue, the same data can be pushed to different servers to realize the function of flow replication. The cluster servers acquire the image data packets subjected to flow replication in the message queues in real time, and perform concurrent image synthesis by using the distributed locks, so that the problems of multi-input equipment, disordered image frames and high-speed image synthesis under high concurrency are solved, and the efficiency of inclusion of disassembled high-speed downlink multi-source disordered image data into images is greatly improved.
Optionally, in one embodiment, the obtaining, by a plurality of cluster servers, the image data packet of the message queue subjected to the traffic copy in real time, and performing the concurrent image synthesis by using the distributed lock includes: caching the image data packet subjected to flow replication in the message queue into each cluster server of the plurality of cluster servers; when the cluster server receives the image data packet with the start mark, the distributed lock is applied, and an image synthesis task is created after the distributed lock is applied successfully; all other cluster servers which receive the image data packet with the start mark but fail to apply for the distributed lock clear the image data packet related to the image synthesis task in the local cache; the cluster server obtaining the distributed lock performs image composition after collecting all image data packets related to the image composition task.
According to the embodiment of the invention, the image data packets in the information queue are pulled in real time through the plurality of cluster servers, any image data packet is cached in each server in the cluster, and each cluster server determines whether to create a synthetic task of a certain image by judging the start and end marks in the image data packet. When a server in the distributed system pulls a picture to start the picture mosaic flag packet, a distributed lock is applied. When the subsequent server also receives the data packet with the starting jigsaw standard, the subsequent server applies for the distributed lock, the lock application can fail due to the mutual exclusivity of the lock, and the server which fails to apply for the lock can clear all the data packets related to the image in the local cache. And the server obtaining the lock sorts the disordered data packets according to the packet sequence numbers in the same picture, and finally writes the data into the picture file.
The distributed system pulls the data of the information queue, and creates a task for generating an image according to whether the flag bit of the data packet and the application of the distributed lock are successful. The creation task is that the packets are out of order after passing through the world protocol, so that the remaining packets of the image are not necessarily packed after receiving the packets with the start tag. To ensure the effectiveness of the graph, an asynchronous image creation task is submitted, and a series of logic for image synthesis is executed by the asynchronous task.
Multiple cluster servers of the distributed system simultaneously pull data to different groups of kafka servers. The same message packets arrive at the server in a sequential order due to network speed. When one of the servers first takes a start marking data packet of an image, the server applies for the distributed lock to the red is middleware, and an image synthesis task is created after the application is successful. After the other servers again acquire the start tag packet for the image, the distributed lock will fail to apply, at which point the current server will delete the cache of the picture and filter out the packet for the image as new packets are received.
The embodiment of the invention adopts red is to perform the function of the distributed lock, and the application flow of the distributed lock body is shown in figure 3. When a machine applies for a distributed lock to red is, a setnx key va l ue ex exp i ret ime command is sent, where setnx represents setting a key with a value va l ue, if the key already exists, canceling the setting of the current value, and returning failure. ex is an abbreviation for expi re, followed by expi ret time, which is expiration time in seconds by default.
For example, the complete command is: setnx a3o1meq l_1667903286server1 ex 100sa3o1meq6_1667903286 is a key, where a3o1meq6 is a device ID,1667905384 represents an image acquisition time; server1 is a value representing the server name, and may be replaced by a i p address (the significance of the value is primarily to distinguish which server applied for the lock; ex 100s represents that the current lock expires 100 seconds later).
The distributed lock principle is shown in fig. 4. As can be seen from fig. 4, the distributed lock has mutex, lock timeout release, reentrant, high availability, high performance, and security. Wherein, mutual exclusivity refers to any moment, only one client can hold a lock; the lock overtime releasing means holding lock overtime, and can release and prevent lock death; re-entrant refers to that after a thread acquires a lock, the thread can request the lock again; the high availability and high performance flail lock and unlocking require the lowest cost as possible, and meanwhile, the high availability is ensured; security refers to locks that can only be deleted by a held client and cannot be deleted by other clients.
The embodiment of the invention solves the problem of high concurrency and data packet disorder by creating an asynchronous task. After creating the image composition task, the task is added to the asynchronous task pool. If threads exist in the asynchronous task pool, each thread executes an infinite loop, namely, a task is taken out from the task pool, all data packets received by the image task are taken out from the cache through relevant information of the task, and verification is carried out. If the data packet is complete, directly jumping to the graph writing method, if the data packet is incomplete, re-adding the task into the task pool, and re-acquiring a new task from the task pool to repeat the operation.
Before understanding the specific flow chart, the format of the lower image data packet will be described to facilitate understanding of each operation. The image data packet format is shown in fig. 5.
The source packet data is binary source code data packet with indefinite length, and the longest is not more than 2KB.
Device I D (dev ice id): the only I D of the space station payload video acquisition device, different devices generate image data with different coding formats, different code rates and different resolutions;
packet sequence number (sequence no): the packet sequence number of the source packet acquired by each starting up of each device is increased from 0 to 0x7FFF and then overturned to 0;
time code (co l l ect i ont ime): the unit of time for each load source packet to be collected on the space station is microsecond;
effective length: the length of the valid data in the data field;
data field: storing the image data packet and the image related auxiliary information in a data field;
CRC: and (3) CRC checksum.
Forced graph logic introduction: when the data packet of one picture loses the packet due to the instability of communication, the asynchronous task always checks the total packet number which does not pass through the picture when the picture is synthesized. At this time, the data of the picture can permanently reside in the memory and can never be released, and the verification resource can be consumed.
There is a need for a strategy to clear such data, the simplest approach being certainly to delete directly over time, but due to the rigor of scientific experiments, despite the missing part of the data packet of the image, the already owned part may also have key information for the experiment.
The embodiment of the invention adopts a forced drawing measure, namely when a picture exceeds a threshold time and a data packet is not collected, the missing data packet is filled according to the information such as the packet sequence number and the metadata of the picture. The specific filling rules depend on the needs of the scientist, in most cases there are two types: 1. the pixels in the missing data packet are directly padded with 0 (black). 2. And filling pixels at the same position of the upper row or the lower row of the pixels in the missing data packet according to the row-column sequence.
The specific flow of image synthesis is shown in fig. 6. The server in the distributed system pulls the image data packet from the message queue, judges whether the image data packet required by the current image synthesis task is complete, if the image data packet is complete, the image is mapped, and the task is deleted from the task pool; if the data is incomplete and the existing time of the current task exceeds a preset threshold value, forcing a graph, and deleting the task from the task pool.
In the embodiment of the invention, due to the huge downlink flow, when a server in a distributed system pulls data of an information queue, a data frame which is not a start end mark is cached for consumption in the subsequent task drawing. At this time, a problem is faced in that a large amount of image frame information is cached in the server, and when the image synthesis task starts, how to quickly find a data frame related to the current task in an ultra-large amount of data is also a difficult problem. In this regard, the present solution proposes a solution for slice ordering, which specifically implements a combination of Hash slices and TreeSet ordering. The specific implementation is as follows:
1. firstly, hash slicing is carried out according to the device ID in the image data packet, so that the data generated by the same device can be ensured to be put into the same cache. The result of the segmentation is shown in FIG. 7.
2. The hash slicing is carried out again according to the image acquisition time recorded in the image data packet, and the data frames of different pictures can be effectively distinguished by the step of the method because the image frames disassembled by the same image share one time code. Taking the buffer area of the device 1 as an example, the internal structure is shown in fig. 8 below.
3. After the two-time slicing, the embodiment of the invention uses the data structure of the TreeMap to cache the image data packet. TreeMap is a data structure of an ordered tree, the ordering rule can be customized, and the time complexity of data insertion depends on the number of layers of the tree.
In the embodiment of the invention, the packet sequence numbers in the data packet information are used for sequencing. In practical application, it is found that a picture usually needs to be composed of 1000-2000 data packets, and according to calculation, the number of layers of the inserted TreeMap can reach 10-11 layers, so that in popular terms, each new data packet, the data structure in the TreeMap needs to be compared for at most 10 times and then the data can be placed at the correct position by adding the transformation of the tree structure.
When the embodiment of the invention creates the buffer area for the current image, whether the current buffer area stores more than preset data (the preset value can be 127 because the acquisition interval of two images is far more than 20 milliseconds), if so, the current TreeMap is directly inserted, and if so, a buffer area is newly added, wherein the key of the buffer area is the time code of the current image plus the preset time length (for example, the preset time length takes 1 millisecond). Thus, only the buffer area needs to be circularly fetched, and the preset time length is continuously added according to the current picture time code until a nul buffer area is fetched, and the nul buffer area is the buffer area of the current picture. The problem of too high data insertion time caused by too many TreeMap layers can be greatly reduced through the operation. The specific structure is shown in fig. 9.
The embodiment of the invention also provides a high-speed distributed image synthesis system facing the space application. As shown in fig. 10, the system includes two parts, namely a platform layer and a resource layer from the architecture. The resource layer in the scheme is a private cloud platform, and all middleware and application services are uniformly deployed on the cloud platform; the platform layer is responsible for providing a series of middleware, kafka message queue middleware for ensuring high throughput of traffic, and red is an uncorrelated memory database for realizing distributed locks.
As shown in fig. 11, the embodiment of the invention further provides a high-speed distributed image synthesis system facing to space application. The system comprises a message queue, a plurality of cluster servers and a distributed lock; the message queue receives an image data packet pushed by the ground receiving system and performs flow replication, and the image data packet is generated by a plurality of image acquisition devices in the space station and is sent to the ground receiving system; and the plurality of cluster servers acquire the image data packets subjected to flow replication in the message queue in real time, and perform concurrent image synthesis by using a distributed lock.
In the embodiment of the invention, the ground receiving system is responsible for receiving 1.1Gb/s real-time disordered data issued by all image acquisition equipment of a space station and pushing the data to a message queue in a distributed image synthesis system; the message queue is responsible for receiving a large number of image data packets sent to the ground by the space station, and buffering high-speed data issued by the space station through the message queue so as to provide fault tolerance guarantee for the speed of downstream data processing; and according to the provided function of the message queue, the same data can be pushed to different servers to realize the function of flow replication. The cluster servers acquire the image data packets subjected to flow replication in the message queues in real time, and perform concurrent image synthesis by using the distributed locks, so that the problems of multi-input equipment, disordered image frames and high-speed image synthesis under high concurrency are solved, and the efficiency of inclusion of disassembled high-speed downlink multi-source disordered image data into images is greatly improved.
The embodiment of the invention also provides a high-speed distributed image synthesis system facing the space application, which comprises a memory, a processor and a computer program stored on the memory and capable of running on the processor, wherein the processor realizes the high-speed distributed image synthesis method facing the space application when executing the program.
According to the unique multi-input-end image synthesis and acquisition scheme provided by the embodiment of the invention, the image data packets are cached through the message queue and flow is cached, and then the parallel image synthesis is performed by using the distributed system, so that the synthesis delay of the high downlink rate and disordered image data is greatly reduced.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described system and unit may refer to corresponding procedures in the foregoing method embodiments, and are not repeated herein.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of elements is merely a logical functional division, and there may be additional divisions of actual implementation, e.g., multiple elements or components may be combined or integrated into another system, or some features may be omitted, or not performed.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiment of the present invention.
In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention is essentially or a part contributing to the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods of the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, randomAccess Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing description of the preferred embodiments of the invention is not intended to limit the invention to the precise form disclosed, and any such modifications, equivalents, and alternatives falling within the spirit and scope of the invention are intended to be included within the scope of the invention.
Claims (9)
1. A high-speed distributed image synthesis method for space application, comprising:
caching image data packets pushed by a ground receiving system through a message queue, and carrying out flow copying, wherein the image data packets are generated for a plurality of image acquisition devices in a space station and are issued to the ground receiving system;
the image data packet subjected to flow replication in the message queue is obtained in real time through a plurality of cluster servers, and concurrent image synthesis is carried out by using a distributed lock;
the method for obtaining the image data packet subjected to flow replication in the message queue in real time through a plurality of cluster servers, and performing concurrent image synthesis by using a distributed lock comprises the following steps:
caching the image data packet subjected to flow replication in the message queue into each cluster server of the plurality of cluster servers;
the cluster server applies for a distributed lock when receiving an image data packet with a start mark, and an image synthesis task is created after the distributed lock is applied successfully;
all other cluster servers which receive the image data packet with the start mark but fail to apply for the distributed lock clear the image data packet related to the image synthesis task in the local cache;
and the cluster server obtaining the distributed lock performs image synthesis after collecting all the image data packets related to the image synthesis task.
2. The method for synthesizing a high-speed distributed image for space application according to claim 1, further comprising timing from the creation of the image synthesizing task, and if the cluster server obtaining the distributed lock has not collected all image data packets related to the image synthesizing task for more than a preset time, filling the missing image data packets and then forcing the image to be formed.
3. The high-speed distributed image synthesis method for space-oriented applications according to claim 2, wherein the padding the missing image data packets comprises:
the pixels in the missing image data packet are directly filled with black, or the pixels in the missing image data packet are filled with pixels at the same position in the upper row or the lower row of the row-column sequence.
4. A high-speed distributed image synthesis method according to any of claims 1 to 3 and wherein said cluster server obtains the image data packets in said message queue subjected to traffic replication and then caches said image data packets in a slice ordering manner.
5. The method for spatial application-oriented high-speed distributed image synthesis according to claim 4, wherein said buffering said image data packets by means of a slice ordering comprises:
performing hash slicing according to the equipment ID in the image data packet;
performing hash slicing again according to the image acquisition time recorded in the image data packet;
and caching the image data packet by using a data structure of the TreeMap ordered tree.
6. The method for spatial application-oriented high-speed distributed image synthesis according to claim 5, wherein the caching the image data packet using the data structure of the TreeMap ordered tree comprises:
if the data volume in the current buffer area of the data structure of the TreeMap ordered tree is smaller than a preset value, the image data packet is directly inserted into the current buffer area;
otherwise, a buffer area is newly added, and the key of the newly added buffer area is the time code of the current image data packet plus the preset duration; and so on until a null buffer is fetched.
7. The spatially-oriented high-speed distributed image synthesis method according to claim 6, wherein the preset value is 127 and the preset duration is 1 millisecond.
8. A high-speed distributed image compositing system for space-oriented applications, comprising: a message queue, a plurality of cluster servers, and a distributed lock;
the message queue receives an image data packet pushed by the ground receiving system and performs flow copying, and the image data packet is generated for a plurality of image acquisition devices in the space station and is issued to the ground receiving system;
the plurality of cluster servers acquire the image data packets subjected to flow replication in the message queue in real time, and perform concurrent image synthesis by using a distributed lock;
the image data packet subjected to flow replication in the message queue is obtained in real time through a plurality of cluster servers, and concurrent image synthesis is performed by using a distributed lock, and the method comprises the following steps:
caching the image data packet subjected to flow replication in the message queue into each cluster server of the plurality of cluster servers;
the cluster server applies for a distributed lock when receiving an image data packet with a start mark, and an image synthesis task is created after the distributed lock is applied successfully;
all other cluster servers which receive the image data packet with the start mark but fail to apply for the distributed lock clear the image data packet related to the image synthesis task in the local cache;
and the cluster server obtaining the distributed lock performs image synthesis after collecting all the image data packets related to the image synthesis task.
9. A space application oriented high speed distributed image synthesis system comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the space application oriented high speed distributed image synthesis method according to any one of claims 1 to 7 when executing the program.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310170397.8A CN116302508B (en) | 2023-02-27 | 2023-02-27 | High-speed distributed image synthesis method and system for space application |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310170397.8A CN116302508B (en) | 2023-02-27 | 2023-02-27 | High-speed distributed image synthesis method and system for space application |
Publications (2)
Publication Number | Publication Date |
---|---|
CN116302508A CN116302508A (en) | 2023-06-23 |
CN116302508B true CN116302508B (en) | 2023-12-22 |
Family
ID=86812467
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310170397.8A Active CN116302508B (en) | 2023-02-27 | 2023-02-27 | High-speed distributed image synthesis method and system for space application |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116302508B (en) |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103338353A (en) * | 2013-06-17 | 2013-10-02 | 中国人民银行印制科学技术研究所 | Image acquisition, transmission and storage system |
CN109582466A (en) * | 2017-09-29 | 2019-04-05 | 北京金山软件有限公司 | A kind of timed task executes method, distributed server cluster and electronic equipment |
CN111259030A (en) * | 2020-01-16 | 2020-06-09 | 平安医疗健康管理股份有限公司 | Thread execution method and device based on distributed lock and storage medium |
CN111314350A (en) * | 2020-02-19 | 2020-06-19 | 深圳中兴网信科技有限公司 | Image storage system, storage method, calling system and calling method |
CN111897646A (en) * | 2020-08-13 | 2020-11-06 | 银联商务股份有限公司 | Asynchronous distributed lock implementation method and device, storage medium and electronic equipment |
CN115103234A (en) * | 2022-06-07 | 2022-09-23 | 慧之安信息技术股份有限公司 | Image remote transmission method based on RTP |
CN115576677A (en) * | 2022-12-08 | 2023-01-06 | 中国科学院空天信息创新研究院 | Task flow scheduling management system and method for rapidly processing batch remote sensing data |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9081839B2 (en) * | 2011-01-28 | 2015-07-14 | Oracle International Corporation | Push replication for use with a distributed data grid |
-
2023
- 2023-02-27 CN CN202310170397.8A patent/CN116302508B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103338353A (en) * | 2013-06-17 | 2013-10-02 | 中国人民银行印制科学技术研究所 | Image acquisition, transmission and storage system |
CN109582466A (en) * | 2017-09-29 | 2019-04-05 | 北京金山软件有限公司 | A kind of timed task executes method, distributed server cluster and electronic equipment |
CN111259030A (en) * | 2020-01-16 | 2020-06-09 | 平安医疗健康管理股份有限公司 | Thread execution method and device based on distributed lock and storage medium |
CN111314350A (en) * | 2020-02-19 | 2020-06-19 | 深圳中兴网信科技有限公司 | Image storage system, storage method, calling system and calling method |
CN111897646A (en) * | 2020-08-13 | 2020-11-06 | 银联商务股份有限公司 | Asynchronous distributed lock implementation method and device, storage medium and electronic equipment |
CN115103234A (en) * | 2022-06-07 | 2022-09-23 | 慧之安信息技术股份有限公司 | Image remote transmission method based on RTP |
CN115576677A (en) * | 2022-12-08 | 2023-01-06 | 中国科学院空天信息创新研究院 | Task flow scheduling management system and method for rapidly processing batch remote sensing data |
Also Published As
Publication number | Publication date |
---|---|
CN116302508A (en) | 2023-06-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104025521B (en) | Content transmission system, optimize the method for network traffics in this system, central control unit and local cache device | |
WO2017071512A1 (en) | Cloud storage and cloud download methods for multimedia data and related devices | |
CN107615756B (en) | Video server, method and video system for realizing rapid and smooth viewpoint switching | |
CN102111685B (en) | Acceleration method, equipment and system for network video loading | |
WO2016150049A1 (en) | Method, device, and system for loading and displaying image | |
US10547705B2 (en) | Caching proxy method and apparatus | |
RU2007133104A (en) | DIGITAL INTERMEDIATE (CPU) PROCESSING AND DISTRIBUTION WITH SCALABLE COMPRESSION WHEN POST-PROCESSING MOVIES | |
DE112020006664T5 (en) | OUTSOURCING STREAMING PROTOCOL PACKET FORMATION | |
CN111447455A (en) | Live video stream playback processing method and device and computing equipment | |
US10263920B2 (en) | Enhanced acknowledgement handling in communication packet transfer | |
CN104113599B (en) | A kind of caching method, device and proxy server | |
CN108234594A (en) | File memory method and device, electronic equipment, program and medium | |
CN105786629A (en) | Data processing method based on message queue | |
CN116302508B (en) | High-speed distributed image synthesis method and system for space application | |
CN111541903A (en) | Live broadcast acceleration method, source station end, edge node, client and live broadcast system | |
CN105117401B (en) | A kind of method, apparatus and system of parallel transmission picture | |
US7412454B2 (en) | Data structure supporting random delete and timer function | |
CN110545489A (en) | self-adaptive streaming media playing method, system and client | |
CN107027052B (en) | The method and system of frame per second adaptively drop in SVC video | |
CN106791908A (en) | A kind of live video stream storage method for supporting cloud platform using double buffering | |
CN115297095B (en) | Back source processing method, device, computing equipment and storage medium | |
CN103067419B (en) | A kind of distributed file system and the method controlling file storage within the system | |
US9465779B2 (en) | Microblog-based document file sharing method and device | |
Shieh et al. | A stateless approach to connection-oriented protocols | |
CN109783570A (en) | A kind of cross-border case data ferry-boat implementation method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |