CN111414441B - Map data inspection system and method, inspection rule configuration system and method - Google Patents

Map data inspection system and method, inspection rule configuration system and method Download PDF

Info

Publication number
CN111414441B
CN111414441B CN201910009540.9A CN201910009540A CN111414441B CN 111414441 B CN111414441 B CN 111414441B CN 201910009540 A CN201910009540 A CN 201910009540A CN 111414441 B CN111414441 B CN 111414441B
Authority
CN
China
Prior art keywords
rule
checking
body text
module
map data
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
Application number
CN201910009540.9A
Other languages
Chinese (zh)
Other versions
CN111414441A (en
Inventor
林文玉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201910009540.9A priority Critical patent/CN111414441B/en
Publication of CN111414441A publication Critical patent/CN111414441A/en
Application granted granted Critical
Publication of CN111414441B publication Critical patent/CN111414441B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/29Geographical information databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/006Identification

Abstract

The invention discloses a map data checking system and method, and a checking rule configuration system and method. The system takes a configured rule engine as a core, the rule engine comprises a configuration module, a loading module and a cache module which are distributed in a layered manner, and each layer is loosely coupled in a micro-service mode; the configuration module acquires configuration information of the checking rule; generating rule body text according to the checking rule configuration information, and storing the rule body text into a database; the rule body text comprises a file header and at least one check rule; the loading module acquires rule body text from the database when the checking rule needs to be loaded; analyzing the obtained rule body text to generate a rule tree, wherein one node of the rule tree corresponds to one check rule; the caching module caches the generated rule tree and rule attributes and rule attribute combination methods included in each check rule. The dynamic configuration of the inspection rule and the automatic execution of the data inspection can be realized, intermediate links are reduced, and the online period of the inspection rule is shortened.

Description

Map data inspection system and method, inspection rule configuration system and method
Technical Field
The present invention relates to the field of data processing technologies, and in particular, to a map data inspection system and method, and an inspection rule configuration system and method.
Background
In the process of manufacturing map data, quality inspection is required to be performed on the manufactured map data so as to ensure that the finally produced map data accords with the operation standard and ensure the correctness and the quality reliability of the map data. Such as the topology of the roads in the map data must be complete, the content is correct, the logic between attributes cannot conflict, etc.
The existing flow of checking rules (or checking items) for quality check of map data is shown in fig. 1, and includes links of process, product, research and development, test and online. As shown in fig. 1, in the process link, information fed back by a user is acquired, the production of inspection rule requirements is completed in the product link according to the information fed back by the user, the inspection rule to be on line is determined, the inspection rule to be on line is coded in the research and development link, test cases are produced in the test link to test the coded inspection rule, when the test passes, the coded inspection rule is released in the on-line link, when the test fails, the operation specification is changed in the process link, then the production of the inspection rule requirements is completed in the product link according to the changed operation specification, the subsequent process is re-executed until the test passes, and data release is performed.
The inventor finds that in the process of researching the above inspection rule online flow, the flow has the following defects:
firstly, the checking rule coding process has a deeper dependence on development resources, and development resource intervention is needed to modify codes to release online no matter whether checking rules are newly added or job specifications are changed. Secondly, the process of checking the rule on line involves a plurality of links, and more manpower and material resources are needed, especially when the rule is newly added, the conventional iterative development process (product, research and development, test and on line) is needed. Therefore, the existing inspection rule online process has the problems of long online period and high labor cost.
Disclosure of Invention
The present invention has been made in view of the above-mentioned problems, and has as its object to provide a map data inspection system and method, inspection rule configuration system and method that overcome or at least partially solve the above-mentioned problems.
The embodiment of the invention provides a map data checking rule configuration system, which takes a configured rule engine as a core, wherein the rule engine comprises a configuration module, a loading module and a cache module which are distributed in a layered manner, and each layer is loosely coupled in a micro-service mode, wherein:
The configuration module is used for acquiring configuration information of the inspection rule; generating a rule body text according to the checking rule configuration information, and storing the rule body text into a database; the rule body text comprises a file header and at least one check rule;
the loading module is used for acquiring the rule body text from the database when the checking rule needs to be loaded; analyzing the obtained rule body text to generate a rule tree, wherein one node of the rule tree corresponds to one check rule;
and the caching module is used for caching the generated rule tree and rule attributes and rule attribute combination methods included in each check rule.
In some alternative embodiments, the configuration module is further configured to:
and carrying out validity check on the generated rule text, and after the check is passed, executing the step of storing the rule text into a database.
In some optional embodiments, the configuration module is specifically configured to perform at least one of the following validity checks on the generated rule-body text:
checking whether the text format of the rule body text is correct;
performing lexical analysis on the rule body text to determine whether the lexical is normal;
And analyzing the grammar of the rule body text to determine whether the grammar is normal.
In some alternative embodiments, the loading module is specifically configured to generate a rule tree including a plurality of rule tree nodes, each node including a rule header and the rule tree of rule check items;
the rule header comprises a version number, an inspection entry layer and an inspection rule ID;
the rule check item includes rule contents and error codes of the check rule.
In some optional embodiments, the configuration module is further configured to, when acquiring the update information of the inspection rule, update the corresponding rule body text in the database according to the update information of the inspection rule; correspondingly, the loading module is further used for acquiring and analyzing the updated rule body text and updating rule check items corresponding to corresponding nodes in the rule tree;
the cache module is further configured to cache the updated rule tree and rule attributes and rule attribute combination methods included in each inspection rule.
The embodiment of the invention also provides a map data checking system, which is used for checking map data based on the rule tree generated by the map data checking rule configuration system, wherein the rule engine also comprises a traversing module and an executing module which are in layered layout, and the system comprises:
The traversing module is used for traversing nodes of the cached rule tree:
and the execution module is used for checking the map data by using the checking rules corresponding to the nodes on the traversed rule tree.
The embodiment of the invention also provides a map data checking rule configuration method, which takes a configured rule engine as a core, wherein the rule engine comprises a configuration module, a loading module and a cache module which are distributed in a layered manner, and each layer is loosely coupled in a micro-service mode, and the method comprises the following steps:
the configuration module acquires configuration information of the checking rule; generating rule body text according to the checking rule configuration information; storing the rule body text into a database, wherein the rule body text comprises a file header and at least one checking rule;
when the checking rule needs to be loaded, a loading module acquires the rule body text from the database; analyzing the obtained rule body text to generate a rule tree, wherein one node of the rule tree corresponds to one check rule;
the caching module caches the generated rule tree and rule attributes and rule attribute combination methods included in each checking rule.
In some alternative embodiments, the method further comprises:
And carrying out validity check on the generated rule text, and after the check is passed, executing the step of storing the rule text into a database.
In some optional embodiments, the verifying validity of the generated rule-body text includes at least one of:
checking whether the text format of the rule body text is correct;
performing lexical analysis on the rule body text to determine whether the lexical is normal;
and analyzing the grammar of the rule body text to determine whether the grammar is normal.
In some alternative embodiments, the obtaining inspection rule configuration information includes: at least one of a check rule identification ID, a rule description, an error code, and an error description is obtained.
In some alternative embodiments, the generating a rule tree includes:
generating a rule tree comprising a plurality of rule tree nodes, each node comprising a rule header and a rule check item;
the rule header comprises a version number, an inspection entry layer and an inspection rule ID;
the rule check item includes rule contents and error codes of the check rule.
In some alternative embodiments, the method further comprises:
when the updating information of the checking rule is obtained, updating the corresponding rule body text in the database according to the updating information of the checking rule;
And acquiring and analyzing the updated rule body text, and updating rule check items corresponding to the corresponding nodes in the rule tree.
The embodiment of the invention also provides a map data checking method, which is based on the rule tree generated by the map data checking rule configuration method, and checks the map data, wherein the rule engine also comprises a traversing module and an executing module which are in layered layout, and the method comprises the following steps:
the traversing module traverses nodes of the cached rule tree:
the execution module checks the map data by using the check rule corresponding to the node on the traversed rule tree.
The embodiment of the invention also provides a computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions realize the map data inspection rule configuration method or the map data inspection method when being executed by a processor.
The embodiment of the invention also provides a map server, which comprises: the map data inspection rule configuration method is characterized in that the map data inspection rule configuration method is realized or the map data inspection method is realized when the processor executes the program.
The technical scheme provided by the embodiment of the invention has the beneficial effects that at least:
the map data checking rule configuration system and method provided by the embodiment of the invention take the configured rule engine as a core, adopt a software module with layered layout to realize, dynamically configure the map data checking rule according to the checking rule configuration information, generate a rule body text based on the checking rule configuration information to be stored in a database, directly call loading and generate a rule tree for matching and checking the map data when the checking rule needs to be loaded, save manpower and material resources in the mode, reduce the operation links of the checking rule on line, shorten the period of the checking rule on line, improve the efficiency of the checking rule configuration through automatic configuration, and conveniently and rapidly configure and update the checking rule. The layers are loosely coupled in a micro-service mode, so that the function expansion is conveniently carried out according to service requirements, and the change amount of codes during the function expansion is greatly reduced.
According to the map data checking system and method provided by the embodiment of the invention, the map data is checked by traversing the nodes of the rule tree and using the checking rules corresponding to the nodes based on the rule tree generated by the checking rules configured dynamically, and the updated or modified map data can be checked conveniently in the operation processes of updating and modifying the map data, so that the updating and modifying operation of the map data is simpler and faster, and the speed and efficiency of map data operation are improved.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims thereof as well as the appended drawings.
The technical scheme of the invention is further described in detail through the drawings and the embodiments.
Drawings
The accompanying drawings are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate the invention and together with the embodiments of the invention, serve to explain the invention. In the drawings:
FIG. 1 is a flow chart of checking rule on-line in the prior art;
FIG. 2 is a flowchart of a map data inspection rule configuration method according to an embodiment of the present invention;
FIG. 3 is a diagram illustrating an exemplary structure of a rule tree node according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of an online flow of inspection rules according to an embodiment of the present invention;
FIG. 5 is a flowchart of a map data inspection method according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of the implementation principle of map data inspection in the embodiment of the present invention;
FIG. 7 is a schematic diagram of a map data inspection rule configuration system according to an embodiment of the present invention;
FIG. 8 is a schematic diagram of a map data inspection system according to an embodiment of the present invention;
fig. 9 is a diagram illustrating an exemplary system configuration for implementing map data inspection in accordance with an embodiment of the present invention.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
In order to solve the problems that in the prior art, an inspection rule is long in online period and cannot take effect quickly in online, the embodiment of the invention provides a map data inspection rule configuration method and a map data inspection method, which can realize automatic configuration of inspection rules, enable the inspection rules to be online conveniently and quickly, inspect map data based on the inspection rules, and shorten a development period and a data inspection period.
The invention realizes the rule configurability of the map data on-line checking system in the map data production process. The method can be realized by software modules in layered layout, wherein the layering comprises a front-end visualized configuration interface, a rear-end rule storage, a middle-layer rule engine for carrying out grammar analysis, checking rule item execution and the like; the rule engine is used as a core, and comprises a configuration module, a loading module and a cache module which are distributed in a layered mode, wherein the layers are loosely coupled in a micro-service mode, and the expansion can be carried out according to service requirements.
The embodiment of the invention provides a map data checking rule configuration method, the flow of which is shown in figure 2, comprising the following steps:
step S101: and acquiring checking rule configuration information.
The configuration module in the rule engine acquires the configuration information of the checking rule, the configuration information of the checking rule can be the configuration information of the checking rule input by the user, the user can input the configuration information of the rule through the front-end operation interface, the configuration information can be input by the user through the input box, the system can also provide selectable items of the configuration information of the checking rule for the user through the front-end operation interface, the user can select the configuration information of the checking rule, and when the selectable items required by the user do not exist, the user can input the configuration information of the rule through the set input box.
Acquiring the inspection rule configuration information may include acquiring at least one of an inspection rule identification ID, a rule description, an error code, and an error description.
Step S102: and generating rule body text according to the acquired checking rule configuration information.
After the configuration module obtains the configuration information of the inspection rule, the configuration module can configure the inspection rule at the front end to generate a rule body text, and then provide the rule body text to a server at the back end, or the front end can provide the configuration information of the inspection rule to the back end server, and the back end server generates the rule body text.
Wherein the rule body text comprises a file header and at least one inspection rule.
Step S103: and saving the rule body text in a database.
The rule-body text may be stored in a storage medium, such as a local database, or in a cloud database.
After the rule text is generated, the method can further comprise the step of carrying out validity check on the generated rule text, and after the check is passed, the rule text is stored in a database.
The validity check of the generated rule text is essentially a check of the content of the rule text itself, and the validity check of the generated rule text includes at least one of the following: checking whether the text format of the rule body text is correct; performing lexical analysis on the rule body text to determine whether the lexicon is normal; and analyzing the grammar of the rule body text to determine whether the grammar is normal.
The verification of the text format may be, for example, whether the header format of the first three lines is correct, or whether the rule part format meets the requirements, etc., and the verification of the lexical and grammatical check may be, for example, determining whether the lexical and grammatical analysis can be performed normally.
Step S104: when the check rule needs to be loaded, the rule body text is acquired from the database.
When the checking rule needs to be loaded, the loading module acquires the rule body text from the database, and can acquire the rule body text from the local database or the cloud database according to different storage positions of the rule body text.
Step S105: and analyzing the acquired rule body text to generate a rule tree.
In the step, grammar and lexical analysis are carried out on the obtained rule body text, so that text analysis is carried out on the rule body text, and an inspection rule instance, namely a rule tree, is generated, wherein one node of the rule tree corresponds to one inspection rule.
The rule body text is in accordance with the grammar of the domain language (DSL), and after lexical and grammatical analysis, a traversable rule tree is formed, and finally, the operation is executed on the checking rule, and the traversal of the rule tree and the logic calculation of the nodes in the rule tree are in fact carried out.
As shown in fig. 3, which is a schematic structural diagram of a rule tree node, the rule tree includes a plurality of nodes, each node corresponds to a checking rule (rule), and each node includes: rule header (hdr) and rule check item (rule test);
the rule header includes a version number (version), a layer of a checking entry, and a checking rule ID (chk_id);
The rule check item includes rule contents and error codes of the check rule.
For example: the rule head comprises the following three parts: version number, which is automatically generated by the program, without configuration, such as: VERSION is 1; examining the entry layer, this portion may be selected in a drop down, such as: LAYER is ROAD_LINK; checking rule ID, which allows manual input, such as: chk_id is R000000210.
One inspection rule has at least one error ID (ERRID), each ERRID corresponding to at least one inspection rule. In practice, a check rule definition may be defined by a pair of brackets, including variable definitions, IF conditional statements, ERRID hit statements, remark information output statements, and the like.
Step S106: the generated rule tree and the rule attribute and rule attribute combination method included in each check rule are cached.
The caching module caches the generated rule tree and rule attributes and rule attribute combination methods included in each checking rule, the generated rule tree is cached so that the generated rule tree can be called at any time when data checking is carried out later, meanwhile, each node on the rule tree corresponds to the corresponding checking rule, the checking rules can contain a plurality of rule attributes and rule attribute combination methods, when map data are required to be matched, the attributes can be matched one by one, and a plurality of attributes can be combined together to be matched through the rule attribute combination methods.
The method further comprises the step of dynamically updating corresponding rule items in the rule tree when the check rule items need to be updated:
when the inspection rule updating information is acquired, updating the corresponding rule body text in the database according to the inspection rule updating information; and acquiring and analyzing the updated rule body text, and updating rule check items corresponding to the corresponding nodes in the rule tree.
The contents of the inspection rule configuration information in step S101 may be as shown in table 1 below.
TABLE 1
Figure BDA0001936660780000091
Figure BDA0001936660780000101
The number of inspection rule configurations may be large, and a sufficient number of inspection rules may be configured as needed, for example, the inspection rules may be: the road name cannot have illegal characters, the road length cannot be smaller than a set threshold, the interest point cannot be located in water, the relationship of map data accords with the constraint and the requirement of logic, and the like. Table 1 above illustrates only a few inspection rule configuration information from which corresponding rule body text may be generated, such as: the check rule ID is R000000698, and a rule body text 1 of which check item names are area_flag and ad_code consistency check is generated, and the structure and content examples of the rule text 1 are shown in table 2.
TABLE 2
Figure BDA0001936660780000102
The inspection rule of the inspection rule section in the rule body text 1 shown in table 2 may be expressed by a functional expression or may be expressed by an if statement, and when the inspection rule item is hit, a corresponding result is output. Inspection rule requirement description of rule body text 1 above:
the AD_CODE of the arc section cannot be empty, otherwise, the error E1 is reported;
if the AREA_FLAG field of the current arc section has a value of 0 or 2, the initial character of the AD_CODE field cannot be 8, otherwise, error E2 is reported;
if the area_flag field of the current arc segment has a value of 1, the beginning character of the ad_code field must be 8, otherwise, error E3 is reported.
And, for example: the checking rule ID is R000000098, and a rule text 2 for checking the correspondence between the road composition and the road type is generated by using the checking term name, and the structure and content of the rule text 2 are similar to those of the rule text 1, except that detailed sentences of the checking rule part are not repeated here. Inspection rule requirement description of rule body text 2:
if form=2 (in the intersection), link_type cannot take a value of 1, cannot take a value of 2, cannot take a value of 3 (ferry route or tunnel or bridge), and reports error E1;
if form=4 (roundabout), link_type cannot take a value of 1, cannot take a value of 2, cannot take a value of 3, cannot take a value of 4 (ferry route or tunnel or bridge or underground traffic channel), and reports error E2;
If form=9 (exit), 10 (entrance), link_type cannot take a value of 1, cannot take a value of 2, cannot take a value of 3, cannot take a value of 4 (ferry route & tunnel & bridge & underground traffic channel), and reports error E3;
where E1 represents a road type error of a road inside the intersection, E2 represents a road type error of a roundabout road, and E3 represents a road type error of an entrance road.
And, for example: the checking rule ID is R000001122, and a rule body text 3 with the checking term of bad road fc\rc degradation checking is generated, and the structure and content of the rule body text 3 are similar to those of the rule body text 1, except that the specific sentence of the checking rule part is not repeated here. Inspection rule requirement description of rule body text 3:
the roads with the Capacity values of 14 and 15 are roads with the width of 3 meters, the paving difference and the road occupation.
A road RC of 3 m width should be made 47000 and FC should be made 6;
the road RC of the laying difference should be made 47000 and FC should be made 6;
the roads RC and FC occupying the road have no process manufacturing requirements, but the manufacturing RC=45000 or FC with poor user experience is unreasonable;
therefore, roads with capability values of 14 and 15 are required, RC is degraded from 45000 to 47000, and FC is degraded from 5 to 6.
Where E1 represents 47000 for the differential path RC and E2 represents 6 for the differential path FC.
The RoadLink layer in the rule body text refers to a ROAD in the data, is abstracted as a RoadLink CLASS in the code implementation, and has many properties, such as ADCODE, AREAFLAG, ROAD _class used in checking the rule body, and the like, and CLASS combination methods, such as: a road (connectildroadmap) that is actually passable to the current road is obtained.
When the rule tree is cached, the class attributes and the class combination methods are also cached, for example, the cache is the rule attributes and the rule combination methods, so that calculation call can be performed when the data is checked and the check rule is executed later.
As shown in fig. 4, which is a schematic diagram of an inspection rule online flow, it can be seen that, when the map data inspection rule preparation method is implemented, compared with the prior art, operations required to be executed by product, research and development and test links can be completed in an inspection rule system, after user feedback information or operation specification change information is obtained in a process link, the inspection rule system directly completes generation and online test of the inspection rule, and after online test, the inspection rule is directly released online. The method realizes the online configuration checking rule and dynamic effect, reduces intermediate links, shortens the online time and saves the manpower resource cost.
The embodiment of the invention also provides a map data checking method, which performs map data checking based on the rule tree generated by the map data checking rule configuration method, takes a configured rule engine as a core, and the rule engine comprises a traversing module and an executing module which are distributed in a layered manner, wherein each layer is loosely coupled in a micro-service mode, the flow is shown in figure 5, and the method comprises the following steps:
step S201: traversing nodes of the cached rule tree.
When the map data generated in the map data operation process needs to be checked, the traversing module can traverse the nodes of the cached rule tree, and check the map data by sequentially using the checking rules corresponding to each node in the rule tree.
The map data generated during the operation may be edit data in JSON format, such as a road object, a road head and tail node object, a comprehensive junction (complex element constituted by node objects), a road section traffic restriction object, a steering prohibition information object, and the like.
Step S202: and checking the map data by using the checking rules corresponding to the nodes on the traversed rule tree.
The execution module checks the map data by using the check rule corresponding to the node on the traversed rule tree. For example, for a node on the rule tree, checking the correlation rule of the map data and the cached node includes matching the attribute in the map data according to the corresponding rule attribute, and determining whether the attribute meets the requirement. For example, whether illegal characters exist in the name of the road or not, if not, the name meets the requirements; if the road is too short, the road meets the requirements; and if the point of interest (POI) is in water, the method meets the requirements. And combining and judging several attributes of the map data according to a rule attribute combining method to determine whether the map data meets the requirements.
If the check rule matching is not passed, the check prompt information can be output to the user. For example: and after carrying out item-by-item rule check on the map data, generating a result report for the hit error item and outputting the result report.
In the embodiment, the configurable map data is checked by using the rule tree generated in advance, so that the automatic map data check is realized, the map data check is more convenient and quick, and the check speed and efficiency are improved.
Fig. 6 is a schematic diagram of the implementation principle of map data inspection. After the operation data related to the map is input, the configurable checking rule execution flow is executed by the rule engine after the data loading, the checking rule items are executed by the checking rule engine, and finally the data result report is output. The rule engine for realizing the execution flow of the checking rule mainly comprises three parts: checking rule configuration, dynamic loading and caching of the checking rules, and executing the checking rules.
The rule configuration checking link is realized by a configuration module, and the rule can be added, modified and deleted through a front-end interface; after the front end completes rule configuration, the generated rule text is sent to the back end service through a hypertext transfer protocol (Hyper Text Transfer Protocol, HTTP) service interface, and after the back end server performs validity check on the rule text, the rule text is stored on a storage medium (such as a cloud database).
The dynamic loading and caching links of the checking rules are realized by a loading module and a caching module, the loading module and the caching module can be combined into one module by two independent modules, when the back-end service is started, a rule body text is loaded from a storage medium (cloud database), lexical grammar analysis is carried out on the rule body text, and a rule checking instance (namely a rule tree) is created in a memory and cached; meanwhile, caching an attribute combination method and an attribute field of the data model related to the inspection rule; the cache is used directly when the check rule is subsequently executed.
When the front end modifies the configuration rule, the corresponding checking rule item in the rule checking instance is dynamically updated, so that the dynamic even effective checking rule item is ensured.
The inspection rule execution link is realized by a traversing module and an executing module, wherein the traversing module and the executing module can be combined into one module by two independent modules, and for one inspection request in the map data operation process, the inspection rule corresponding to each node in the rule tree cached to the memory is sequentially bound to the map data to be inspected in the memory, each node in the rule tree is traversed, so that the traversing of all inspection rules is realized, the bound map data is subjected to item-by-item rule inspection, a result report is formed for hit error items, and the result report is output.
Through a new built on-line configurable and instant effective inspection rule engine platform, when the inspection rule is required to be added and changed as a job specification or user feedback, the inspection rule can be directly added and modified through the platform and is effective dynamically, the requirement for a developer is not required any more, a complete set of process of development and test is not required to be performed, and the input resources for developing hard code to realize the inspection rule of map data are saved without the need of a traditional software development period. Moreover, the configuration of the inspection rules can be directly carried out on line, the inspection rules can be automatically generated and validated in the background, development resources are saved, and the on-line period of the inspection rules is shortened.
Based on the same inventive concept, the embodiment of the invention also provides a map data inspection rule configuration system, which can be arranged in a map server or a cloud server, wherein the structure of the system is shown in fig. 7, a configured rule engine is taken as a core, the rule engine comprises a configuration module 71, a loading module 72 and a buffer module 73 which are distributed in a layered manner, and the layers are loosely coupled in a micro-service mode.
A configuration module 71, configured to obtain inspection rule configuration information input by a user; generating rule body text according to the checking rule configuration information, and storing the rule body text into a database; wherein the rule body text comprises a file header and at least one check rule;
The loading module 72 is configured to obtain a rule body text from the database when an inspection rule needs to be loaded, analyze the obtained rule body text, and generate a rule tree, where a node of the rule tree corresponds to one inspection rule;
a caching module 73, configured to cache the generated rule tree and rule attributes and rule attribute combination methods included in each checking rule.
In an alternative embodiment, the configuration module 71 is further configured to perform a validity check on the generated rule body text, and perform the step of saving the rule body text in the rule database after the check is passed.
In an alternative embodiment, the configuration module 71 is specifically configured to perform at least one of the following validity checks on the generated rule-body text:
checking whether the text format of the rule body text is correct;
performing lexical analysis on the rule body text to determine whether the lexical is normal;
and analyzing the grammar of the rule body text to determine whether the grammar is normal.
In an alternative embodiment, the loading module 72 is specifically configured to generate a rule tree including a plurality of rule tree nodes, each node including a rule header and the rule tree of rule check items; the rule header comprises a version number, an inspection entry layer and an inspection rule ID; the rule check item includes rule contents and error codes of the check rule.
In an alternative embodiment, the configuration module 71 is further configured to, when acquiring the update information of the inspection rule, update the corresponding rule body text in the database according to the update information of the inspection rule; correspondingly, the loading module 72 is further configured to obtain and parse the updated rule body text, update the rule check item corresponding to the corresponding node in the rule tree;
the caching module 73 is further configured to cache the updated rule tree and rule attributes and rule attribute combination methods included in each inspection rule.
The embodiment of the invention also provides a map data checking system, which uses the rule tree generated by the map data checking rule configuration system to check map data, wherein the system can be arranged in a map server or a cloud server, the structure of the system is shown in fig. 8, a configured rule engine is used as a core, the map data is checked based on the rule tree generated by the checking rule configuration system, the system comprises a traversing module 81 and an executing module 82 which are distributed in a layered mode, and each layer is loosely coupled in a micro-service mode.
A traversing module 81, configured to traverse nodes of the cached rule tree.
And an execution module 82, configured to check the map data with the check rule corresponding to the node on the traversed rule tree.
The embodiment of the invention also provides a computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions realize the map data inspection rule configuration method or the map data inspection method when being executed by a processor.
The embodiment of the invention also provides a server, which comprises: the map data inspection rule configuration method is realized or the map data inspection method is realized when the processor executes the stored program.
Fig. 9 is a diagram illustrating an exemplary system architecture of a hierarchical architecture for implementing map data inspection in accordance with an embodiment of the present invention.
The storage layer, mainly stores configuration rule body text and is persistent, and as shown in fig. 9, includes several databases, such as: databases such as PostgreSQL (an open source object relational database system), mySQL (a relational database management system), object store (Object Storage Service, OSS), mongoDB (a database based on distributed file storage), and the like.
The component layer is responsible for checking the core analysis of the rules, namely, performing grammar lexical analysis on the rule body text to form a rule tree, and performing checking rule matching calculation on map data in the memory to obtain a corresponding matching result; the system comprises a plurality of functional modules such as a memory model, a basic algorithm, rule analysis, cache management and the like.
The service layer is an interface for interacting with the front end of a wide area network (web), and can perform functions of adding, modifying, deleting, checking and the like of the checking rules. Functional modules such as rule query, edit submission, rule deletion, rule verification, and the like can be included.
The map data checking system is arranged in a layered layout mode, a configured rule engine is used as a core, the rule engine comprises a configuration module, a loading module, a cache module, a traversing module and an executing module which are arranged in a layered layout mode, each layer is loosely coupled in a micro-service mode, each functional module is arranged on different layers to realize respective functions, and therefore each module can be more conveniently combined and updated, and when a certain functional module needs to be updated, codes of all the functional modules do not need to be changed, so that updating operation is more convenient and quick.
The specific manner in which the various modules perform the operations in relation to the systems of the above embodiments have been described in detail in relation to the embodiments of the method and will not be described in detail herein.
The map data checking rule configuration system and method provided by the embodiment of the invention take the configured rule engine as a core, adopt a software module with layered layout to realize, dynamically configure the map data checking rule according to the checking rule configuration information, generate a rule body text based on the checking rule configuration information to be stored in a database, directly call loading and generate a rule tree for matching and checking the map data when the checking rule needs to be loaded, save manpower and material resources in the mode, reduce the operation links of the checking rule on line, shorten the period of the checking rule on line, improve the efficiency of the checking rule configuration through automatic configuration, and conveniently and rapidly configure and update the checking rule. The layers are loosely coupled in a micro-service mode, so that the function expansion is conveniently carried out according to service requirements, and the change amount of codes during the function expansion is greatly reduced.
According to the map data checking system and method provided by the embodiment of the invention, the map data is checked by traversing the nodes of the rule tree and using the checking rules corresponding to the nodes based on the rule tree generated by the checking rules configured dynamically, and the updated or modified map data can be checked conveniently in the operation processes of updating and modifying the map data, so that the updating and modifying operation of the map data is simpler and faster, and the speed and efficiency of map data operation are improved.
According to the method and the system provided by the embodiment of the invention, based on map data, a memory data model is established, and a public processing query function is abstracted; based on the data model and the public library processing function, realizing a domain language (DSL) suitable for map data rule checking; on-line rules can be dynamically added/modified based on the rules checking domain language, and the on-line period of the map data checking rules is shortened.
In the method of the invention, the domain language can be realized based on a further language recognition tool (Another Tool for Language Recognition, ANTLR), the analysis of the checking rules and the realization of the domain language are realized based on the ANTLR, and other alternative realization schemes can be realized based on Drools (an open source rule engine).
Unless specifically stated otherwise, terms such as processing, computing, calculating, determining, displaying, or the like, may refer to an action and/or process of one or more processing or computing systems, or similar devices, that manipulates and transforms data represented as physical (e.g., electronic) quantities within the processing system's registers or memories into other data similarly represented as physical quantities within the processing system's memories, registers or other such information storage, transmission or display devices. Information and signals may be represented using any of a variety of different technologies and techniques. For example, data, instructions, commands, information, signals, bits, symbols, and chips that may be referenced throughout the above description may be represented by voltages, currents, electromagnetic waves, magnetic fields or particles, optical fields or particles, or any combination thereof.
It should be understood that the specific order or hierarchy of steps in the processes disclosed are examples of exemplary approaches. Based on design preferences, it is understood that the specific order or hierarchy of steps in the processes may be rearranged without departing from the scope of the present disclosure. The accompanying method claims present elements of the various steps in a sample order, and are not meant to be limited to the specific order or hierarchy presented.
In the foregoing detailed description, various features are grouped together in a single embodiment for the purpose of streamlining the disclosure. This method of disclosure is not to be interpreted as reflecting an intention that the claimed embodiments of the subject matter require more features than are expressly recited in each claim. Rather, as the following claims reflect, invention lies in less than all features of a single disclosed embodiment. Thus the following claims are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate preferred embodiment of this invention.
Those of skill would further appreciate that the various illustrative logical blocks, modules, circuits, and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both. To clearly illustrate this interchangeability of hardware and software, various illustrative components, blocks, modules, circuits, and steps have been described above generally in terms of their functionality. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the overall system. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present disclosure.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor such the processor can read information from, and write information to, the storage medium. In the alternative, the storage medium may be integral to the processor. The processor and the storage medium may reside in an ASIC. The ASIC may reside in a user terminal. The processor and the storage medium may reside as discrete components in a user terminal.
For a software implementation, the techniques described herein may be implemented with modules (e.g., procedures, functions, and so on) that perform the functions described herein. These software codes may be stored in memory units and executed by processors. The memory unit may be implemented within the processor or external to the processor, in which case it can be communicatively coupled to the processor via various means as is known in the art.
The foregoing description includes examples of one or more embodiments. It is, of course, not possible to describe every conceivable combination of components or methodologies for purposes of describing the aforementioned embodiments, but one of ordinary skill in the art may recognize that many further combinations and permutations of various embodiments are possible. Accordingly, the embodiments described herein are intended to embrace all such alterations, modifications and variations that fall within the scope of the appended claims. Furthermore, as used in the specification or claims, the term "comprising" is intended to be inclusive in a manner similar to the term "comprising," as interpreted when employed as a transitional word in a claim. Furthermore, any use of the term "or" in the specification of the claims is intended to mean "non-exclusive or".

Claims (13)

1. The map data checking rule configuration system is characterized in that a configured rule engine is taken as a core, the rule engine comprises a configuration module, a loading module and a cache module which are distributed in a layered mode, and each layer is loosely coupled in a micro-service mode, wherein:
the configuration module is used for acquiring configuration information of the inspection rule; generating a rule body text according to the checking rule configuration information, and storing the rule body text into a database; when the updating information of the checking rule is obtained, updating the corresponding rule body text in the database according to the updating information of the checking rule; the rule body text comprises a file header and at least one check rule;
The loading module is used for acquiring the rule body text from the database when the checking rule needs to be loaded, analyzing the acquired rule body text and generating a rule tree; or acquiring and analyzing the updated rule body text, and updating rule check items corresponding to corresponding nodes in the rule tree; one node of the rule tree corresponds to one checking rule;
and the caching module is used for caching the generated or updated rule tree and rule attributes and rule attribute combination methods included in each check rule.
2. The system of claim 1, wherein the configuration module is further to:
and carrying out validity check on the generated rule text, and after the check is passed, executing the step of storing the rule text into a database.
3. The system of claim 2, wherein the configuration module is specifically configured to perform at least one of the following validity checks on the generated rule-body text:
checking whether the text format of the rule body text is correct;
performing lexical analysis on the rule body text to determine whether the lexical is normal;
and analyzing the grammar of the rule body text to determine whether the grammar is normal.
4. The system of claim 1, wherein the loading module is specifically configured to generate a rule tree comprising a plurality of rule tree nodes, each node comprising a rule header and the rule tree of rule check items;
the rule header comprises a version number, an inspection entry layer and an inspection rule ID;
the rule check item includes rule contents and error codes of the check rule.
5. A map data inspection system, characterized in that the map data is inspected based on a rule tree generated by the map data inspection rule configuration system according to any one of claims 1 to 4, the rule engine including a traversing module and an executing module of a hierarchical layout, comprising:
the traversing module is used for traversing nodes of the cached rule tree:
and the execution module is used for checking the map data by using the checking rules corresponding to the nodes on the traversed rule tree.
6. The map data checking rule configuration method is characterized in that a configured rule engine is taken as a core, the rule engine comprises a configuration module, a loading module and a cache module which are distributed in a layered mode, and each layer is loosely coupled in a micro-service mode, and the method comprises the following steps:
the configuration module acquires configuration information of the checking rule; generating rule body text according to the checking rule configuration information; storing the rule body text into a database, wherein the rule body text comprises a file header and at least one checking rule;
When the checking rule needs to be loaded, a loading module acquires the rule body text from the database; analyzing the obtained rule body text to generate a rule tree, wherein one node of the rule tree corresponds to one check rule;
when the updating information of the checking rule is obtained, updating the corresponding rule body text in the database according to the updating information of the checking rule; acquiring and analyzing the updated rule body text, and updating rule check items corresponding to corresponding nodes in the rule tree;
the caching module caches the generated or updated rule tree and rule attributes and rule attribute combination methods included in each check rule.
7. The method as recited in claim 6, further comprising:
and carrying out validity check on the generated rule text, and after the check is passed, executing the step of storing the rule text into a database.
8. The method of claim 7, wherein the verifying the validity of the generated rule-body text comprises at least one of:
checking whether the text format of the rule body text is correct;
performing lexical analysis on the rule body text to determine whether the lexical is normal;
And analyzing the grammar of the rule body text to determine whether the grammar is normal.
9. The method of claim 6, wherein the obtaining inspection rule configuration information comprises: at least one of a check rule identification ID, a rule description, an error code, and an error description is obtained.
10. The method of claim 6, wherein the generating a rule tree comprises:
generating a rule tree comprising a plurality of rule tree nodes, each node comprising a rule header and a rule check item;
the rule header comprises a version number, an inspection entry layer and an inspection rule ID;
the rule check item includes rule contents and error codes of the check rule.
11. A map data inspection method characterized by inspecting map data based on a rule tree generated by the map data inspection rule configuration method according to any one of claims 6 to 10, the rule engine including a traversing module and an executing module of a hierarchical layout, the method comprising:
the traversing module traverses nodes of the cached rule tree:
the execution module checks the map data by using the check rule corresponding to the node on the traversed rule tree.
12. A computer storage medium having stored therein computer executable instructions which when executed by a processor implement the map data inspection rule configuration method of any one of claims 6 to 10 or the map data inspection method of claim 11.
13. A server, comprising: a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the map data inspection rule configuration method according to any one of claims 6 to 10 or implements the map data inspection method according to claim 11 when executing the program.
CN201910009540.9A 2019-01-04 2019-01-04 Map data inspection system and method, inspection rule configuration system and method Active CN111414441B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910009540.9A CN111414441B (en) 2019-01-04 2019-01-04 Map data inspection system and method, inspection rule configuration system and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910009540.9A CN111414441B (en) 2019-01-04 2019-01-04 Map data inspection system and method, inspection rule configuration system and method

Publications (2)

Publication Number Publication Date
CN111414441A CN111414441A (en) 2020-07-14
CN111414441B true CN111414441B (en) 2023-05-26

Family

ID=71490691

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910009540.9A Active CN111414441B (en) 2019-01-04 2019-01-04 Map data inspection system and method, inspection rule configuration system and method

Country Status (1)

Country Link
CN (1) CN111414441B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112084278B (en) * 2020-08-31 2022-07-01 武汉光庭信息技术股份有限公司 Verification method and device for map data conversion customized product
CN112988788B (en) 2021-05-20 2021-07-27 四川省林业和草原调查规划院 Method for checking mutation of spatial data in territorial space planning, application system and cloud platform

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5860011A (en) * 1996-02-29 1999-01-12 Parasoft Corporation Method and system for automatically checking computer source code quality based on rules
CN106101090A (en) * 2016-06-07 2016-11-09 中国建设银行股份有限公司 Operational approach and rule engine system for regulation engine
CN106970819A (en) * 2017-03-28 2017-07-21 清华大学 A kind of c program code specification check device based on the regular description languages of PRDL
CN108182069A (en) * 2017-12-28 2018-06-19 深圳市创梦天地科技股份有限公司 Programming language transformation method, terminal device and computer-readable medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9880863B2 (en) * 2015-11-13 2018-01-30 The Boeing Company Methods and systems for increasing processor speed by creating rule engine rules from unstructured text

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5860011A (en) * 1996-02-29 1999-01-12 Parasoft Corporation Method and system for automatically checking computer source code quality based on rules
CN106101090A (en) * 2016-06-07 2016-11-09 中国建设银行股份有限公司 Operational approach and rule engine system for regulation engine
CN106970819A (en) * 2017-03-28 2017-07-21 清华大学 A kind of c program code specification check device based on the regular description languages of PRDL
CN108182069A (en) * 2017-12-28 2018-06-19 深圳市创梦天地科技股份有限公司 Programming language transformation method, terminal device and computer-readable medium

Also Published As

Publication number Publication date
CN111414441A (en) 2020-07-14

Similar Documents

Publication Publication Date Title
Masucci et al. Limited urban growth: London's street network dynamics since the 18th century
CN111414441B (en) Map data inspection system and method, inspection rule configuration system and method
WO2022218186A1 (en) Method and apparatus for generating personalized knowledge graph, and computer device
US20130239098A1 (en) Source code conversion method and source code conversion program
Bock et al. Advantageous usage of textual domain-specific languages for scenario-driven development of automated driving functions
US11822909B2 (en) Adapting existing source code snippets to new contexts
CN105786715A (en) Program static automatic analysis method
CN111176991B (en) Automatic generation method for embedded software interface use cases
CN112378420A (en) Signal simulation method and system for automobile navigation test and electronic equipment
CN115617694A (en) Software defect prediction method, system, device and medium based on information fusion
CN116521512A (en) Accurate test method and device for codes, electronic equipment and computer readable medium
CN115113927A (en) Register model processing method and device, computer equipment and storage medium
CN104748757A (en) Data updating method and device for navigation electronic map
Patriarca et al. Automatic conversion of OSM data into LULC maps: comparing FOSS4G based approaches towards an enhanced performance
US11144840B2 (en) Completing decision logic to avoid a side effect
CN113901169A (en) Information processing method, information processing device, electronic equipment and storage medium
Svendsen et al. Formalizing train control language: automating analysis of train stations
CN116339716A (en) Flow chart analysis method
CN109976802B (en) Mode-oriented software architecture reconstruction method
CN115774766A (en) Method and device for evaluating differential algorithm model and determining updated map data
EP1591887A1 (en) Software development preprocessing method, software control method, software development method, and software development device
Offutt et al. An industrial study of applying input space partitioning to test financial calculation engines
CN113221573A (en) Entity classification method and device, computing equipment and storage medium
CN114036639A (en) Quality control method, system, medium and terminal of hull model
Tran et al. Towards a rule-level verification framework for property-preserving graph transformations

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