CN110716929B - Control and deployment processing method, device and equipment - Google Patents
Control and deployment processing method, device and equipment Download PDFInfo
- Publication number
- CN110716929B CN110716929B CN201810771075.8A CN201810771075A CN110716929B CN 110716929 B CN110716929 B CN 110716929B CN 201810771075 A CN201810771075 A CN 201810771075A CN 110716929 B CN110716929 B CN 110716929B
- Authority
- CN
- China
- Prior art keywords
- deployment
- data
- control
- information table
- matched
- 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
- 238000003672 processing method Methods 0.000 title claims abstract description 21
- 238000012545 processing Methods 0.000 claims abstract description 47
- 230000014509 gene expression Effects 0.000 claims description 19
- 230000006870 function Effects 0.000 claims description 16
- 230000036961 partial effect Effects 0.000 claims description 4
- 238000001914 filtration Methods 0.000 claims 4
- 238000000034 method Methods 0.000 description 25
- 230000008569 process Effects 0.000 description 14
- 230000002829 reductive effect Effects 0.000 description 8
- 238000012806 monitoring device Methods 0.000 description 6
- 238000010586 diagram Methods 0.000 description 4
- 239000003086 colorant Substances 0.000 description 3
- 238000012544 monitoring process Methods 0.000 description 3
- 238000004590 computer program Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000000670 limiting effect Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 230000009286 beneficial effect Effects 0.000 description 1
- 230000005540 biological transmission Effects 0.000 description 1
- 230000000903 blocking effect Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 230000008878 coupling Effects 0.000 description 1
- 238000010168 coupling process Methods 0.000 description 1
- 238000005859 coupling reaction Methods 0.000 description 1
- 230000003247 decreasing effect Effects 0.000 description 1
- 238000012423 maintenance Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention provides a control arrangement processing method, a control arrangement processing device and control arrangement processing equipment, wherein the control arrangement processing method comprises the following steps: acquiring target object data; determining a control condition matched with the object identification in an established control information table according to the object identification in the target object data; and checking whether the deployment associated data in the target object data are matched with the deployment conditions, if so, performing deployment processing on the target object data.
Description
Technical Field
The invention relates to a control method, a control device and control equipment.
Background
The control is to control the object to be detected, and usually generates corresponding target object data when the object is monitored, and the control is performed by using the target object data to determine whether the object is the object to be detected. For example, the vehicle is controlled, the passing vehicle is monitored at the monitoring gate, the information such as the license plate number of the vehicle is obtained, and the information is compared with the control data, so that whether the vehicle is the object to be detected can be determined.
The structure of the in-memory database is not changed after being determined in the memory, and the structure is redesigned even if the subtle part is changed. In the related control processing mode, the memory database is used to determine the object data with matched conditions, so that more redundancy comparison processes are generated: when each record in the memory database is traversed for comparison, all data to be compared in the object data need to be compared with corresponding comparison conditions in the record one by one, for example, when the target object data comprise license plate numbers and license plate colors, the license plate numbers and the license plate colors need to be compared with the corresponding comparison conditions respectively, so that a plurality of unnecessary comparison processes are added, and overload is caused.
Disclosure of Invention
In view of this, the present invention provides a deployment and control processing method, device and apparatus, which search a deployment and control condition for performing matching check by using an object identifier in target object data, and can save more redundancy comparison processes and reduce load.
The first aspect of the present invention provides a deployment and control processing method, including:
acquiring target object data;
determining a control condition matched with the object identifier in an established control information table according to the object identifier in the target object data;
and checking whether the deployment and control associated data in the target object data are matched with the deployment and control conditions, and if so, performing deployment and control processing on the target object data.
According to one embodiment of the invention, the structure of the deployment and control information table is a hash table structure;
the determining of the deployment condition matched with the object identifier in the established deployment information table according to the object identifier in the target object data comprises:
performing hash operation on the object identification by using a hash function corresponding to the deployment and control information table to obtain a hash value, and searching a deployment and control information table item corresponding to the hash value in the deployment and control information table; or, traversing the deployment and control information table according to the object identifier, and searching a deployment and control information table item corresponding to a regular expression matched with the object identifier in the deployment and control information table;
and determining the control condition in the found control information table item as the control condition matched with the object identifier.
According to an embodiment of the present invention, the structure of the deployment and control information table is a hash table structure, and includes a first type of deployment and control information table entry and a second type of deployment and control information table entry;
the determining of the deployment condition matched with the object identifier in the established deployment and control information table according to the object identifier in the target object data comprises the following steps:
performing hash operation on the object identifier by using a hash function corresponding to the first type of deployment information table entry to obtain a hash value, and searching the deployment information table entry corresponding to the hash value in the first type of deployment information table;
traversing the second type of control information table entry according to the object identifier, and searching a control information table entry corresponding to a regular expression matched with the object identifier in the second type of control information table entry;
and determining the deployment condition in the deployment information table item searched from the first type of deployment information table item as the deployment condition matched with the object identifier.
According to an embodiment of the present invention, the acquiring target object data includes:
target object data is asynchronously retrieved from the object data queue by the at least two object data threads that have been created.
According to an embodiment of the present invention, the deploying and controlling the target object data includes:
generating alarm data and storing the alarm data into an alarm data queue;
and asynchronously acquiring alarm data from the alarm data queue through at least two established alarm data threads so as to perform specified service processing on the acquired alarm data or store the acquired alarm data into a database.
According to one embodiment of the invention, the object identifier in the target object data is a license plate number, and the control related data in the target object data comprises license plate color, passing time and bayonet number;
checking whether the deployment related data in the target object data are matched with the deployment conditions or not, wherein the checking comprises the following steps:
and comparing the license plate color, the passing time and the gate number in the target object data with the license plate color, the control time and the control gate number in the control condition respectively, and determining that the control associated data in the target object data is matched with the control condition if the comparison results are matched.
A second aspect of the present invention provides a deployment control processing apparatus, including:
the data acquisition module is used for acquiring target object data;
the condition searching module is used for determining a control condition matched with the object identifier in an established control information table according to the object identifier in the target object data;
and the matching checking module is used for checking whether the deployment associated data in the target object data is matched with the deployment condition or not, and if so, performing deployment processing on the target object data.
According to one embodiment of the invention, the structure of the deployment and control information table is a hash table structure;
the condition searching module comprises:
the first condition searching unit is used for performing hash operation on the object identifier by using a hash function corresponding to the deployment information table to obtain a hash value, and searching a deployment information table item corresponding to the hash value in the deployment information table; or traversing the deployment and control information table according to the object identifier, and searching a deployment and control information table item corresponding to a regular expression matched with the object identifier in the deployment and control information table;
and the first condition determining unit is used for determining the found deployment condition in the deployment information table entry as the deployment condition matched with the object identifier.
According to an embodiment of the present invention, the structure of the deployment and control information table is a hash table structure, and includes a first type of deployment and control information table entry and a second type of deployment and control information table entry;
the condition searching module comprises:
the second condition searching unit is used for performing hash operation on the object identifier by using a hash function corresponding to the first type of deployment and control information table entry to obtain a hash value, and searching the deployment and control information table entry corresponding to the hash value in the first type of deployment and control information table;
the third condition searching unit is used for traversing the second type of control information table items according to the object identifier and searching the control information table items corresponding to the regular expressions matched with the object identifier in the second type of control information table items;
and the second condition determining unit is used for determining the deployment condition in the deployment information table item searched from the first type of deployment information table item and the deployment condition in the deployment information table item searched from the second type of deployment information table item as the deployment condition matched with the object identifier.
According to an embodiment of the present invention, the data obtaining module is specifically configured to:
and asynchronously acquiring target object data from the object data queue through the at least two object data threads which are created.
According to one embodiment of the invention, the match check module comprises:
the alarm data generating unit is used for generating alarm data and storing the alarm data into an alarm data queue;
and the alarm data acquisition unit is used for asynchronously acquiring alarm data from the alarm data queue through at least two established alarm data threads so as to perform specified service processing on the acquired alarm data or store the acquired alarm data into a database.
According to one embodiment of the invention, the object identifier in the target object data is a license plate number, and the control related data in the target object data comprises license plate color, passing time and bayonet number;
the match check module includes:
and the comparison unit is used for comparing the license plate color, the passing time and the bayonet number in the target object data with the license plate color, the deployment and control time and the deployment and control bayonet number in the deployment and control condition respectively, and if the comparison result is matched, determining that the deployment and control associated data in the target object data is matched with the deployment and control condition.
A third aspect of the invention provides an electronic device comprising a processor and a memory; the memory stores a program that can be called by the processor; when the processor executes the program, the deployment control processing method in the foregoing embodiment is implemented.
Compared with the prior art, the embodiment of the invention at least has the following beneficial effects:
in the embodiment of the invention, the most representative object identification in the target object data is used as a keyword for table lookup, comparison is completed in the process of searching in the deployment and control information table according to the object identification, if the corresponding deployment and control condition is found, the object identification is successfully compared, otherwise, the target object data can be discarded, and most unmatched target object data are filtered, so that the target object data do not need to be compared with the subsequent deployment and control condition any more; and the control associated data is compared with the searched corresponding control conditions, so that the control associated data only needs to be compared with the searched control conditions at most, and the control conditions in other entries cannot be compared, thus saving more useless comparison processes and reducing load.
Drawings
FIG. 1 is a schematic flow chart of a control processing method according to an embodiment of the present invention;
fig. 2 is a block diagram of a deployment processing apparatus according to an embodiment of the present invention;
FIG. 3 is a schematic flow chart illustrating a control processing method according to an embodiment of the present invention;
FIG. 4 is a diagram illustrating the processing of queue data by threads according to one embodiment of the present invention;
fig. 5 is a block diagram of an electronic device according to an embodiment of the invention.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary examples do not represent all implementations consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the invention, as detailed in the appended claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in this specification and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
In the control arrangement processing method of the embodiment of the invention, the target object data can be related data of a target object, and the target object can be a vehicle, a human face and the like. For example, the target object data may be vehicle passing data, and the vehicle passing data is subjected to deployment control processing, so that the purpose of tracking vehicles such as illegal vehicles or escape vehicles can be achieved. Of course, other object data may be possible, and may depend on the specific application scenario of the object data.
The target object data includes various data, which are divided into object identifiers and deployment and control related data in the embodiment of the present invention. In a related control processing mode, the object identification and the control related data are compared with the control conditions in a view-together manner. In the embodiment of the invention, although the object identification and the deployment and control associated data are also used as the data to be compared, the comparison modes are different, the object identification is used as a keyword for inquiring the deployment and control information table, the deployment and control conditions needing further matching check can be found, and then the deployment and control associated data and the deployment and control conditions are compared to check whether the deployment and control conditions are matched.
In other words, in the embodiment of the present invention, the most representative object identifier in the target object data is used as a keyword of the table lookup, the comparison is completed in the process of searching in the deployment and control information table according to the object identifier, if the corresponding deployment and control condition is found, the object identifier is successfully compared, otherwise, the target object data can be discarded, and most unmatched target object data are filtered, so that the target object data do not need to be compared with the subsequent deployment and control condition any more; and the control associated data is compared with the searched corresponding control conditions, so that the control associated data only needs to be compared with the searched control conditions at most, and the control conditions in other entries cannot be compared, thus saving more useless comparison processes and reducing load.
The object identification in the target object data may or may not be unique. For example, when a vehicle is controlled, the license plate number and other data may be present in the target object data, the license plate number may be used as the object identifier of the target object data, and the other data in the target object data may be used as the control related data of the target object data.
The deployment and control information table of the embodiment of the invention is not a memory database, on one hand, the comparison process is not completed by the memory database, so that the maintenance is more convenient, the data structure is more optimized, the corresponding deployment and control conditions can be searched in the deployment and control information table according to the object identification, the redundant comparison is reduced, and the system load is reduced; on the other hand, the deployment and control information table can be expanded as required, for example, when the deployment and control conditions need to be expanded, only the corresponding deployment and control conditions need to be added to the corresponding table entries, other structures of the deployment and control information table do not need to be changed again, and the expandability is improved. And the whole structure system needs to be redesigned when the memory database is expanded every time, so that the expansion is difficult.
The following is a description of the deployment and control processing method according to the embodiment of the present invention, but should not be limited thereto.
Referring to fig. 1, in one embodiment, a deployment processing method may include:
s100: acquiring target object data;
s200: determining a control condition matched with the object identification in an established control information table according to the object identification in the target object data;
s300: and checking whether the deployment and control associated data in the target object data are matched with the deployment and control conditions, and if so, performing deployment and control processing on the target object data.
In step S100, the target object data may be directly obtained from the monitoring device; alternatively, the target object data is stored locally after being received from the monitoring device, and then acquired locally at execution time.
The target object data comprises object identification and deployment association data. The object identifier may be used to identify an object to which the target object data corresponds, for example, a license plate number when the object is a vehicle. Of course, without limitation, when the objects are different, the object identifier may be adjusted accordingly, for example, when the controlled object is a human face, the object identifier may be human face feature data obtained through human face recognition. The deployment related data can be set according to deployment needs, can be state data, feature data and the like for describing the object, and the type can be changed or increased or decreased according to needs.
The object identifier may be determined in the monitoring device or other data source devices of the target object data, and when the data source device is the monitoring device, the object feature in the monitoring video may be identified to obtain a corresponding object identifier, for example, a license plate of a vehicle is identified to obtain a license plate number.
The deployment and control related data in the target object data can be determined in the monitoring device or other data source devices of the target object data, and when the data source device is the monitoring device, the deployment and control related data can be determined by identifying characteristics of objects in the monitoring video, such as vehicle colors, vehicle types and the like, and can also be determined by presetting. The determination mode of different kinds of data in the deployment and control related data can be different.
In step S200, a deployment condition matching the object identifier is determined in the established deployment information table according to the object identifier in the target object data.
The deployment information table may have a plurality of entries, and each entry includes an object identifier and a deployment condition of a deployment object. In the deployment information table, a keyword may be determined according to an object identifier of a deployment object, and a deployment condition of the deployment object is used as a deployment condition corresponding to the keyword. The deployment information table may be formed by a data structure, such as a linked list structure, which can implement that the deployment condition matched with the object identifier can be determined by the object identifier.
Inquiring a control information table according to the object identifier of the target object data, and if the table item with the keyword matched with the object identifier is found in the control information table, determining the corresponding control condition; if the entry with the keyword matched with the object identifier cannot be found in the control information table, the target object data is discarded without further control processing.
In step S300, it is checked whether the deployment related data in the target object data matches the deployment condition, and if so, the deployment processing is performed on the target object data.
The deployment condition determined in step S200 may be one or more deployment conditions, and the number is not limited, for example, when the deployment condition is a plurality of deployment conditions, whether deployment related data in the target object data matches with the corresponding deployment condition may be checked one by one.
And when the checking result is that the deployment associated data in the target object data is matched with the deployment condition, it is indicated that the object corresponding to the target object data is the deployment object and the deployment processing is required. The specific manner of the deployment and control processing is not limited, and the deployment and control processing may be, for example, alarm processing, or may be other processing, and the alarm processing may be, for example, after the alarm data is locally generated, the alarm data is issued to other modules and devices for executing the alarm service, or is stored in a database.
In one embodiment, the deployment processing method can be executed by the deployment processing apparatus 100, as shown in fig. 2, the deployment processing apparatus 100 mainly includes 3 modules: a data acquisition module 101, a condition search module 102 and a matching check module 103. The data obtaining module 101 is configured to perform the step S100, the condition searching module 102 is configured to perform the step S200, and the matching checking module 103 is configured to perform the step S300.
When the deployment information table entries of the deployment information table have the same keyword, the deployment information table entries having the same keyword can be recombined into one deployment information table entry in the deployment data set, so that the comparison times can be reduced, and the volume of the whole deployment information table can be reduced.
In one embodiment, the object identifier in the target object data is a license plate number, and the control associated data in the target object data includes a license plate color, a passing time and a checkpoint number.
In step S300, checking whether the deployment related data in the target object data matches the deployment condition may specifically include:
and comparing the license plate color, the passing time and the gate number in the target object data with the license plate color, the control time and the control gate number in the control condition respectively, and determining that the control associated data in the target object data is matched with the control condition if the comparison results are matched. The control time in the control condition may be a time period, the passing time in the passing data is a time point at which the vehicle is detected, and if the passing time falls within the time period, the comparison result is determined to be that the passing time is matched with the control time.
In one embodiment, the structure of the deployment and control information table is a hash table structure. The condition lookup module 102 is configured to, when determining a deployment condition matching the object identifier in the established deployment information table according to the object identifier in the target object data, specifically:
step S201: performing hash operation on the object identification by using a hash function corresponding to the deployment and control information table to obtain a hash value, and searching a deployment and control information table item corresponding to the hash value in the deployment and control information table;
step S202: and determining the control condition in the searched control information table item as the control condition matched with the object identifier.
In this embodiment, the structure of the deployment and control information table is a hash table structure, and when the deployment and control conditions need to be expanded, only the deployment and control conditions need to be added to the corresponding deployment and control information table entry, which is convenient for expansion. The key word in the control information table may be an object identifier of a control object, and when the object identifier of the target object data is the same as the key word in the control information table, the hash value corresponding to the object identifier is calculated by using the hash function of the control information table, so that the control information table entry corresponding to the key word in the control information table can be accurately located.
Due to the hash characteristic of the deployment and control information table, in step S201, the hash function corresponding to the deployment and control information table is used to perform hash operation on the object identifier to obtain a hash value, and when a deployment and control information table entry corresponding to the keyword matched with the object identifier exists in the deployment and control information table, the deployment and control information table entry in the deployment and control information table can be located by using the hash value.
In step S202, the deployment condition in the found deployment information entry is determined as the deployment condition matching the object identifier. The hash value calculated by the object identification can accurately position the corresponding control information table entry to obtain the corresponding control condition, rather than searching in a traversal mode, so that most unnecessary comparison processes are omitted, the system load is reduced, the matching efficiency is high, and accurate license plate control comparison can be realized.
For convenience of description, the comparison method in this embodiment is simply referred to as accurate license plate control comparison. For example, if the deployment condition corresponding to the keyword is zhe a12345 and the object identifier of the target object data is zhe a12345 exists in the deployment and control information table, the hash value may be calculated by using the object identifier, zhe a12345, and the deployment and control condition corresponding to the keyword, zhe a12345, is located by using the hash value.
In another embodiment, the structure of the deployment information table is a hash table structure. The condition lookup module 102 is further specifically configured to, when determining a deployment condition matching the object identifier in the established deployment information table according to the object identifier in the target object data:
s203: traversing the deployment and control information table according to the object identifier, and searching a deployment and control information table item corresponding to a regular expression matched with the object identifier in the deployment and control information table;
s204: and determining the control condition in the found control information table item as the control condition matched with the object identifier.
In this embodiment, the structure of the deployment and control information table is a hash table structure, and when the deployment and control conditions need to be expanded, only the deployment and control conditions need to be added to the corresponding deployment and control information table entry, which is convenient for expansion. However, in this embodiment, the keywords of the control information table are regular expressions, and the regular expressions are generated according to the object identifiers of the control objects, for example, the regular expressions include partial characters and filter characters of the object identifiers of the control objects.
The keywords in the deployment and control information table are set as the regular expressions, fuzzy matching can be achieved, the regular expressions are not completely consistent with the object identifiers, positioning cannot be achieved through calculating hash values, and therefore the deployment and control information table can only be traversed according to the object identifiers to search for deployment and control information table items corresponding to the regular expressions matched with the object identifiers.
For convenience of description, the comparison method in this embodiment is simply referred to as fuzzy license plate deployment and control comparison. For example, the deployment information table has a deployment information entry whose regular expression is zhe a12, the object identifier of the target object data is zhe a12345, or zhe a12346, or zhe a12745, etc., then zhe a12345, or zhe a12346, or zhe a12745 are all object identifiers matching with zhe a12, and when traversing the deployment information table according to zhe a12345, or zhe a12346, or zhe a12745, the deployment information entry corresponding to zhe a12 can be found.
Referring to fig. 3, a specific embodiment of a deployment and control processing method is shown, after target object data is acquired, whether the data is legal or not may be determined, for example, the target object data without license plate or with incomplete license plate number is determined as illegal; if the target object data is legal data, searching a control information table according to the license plate number, wherein the step S201 or the step S203 in the embodiment can be utilized to realize accurate license plate control comparison or fuzzy license plate control comparison, and if the corresponding control information table item is not searched, ending the process; if the corresponding arrangement control information table item is found, firstly judging whether the license plate color is matched with the license plate color in the arrangement control condition; if so, judging whether the passing time is matched with the control time in the control condition; if so, judging whether the bayonet number is matched with the control-deployment bayonet number in the control-deployment condition, and if so, performing control-deployment processing. And in the comparison of the deployment and control related data and the deployment and control conditions, if any comparison result is not matched, ending the comparison.
It can be understood that the control method may also include the precise license plate control comparison and the fuzzy license plate control comparison at the same time, and the control method is implemented by the contents described in the above two embodiments. The fuzzy license plate arrangement comparison can be carried out after the precise license plate arrangement comparison, or the precise license plate arrangement comparison can be carried out after the fuzzy license plate arrangement comparison, and the sequence is not limited. That is, steps S201 and S202 may be performed first, and then steps S203 and S204 may be performed; alternatively, steps S203 and S204 are performed first, and then steps S201 and S202 are performed.
Or, the license plate arrangement and control comparison can be accurately carried out firstly, and the arrangement and control conditions are directly compared when the accurate license plate arrangement and control comparison result is matched, and the fuzzy license plate arrangement and control comparison is not carried out; and when the result of the accurate license plate arrangement and control comparison is unsuccessful (the corresponding arrangement and control information table entry is not found, or the comparison result of the arrangement and control associated data and the arrangement and control conditions is not matched), carrying out fuzzy license plate arrangement and control comparison. Therefore, when the accurate license plate arrangement comparison is successful, fuzzy license plate arrangement comparison is not needed; and when the accurate license plate arrangement comparison is unsuccessful, fuzzy license plate arrangement comparison is carried out.
Compared with fuzzy license plate arrangement and control comparison, the precise license plate arrangement and control comparison has better performance in the aspects of matching difficulty and matching efficiency, so that when the arrangement and control mode simultaneously comprises the precise license plate arrangement and control comparison and the fuzzy license plate arrangement and control comparison, the total number of the arrangement and control information table entries in the fuzzy license plate arrangement and control comparison can be set to be less than that of the precise license plate arrangement and control comparison, and the comparison efficiency is improved.
In another embodiment, the structure of the deployment and control information table is a hash table structure, and includes a first type of deployment and control information table entry and a second type of deployment and control information table entry.
The condition searching module 102 is configured to, when determining, according to the object identifier in the target object data, a deployment condition that matches the object identifier in the established deployment information table, further specifically configured to:
s205: performing hash operation on the object identifier by using a hash function corresponding to the first type of deployment information table entry to obtain a hash value, and searching the deployment information table entry corresponding to the hash value in the first type of deployment information table;
s206: traversing the second type of control information table entry according to the object identifier, and searching a control information table entry corresponding to a regular expression matched with the object identifier in the second type of control information table entry;
s207: and determining the deployment condition in the deployment information table item searched from the first type of deployment information table item as the deployment condition matched with the object identifier.
The first type of schedule control information table entry and the second type of schedule control information table entry are different types of table entries and can be stored separately. The searching between the first type of control information table item and the second type of control information table item is independent and does not influence each other. And when the second type of control information table entry is traversed, the first type of control information table entry cannot be traversed.
The specific content of step S205 can refer to the content of step S201 described in the foregoing embodiments, and is not described herein again. The specific content of step S206 can refer to the content of step S203 described in the foregoing embodiments, and is not described herein again. It is understood that steps S205 and S206 described above may be interchanged with one another.
In step S207, the deployment condition in the deployment information entry found from the first type of deployment information entry (referred to as the first deployment condition for short) and the deployment condition in the deployment information entry found from the second type of deployment information entry (referred to as the second deployment condition for short) are determined as deployment conditions matched with the object identifier. The first deployment condition and the second deployment condition may be compared with the deployment associated data of the target object, respectively, to check whether the deployment associated data are matched, respectively, so as to perform different deployment processes subsequently.
It can be understood that, in this embodiment, a case where the deployment condition in the corresponding deployment information entry is found from both the first type of deployment information entry and the second type of deployment information entry is described, and certainly, the following cases may also exist as a result:
1) In step S205, the deployment condition in the corresponding deployment information entry is not found from the first type of deployment information entry, and it may be determined that the object identifier is not successfully matched in the first type of deployment information entry at this time; step S206 is executed, and the control condition in the corresponding control information table item is searched from the second type of control information table item; next, in step S207, only the deployment condition in the deployment information entry found from the second type of deployment information entry is determined as the deployment condition matched with the object identifier;
2) In step S205, the deployment condition in the corresponding deployment information entry is found from the first type of deployment information entry; step S206 is executed, and the deployment condition in the corresponding deployment information entry is not found from the second type of deployment information entry, and it may be determined that the object identifier is not successfully matched in the second type of deployment information entry at this time; next, in step S207, only the deployment condition in the deployment information entry found from the first type of deployment information entry is determined as the deployment condition matched with the object identifier;
3) The deployment condition in the corresponding deployment information entry is not found from both the first type of deployment information entry and the second type of deployment information entry, and at this time, it may be determined that the object identifier is not successfully matched in the first type of deployment information entry and the first type of deployment information entry, and step S207 does not need to be executed.
In an embodiment, when the data obtaining module 101 is configured to obtain target object data, it may specifically be configured to:
target object data is asynchronously retrieved from the object data queue by the at least two object data threads that have been created.
The process of storing the target object data into the object data queue can be completed through the main thread. Starting at least two object data threads to asynchronously take the object data from the object data queue and compare the object data, so that the overall processing progress can be accelerated. The number of threads can be reasonably configured according to the needs and the number of CPU cores.
Referring to fig. 4, the first object data thread Thr1 and the second object data thread Thr2 asynchronously obtain the target object data from the object data queue, and because the two threads are asynchronous, when one thread performs comparison, the other thread performs data fetching operation.
Because at least two object data threads take data in the object data queue, the object data queue is locked when each object data thread takes the data in the object data queue, and the frequent data taking and unlocking in the link can influence the comparison speed, so that when each object data thread takes the data in the object data queue, a part can be taken in batch at one time for comparison (when a plurality of target object data exist in the object data queue at the same time), and the times of locking and unlocking are reduced as much as possible. Of course, a single data may be obtained for comparison at a time, and the method is not limited.
The data are obtained in batch, the locking and unlocking time caused by switching among threads can be avoided as much as possible, the object data threads for comparison are set, the object data threads are separated from the operation of other functions, the coupling degree is reduced, and the problem of one link is prevented from affecting the blockage of other functions.
In one embodiment, the deploying and controlling the target object data further includes:
generating alarm data and storing the alarm data into an alarm data queue;
and asynchronously acquiring alarm data from the alarm data queue through at least two established alarm data threads so as to perform specified service processing on the acquired alarm data or store the acquired alarm data into a database.
When the generated alarm data is required to be issued for specified service processing or warehousing operation, the alarm data can be stored in an alarm data queue, and an alarm data thread can take the alarm data to be issued for specified service processing or warehousing operation so as to avoid blocking the object data thread.
With reference to fig. 4, the first alarm data thread Thr3 and the second alarm data thread Thr4 asynchronously obtain the alarm data from the alarm data queue, and because the two threads are asynchronous, when one thread issues, the other thread performs data fetching operation, which speeds up the processing progress.
Similarly, when each alarm data thread takes the alarm data in the alarm data queue, a part of alarm data can be measured in batches at a time to be sent to perform designated service processing or warehousing operation (when a plurality of alarm data exist in the alarm data queue at the same time), and the times of locking and unlocking are reduced as much as possible. Of course, a single alarm data can be acquired each time to issue and perform designated service processing or warehousing operation.
In one embodiment, when the amount of the object data is too large, a part of the object data can be clustered and shunted, so that the purpose of load balancing is achieved. For example, the deployment information table and the deployment processing apparatus 100 are provided for three devices, and the object data is divided into three data streams, and the comparison is performed by the three devices.
In one implementation, referring to fig. 2, a deployment processing apparatus 100 may include:
a data acquisition module 101, configured to acquire target object data;
the condition searching module 102 is configured to determine, in an established deployment information table, a deployment condition matched with the object identifier according to the object identifier in the target object data;
and the matching checking module 103 is configured to check whether the deployment related data in the target object data is matched with the deployment condition, and if so, perform deployment processing on the target object data.
In one embodiment, the structure of the deployment and control information table is a hash table structure;
the condition lookup module 102 includes:
the first condition searching unit is used for performing hash operation on the object identifier by using a hash function corresponding to the deployment and control information table to obtain a hash value, and searching a deployment and control information table item corresponding to the hash value in the deployment and control information table; or traversing the deployment and control information table according to the object identifier, and searching a deployment and control information table item corresponding to a regular expression matched with the object identifier in the deployment and control information table;
and the first condition determining unit is used for determining the found deployment condition in the deployment information table entry as the deployment condition matched with the object identifier.
In one embodiment, the structure of the deployment and control information table is a hash table structure, and the hash table structure comprises a first type of deployment and control information table entry and a second type of deployment and control information table entry;
the condition lookup module 102 includes:
the second condition searching unit is used for performing hash operation on the object identifier by using a hash function corresponding to the first type of deployment information table entry to obtain a hash value, and searching the deployment information table entry corresponding to the hash value in the first type of deployment information table;
the third condition searching unit is used for traversing the second type of control information table items according to the object identifier and searching the control information table items corresponding to the regular expressions matched with the object identifier in the second type of control information table items;
and the second condition determining unit is used for determining the deployment condition in the deployment information table item searched from the first type of deployment information table item and the deployment condition in the deployment information table item searched from the second type of deployment information table item as the deployment condition matched with the object identifier.
In an embodiment, the data obtaining module 101 is specifically configured to:
target object data is asynchronously retrieved from the object data queue by the at least two object data threads that have been created.
In one embodiment, the match check module comprises:
the alarm data generating unit is used for generating alarm data and storing the alarm data into an alarm data queue;
and the alarm data acquisition unit is used for asynchronously acquiring alarm data from the alarm data queue through at least two established alarm data threads so as to perform specified service processing on the acquired alarm data or store the acquired alarm data into a database.
In one embodiment, the object identifier in the target object data is a license plate number, and the control associated data in the target object data comprises license plate color, passing time and checkpoint number;
the match check module 103 includes:
and the comparison unit is used for comparing the license plate color, the passing time and the bayonet number in the target object data with the license plate color, the deployment and control time and the deployment and control bayonet number in the deployment and control condition respectively, and if the comparison result is matched, determining that the deployment and control associated data in the target object data is matched with the deployment and control condition.
The implementation process of the functions and actions of each unit in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
For the device embodiment, since it basically corresponds to the method embodiment, reference may be made to the partial description of the method embodiment for relevant points. The above-described embodiments of the apparatus are merely illustrative, wherein the units described as separate parts may or may not be physically separate, and the parts shown as units may or may not be physical units.
The invention also provides an electronic device, which comprises a processor and a memory; the memory stores a program that can be called by the processor; when the processor executes the program, the deployment control processing method according to any one of the foregoing embodiments is implemented.
The embodiment of the deployment and control processing device can be applied to electronic equipment. Taking a software implementation as an example, as a logical device, the device is formed by reading, by a processor of the electronic device where the device is located, a corresponding computer program instruction in the nonvolatile memory into the memory for operation. From a hardware aspect, as shown in fig. 5, fig. 5 is a hardware structure diagram of an electronic device where the deployment processing apparatus 100 is located according to an exemplary embodiment of the present invention, and except for the processor 510, the memory 530, the interface 520, and the nonvolatile memory 540 shown in fig. 5, the electronic device where the apparatus 100 is located in the embodiment may also include other hardware according to an actual function of the electronic device, which is not described again.
The present invention also provides a machine-readable storage medium on which a program is stored, which, when executed by a processor, implements the deployment processing method as described in any one of the preceding embodiments.
The present invention may take the form of a computer program product embodied on one or more storage media including, but not limited to, disk storage, CD-ROM, optical storage, and the like, having program code embodied therein. Machine-readable storage media include both permanent and non-permanent, removable and non-removable media, and the storage of information may be accomplished by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of machine-readable storage media include, but are not limited to: phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technologies, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic tape storage or other magnetic storage devices, or any other non-transmission medium, may be used to store information that may be accessed by a computing device.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and should not be taken as limiting the scope of the present invention, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.
Claims (9)
1. A control processing method is characterized by comprising the following steps:
acquiring target object data; the target object data comprises object identification and deployment and control associated data;
determining a control condition matched with the object identification in an established control information table according to the object identification in the target object data; each control condition in the control information table comprises an object identifier to be matched and control associated data to be matched;
comparing whether the deployment and control associated data in the target object data are matched with the deployment and control associated data to be matched in the deployment and control conditions, checking whether the deployment and control associated data are matched with the deployment and control associated data, and if so, performing deployment and control processing on the target object data;
the structure of the control information table is a hash table structure and comprises a first type of control information table entry and a second type of control information table entry;
the determining of the deployment condition matched with the object identifier in the established deployment information table according to the object identifier in the target object data comprises:
performing hash operation on the object identifier by using a hash function corresponding to the first type of deployment information table entry to obtain a hash value, and searching the deployment information table entry corresponding to the hash value in the first type of deployment information table;
traversing the second type of control information table entry according to the object identifier, and searching a control information table entry corresponding to a regular expression matched with the object identifier in the second type of control information table entry; the regular expression matched with the object identifier comprises partial characters and filtering characters of the object identifier, and other characters in the object identifier are filtered by the filtering characters;
and determining the deployment condition in the deployment information table item searched from the first type of deployment information table item as the deployment condition matched with the object identifier.
2. The deployment processing method of claim 1 wherein the acquiring target object data comprises:
target object data is asynchronously retrieved from the object data queue by the at least two object data threads that have been created.
3. The deployment processing method according to any one of claims 1-2, wherein the deployment processing of the target object data includes:
generating alarm data and storing the alarm data into an alarm data queue;
and asynchronously acquiring the alarm data from the alarm data queue through at least two established alarm data threads so as to perform specified service processing on the acquired alarm data or store the acquired alarm data into a database.
4. The arrangement processing method according to any one of claims 1-2, wherein the object identifier in the target object data is a license plate number, and the arrangement associated data in the target object data includes a license plate color, a passing time and a gate number;
comparing whether the deployment associated data in the target object data is matched with the deployment associated data to be matched in the deployment condition or not, and checking whether the deployment associated data and the deployment associated data are matched or not, wherein the steps of:
and comparing the license plate color, the passing time and the gate number in the target object data with the license plate color, the control time and the control gate number in the control condition respectively, and determining that the control associated data in the target object data is matched with the control condition if the comparison results are matched.
5. A deployment processing apparatus, comprising:
the data acquisition module is used for acquiring target object data; the target object data comprises object identification and deployment and control associated data;
the condition searching module is used for determining a deployment and control condition matched with the object identifier in an established deployment and control information table according to the object identifier in the target object data; each control condition in the control information table comprises an object identifier to be matched and control associated data to be matched;
the matching checking module is used for comparing whether the deployment associated data in the target object data is matched with the deployment associated data to be matched in the deployment conditions or not, checking whether the deployment associated data is matched with the deployment associated data, and if so, performing deployment processing on the target object data;
the structure of the control information table is a hash table structure and comprises a first type of control information table entry and a second type of control information table entry;
the determining of the deployment condition matched with the object identifier in the established deployment information table according to the object identifier in the target object data comprises:
performing hash operation on the object identifier by using a hash function corresponding to the first type of deployment information table entry to obtain a hash value, and searching the deployment information table entry corresponding to the hash value in the first type of deployment information table;
traversing the second type of control information table entry according to the object identifier, and searching a control information table entry corresponding to a regular expression matched with the object identifier in the second type of control information table entry; the regular expression matched with the object identifier comprises partial characters and filtering characters of the object identifier, and other characters in the object identifier are filtered by the filtering characters;
and determining the control condition in the control information table item searched from the first type of control information table item and the control condition in the control information table item searched from the second type of control information table item as the control condition matched with the object identifier.
6. The deployment processing apparatus according to claim 5, wherein the data acquisition module is specifically configured to:
target object data is asynchronously retrieved from the object data queue by the at least two object data threads that have been created.
7. The ride control processing apparatus of any of claims 5-6, wherein the match check module comprises:
the alarm data generating unit is used for generating alarm data and storing the alarm data into an alarm data queue;
and the alarm data acquisition unit is used for asynchronously acquiring alarm data from the alarm data queue through at least two established alarm data threads so as to perform specified service processing on the acquired alarm data or store the acquired alarm data into a database.
8. The arrangement processing device according to any one of claims 5 to 6, wherein the object identifier in the target object data is a license plate number, and the arrangement associated data in the target object data includes a license plate color, a passing time, and a gate number;
the match check module includes:
and the comparison unit is used for comparing the license plate color, the passing time and the bayonet number in the target object data with the license plate color, the deployment and control time and the deployment and control bayonet number in the deployment and control condition respectively, and if the comparison result is matched, determining that the deployment and control associated data in the target object data is matched with the deployment and control condition.
9. An electronic device comprising a processor and a memory; the memory stores a program that can be called by the processor; wherein the processor implements the deployment processing method according to any one of claims 1 to 4 when executing the program.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810771075.8A CN110716929B (en) | 2018-07-13 | 2018-07-13 | Control and deployment processing method, device and equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810771075.8A CN110716929B (en) | 2018-07-13 | 2018-07-13 | Control and deployment processing method, device and equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110716929A CN110716929A (en) | 2020-01-21 |
CN110716929B true CN110716929B (en) | 2023-01-24 |
Family
ID=69208549
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810771075.8A Active CN110716929B (en) | 2018-07-13 | 2018-07-13 | Control and deployment processing method, device and equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110716929B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111274432B (en) * | 2020-02-06 | 2023-05-09 | 浙江大华技术股份有限公司 | Method and device for processing cloth control |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103810298A (en) * | 2014-03-07 | 2014-05-21 | 苏州科达科技股份有限公司 | Main memory database based rapid vehicle information query method and system |
CN104103173A (en) * | 2014-07-22 | 2014-10-15 | 银江股份有限公司 | Searching deployment-control method for fake-licensed vehicles |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130204719A1 (en) * | 2012-02-02 | 2013-08-08 | Xerox Corporation | Systems and methods for license plate recognition to enable advance order pickup |
CN105608214B (en) * | 2015-12-30 | 2017-08-11 | 杭州中奥科技有限公司 | The method that fast search is carried out to the number-plate number of deploying to ensure effective monitoring and control of illegal activities |
-
2018
- 2018-07-13 CN CN201810771075.8A patent/CN110716929B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103810298A (en) * | 2014-03-07 | 2014-05-21 | 苏州科达科技股份有限公司 | Main memory database based rapid vehicle information query method and system |
CN104103173A (en) * | 2014-07-22 | 2014-10-15 | 银江股份有限公司 | Searching deployment-control method for fake-licensed vehicles |
Also Published As
Publication number | Publication date |
---|---|
CN110716929A (en) | 2020-01-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106708975B (en) | The processing method and system of commodity stocks information | |
US12277105B2 (en) | Methods and systems for improved search for data loss prevention | |
JP5976115B2 (en) | Image search method | |
NL2012421A (en) | Computer-implemented systems and methods for comparing and associating objects. | |
CN110232095B (en) | Data synchronization method, device, storage medium and server | |
CN111339293B (en) | Data processing method and device for alarm event and classifying method for alarm event | |
CN103618744B (en) | Intrusion detection method based on fast k-nearest neighbor (KNN) algorithm | |
CN112948504B (en) | Data acquisition method and device, computer equipment and storage medium | |
CA2934034A1 (en) | Database key identification | |
US7167878B2 (en) | System and method for identifying and maintaining base table data blocks requiring deferred incremental integrity maintenance | |
WO2019179408A1 (en) | Construction of machine learning model | |
CN112905667A (en) | Unmanned information storage and playback method, device and storage medium | |
CN110716929B (en) | Control and deployment processing method, device and equipment | |
CN110083731B (en) | Image retrieval method, device, computer equipment and storage medium | |
US20140052703A1 (en) | Gap Detection in a Temporally Unique Index in a Relational Database | |
CN106776702B (en) | Method and device for processing indexes in master-slave database system | |
CN110457905B (en) | Sample virus detection method, device, computer equipment and storage medium | |
CN116401676A (en) | Automatic detection method and device for data loopholes, electronic equipment and storage medium | |
CN106446687B (en) | Malicious sample detection method and device | |
CN118138256A (en) | Data access management method and device | |
CN113722302A (en) | Data management method and device | |
CN114265813A (en) | Snapshot query method, device, equipment and storage medium | |
CN117725623B (en) | Data desensitization processing method and system based on database bottom file | |
WO2017027007A1 (en) | Using a shared priority queue for multi-threaded searching | |
CN114153863B (en) | Database updating method, device, equipment and medium |
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 |