CN108427580A - Configure detection method, storage medium and the smart machine repeated to name - Google Patents
Configure detection method, storage medium and the smart machine repeated to name Download PDFInfo
- Publication number
- CN108427580A CN108427580A CN201810014461.2A CN201810014461A CN108427580A CN 108427580 A CN108427580 A CN 108427580A CN 201810014461 A CN201810014461 A CN 201810014461A CN 108427580 A CN108427580 A CN 108427580A
- Authority
- CN
- China
- Prior art keywords
- configuration
- name
- file
- xml file
- packet
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44505—Configuring for program initiating, e.g. using registry, configuration files
- G06F9/4451—User profiles; Roaming
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The present invention provides a kind of detection method, storage medium and smart machines that configuration repeats name, including:Obtain the environment file packet for waiting for that name repeats detection;The XML file in the environment file packet is searched, the XML file includes configuration pair;Thread is established for the XML file found, the configuration of the XML file is detected to carrying out repeating to name;The result of detection is repeated to name by default display rule display configuration.The present invention has found the problem of configuration is to bearing the same name in advance by detecting environment file packet, avoids load configuration clock synchronization from carrying out more mistakes occur when covering operation leads to subsequent development and operation to the configuration name re-defined, to which development efficiency can be improved.
Description
Technical field
The present invention relates to technical field of information processing more particularly to a kind of detection method that configuration repeats name, storages
Medium and smart machine.
Background technology
In Spring frames, the markup language using XML as configuration file realizes what configuration item and specific code were realized
Mapping, a configuration just form a bean to (configuration name-realization code).Wherein configuration name corresponds to attribute name or id,
Realize that code corresponds to attribute class.Due to the expansion of system scale and size of code and the alternating of developer, exploitation and test
Personnel are difficult the configuration name of all defined mistakes in complete grasp system, exist in subsequent exploitation and re-define configuration name
Situation.And under Spring frames, start-up loading configures clock synchronization, and meeting system automatically covers the bean name re-defined
Lid operation configures without mistake of dishing out when starting service and repeats to start and daily system testing in system deployment to name
When be difficult to be found, configuration repeats name to lead to product development failure, reduces development efficiency.
Invention content
An embodiment of the present invention provides a kind of configurations to naming the detection method, storage medium and the smart machine that repeat, with
Solve in the prior art, under Spring frames, start-up loading configures clock synchronization, can system automatically to the configuration name that re-defines into
Row covering operation configures without mistake of dishing out when starting service and repeats to start and daily system in system deployment to name
It is difficult to be found when test, configuration is to naming the problem of repeating to lead to product development failure, reduce development efficiency.
The first aspect of the embodiment of the present invention provides a kind of detection method that configuration repeats name, including:
Obtain the environment file packet for waiting for that name repeats detection;
The XML file in the environment file packet is searched, the XML file includes configuration pair;
Thread is established for the XML file found, the configuration of the XML file is detected to carrying out repeating to name;
The result of detection is repeated to name by default display rule display configuration.
The second aspect of the embodiment of the present invention provides a kind of smart machine, including memory and processor, described to deposit
Reservoir is stored with the computer program that can be run on the processor, and the processor is realized when executing the computer program
Following steps:
Obtain the environment file packet for waiting for that name repeats detection;
The XML file in the environment file packet is searched, the XML file includes configuration pair;
Thread is established for the XML file found, the configuration of the XML file is detected to carrying out repeating to name;
The result of detection is repeated to name by default display rule display configuration.
The third aspect of the embodiment of the present invention provides a kind of computer readable storage medium, the computer-readable storage
Media storage has computer program, the computer program to realize following steps when being executed by processor:
Obtain the environment file packet for waiting for that name repeats detection;
The XML file in the environment file packet is searched, the XML file includes configuration pair;
Thread is established for the XML file found, the configuration of the XML file is detected to carrying out repeating to name;
The result of detection is repeated to name by default display rule display configuration.
In the embodiment of the present invention, by obtaining the environment file packet for waiting for that name repeats detection, the environment file packet is searched
In XML file, the XML file include configuration pair, thread is established for the XML file found, to the XML file
Configuration to carrying out repeating to name detection, by default display rule display configuration to name repeat detection as a result, by ring
Border file packet carries out duplication of name detection, finds the problem of configuration is to bearing the same name in advance, and load configuration clock synchronization is avoided to match to what is re-defined
Setting name and cover operating leads to more mistakes occur when subsequent development and operation, to which development efficiency can be improved.
Description of the drawings
It to describe the technical solutions in the embodiments of the present invention more clearly, below will be to embodiment or description of the prior art
Needed in attached drawing be briefly described, it should be apparent that, the accompanying drawings in the following description be only the present invention some
Embodiment for those of ordinary skill in the art without having to pay creative labor, can also be according to these
Attached drawing obtains other attached drawings.
Fig. 1 is the implementation flow chart for the detection method that configuration provided in an embodiment of the present invention repeats name;
Fig. 2 is the specific implementation provided in an embodiment of the present invention for obtaining the step of waiting for the environment file packet that name repeats detection
Flow chart;
The specific implementation for the step of Fig. 3 is the XML file provided in an embodiment of the present invention searched in the environment file packet
Flow chart;
Fig. 4 be it is provided in an embodiment of the present invention establish thread for the XML file found, the XML file is matched
It sets to carrying out specific implementation flow chart the step of repeating to name detection;
Fig. 5 is that the configuration name provided in an embodiment of the present invention by all configurations pair in the XML file is compared one by one,
The specific implementation flow chart for the step of judging whether the configuration name repeated;
Fig. 6 is detection method of the configuration to name repetition including providing new configuration name that another embodiment of the present invention provides
Implementation flow chart;
Fig. 7 is the structure diagram of detection device provided in an embodiment of the present invention;
Fig. 8 is the schematic diagram of smart machine provided in an embodiment of the present invention.
Specific implementation mode
In order to make the invention's purpose, features and advantages of the invention more obvious and easy to understand, below in conjunction with the present invention
Attached drawing in embodiment, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that disclosed below
Embodiment be only a part of the embodiment of the present invention, and not all embodiment.Based on the embodiments of the present invention, this field
All other embodiment that those of ordinary skill is obtained without making creative work, belongs to protection of the present invention
Range.
Fig. 1 shows the implementation process for the detection method that configuration provided in an embodiment of the present invention repeats name, this method
Flow includes step S101 to S104.The specific implementation principle of each step is as follows:
S101:Obtain the environment file packet for waiting for that name repeats detection.
Wherein, the environment file packet is a compressed package for including XML file, and name repeats to refer to matching in XML file
Set to name repeat.Name repetition detection refers to that the name of the configuration pair in the XML file to the environment file packet carries out
Detection.
Specifically, as shown in Fig. 2, in embodiments of the present invention, described obtain waits for that name repeats the environment file packet detected
The step of include:
A1:Obtain environment file packet name.Specifically, it can voluntarily be inputted by developer.
A2:The storage road of the corresponding environment file packet of the environment file packet name is searched for according to the environment file packet name
Diameter.Wherein, the storage path of environment file packet includes the paths URL and local path.Specifically, when being inputted according to developer
When environment file packet life scans for, the environment file packet retrieved is by list display.
A3:The environment file packet for waiting for that name repeats detection is obtained based on the storage path.
Further, the step A3 includes:
A31:Detect the storage path.
A32:If detecting, the store path is the paths URL, according to the paths the URL download environment file packet, and
It stores to local.Wherein, developer can pre-set download there are address, to according to the paths URL by environment file
Packet is downloaded to local designated position.
A33:If detecting, the store path is local path, detects the selection instruction of developer's input.It is described
Selection instruction includes pulling to instruct.
A34:According to the selection instruction that developer inputs, determines and wait for that name repeats the environment file packet of detection.
Illustratively, when environment file packet is downloaded to local designated position according to the paths URL, detection exploitation
The dragging instruction of personnel's input, alternatively, when it is local path to detect the store path, detection developer's input is dragged
Drag instruction.When detecting that environment file coating is drawn to specified region, the environment file packet detected is determined as waiting for
Name repeats the environment file packet of detection.
In embodiments of the present invention, the scheme of the embodiment of the present invention is realized by developing CheckBean kits.Specifically
Ground, the CheckBean kits mainly are completed to develop by Java+Node.js, and front end is write using html+css.
Node.js is the running environment of a Javascript, and actually it is encapsulated to GoogleChromeV8 engines, it
It is mainly used for creating quick, expansible network application.Node.js uses event-driven and Non-Blocking I/O models, makes its change
Slightly and efficiently.CheckBean kits are a compressed packages.After in the decompression of CheckBean kits, installation is complete, fortune
Row CheckBean tools can be searched according to the search key such as environment file packet name etc. of developer's input on runnable interface
Rope environment file packet, the selection further according to developer determine the environment file packet for waiting for that name repeats detection.
S102:The XML file in the environment file packet is searched, the XML file includes configuration pair.
Specifically, XML is a kind of syntax format, text document can be made to have certain structure by XML, in order to journey
Sequence is parsed.In Spring frames, the markup language using XML as configuration file realizes configuration item and specific code
The mapping of realization.In the XML file of environment file packet, including at least one configuration, to (bean), a configuration name (configures
To name) and realize code just form a bean.Wherein configuration name corresponds to attribute name or id, realizes that code corresponds to and belongs to
Property class.
As an embodiment of the present invention, as shown in figure 3, above-mentioned S102 is specifically included:
B1:The environment file packet for waiting for that name repeats to detect is unziped it, file set is obtained.The file set
Conjunction includes XML file, it is also possible to further include subfile packet and extended formatting file.
B2:It detects and whether there is subfile packet in the file set.Wherein, subfile packet is compressed file packet.
B3:If there are subfile packets in the file set, the subfile packet is unziped it, obtains subfile
Set.The subfile set includes the file of XML file and/or other formats.
B4:Based on the file set and the subfile set, XML file is searched.
In embodiments of the present invention, to the environment file packet decompression for waiting for name and repeating detection, scanning search XML texts
Part, and whether there is subfile packet after detection pressurization contracting again, under-enumeration XML file is avoided, the accuracy rate of duplication of name detection is influenced.
S103:Thread is established for the XML file found, the configuration of the XML file is examined to carrying out repeating to name
It surveys.
In embodiments of the present invention, thread is established to XML file parallel detection.One thread can be understood as an independence
The processing detection unit of operation.Described after name repeats the environment file packet decompression of detection, the XML after decompression is searched
File.When finding an XML file, just creates a thread and the XML file is detected, find more than one
When XML file, just a thread is established for each XML file and be detected, so as to detect multiple XML files simultaneously, to
Improve detection efficiency.
Optionally, while to the XML file in more than one environment file packet it is detected.In embodiments of the present invention,
Developer can choose multiple environment file packets and be carried out at the same time duplication of name detection simultaneously.Further, when simultaneously to more than one ring
When XML file in the file packet of border is configured to duplication of name detection, a file is individually established for each environment file packet,
The testing result that the configuration of each environment file packet repeats name to detection is put into the file belonging to environment file packet, convenient
Developer understands that the bean of each environment file packet repeats testing result.
As an embodiment of the present invention, as shown in figure 4, the step S103 is specifically included:
C1:The XML file is parsed, the configuration name of all configurations pair in the XML file is obtained.
C2:The configuration name of all configurations pair in the XML file is compared one by one, judges whether that is repeated matches
Set name.
C3:If there is the configuration name repeated, the number of the configuration name of repetition is counted, is known with facilitating developer that can understand
There is the number of the configuration pair of same configuration name in road.
In embodiments of the present invention, the configuration name by whole configurations pair in XML file is compared one by one, is detected whether
There is repetition to configure name.If no, terminating the thread of the XML file.If so, then counting the configuration name and its number of repetition.
As an embodiment of the present invention, Fig. 5 shows step C2 in above-described embodiment provided in an embodiment of the present invention
Specific implementation flow, details are as follows:
C21:It is successively read the configuration name of configuration pair in the XML file, and the configuration of configuration name will have been read to write-in
It reads in record sheet.The record sheet that reads is the table pre-established for storing the configuration pair read.
C22:The configuration name for the configuration centering newly read and the configuration name of configuration pair in the reading record sheet are compared
Compared with.Specifically, deposit is read in record sheet in first configuration of reading, by the configuration name of second configuration centering of reading
It is compared with the configuration name of configuration pair in the reading record sheet, detects whether to bear the same name, and so on, it is successively read described
The configuration name of the configuration pair configuration name for reading configuration pair in record sheet is compared in XML file.
C23:If the configuration name for the configuration centering newly read is identical as the configuration configuration name of centering for reading record sheet storage,
Then have the configuration of same configuration name to duplication of name result table is written with the reading record sheet configuration pair of the new reading
In.The duplication of name result table is used to store the configuration pair with same configuration name.
In embodiments of the present invention, the detection speed of detection and the accuracy of detection are repeated to name to improve configuration,
The configuration of configuration name will be had read successively in the reading record sheet that pre-establishes of write-in, then by the configuration for the configuration pair newly read
Name is compared successively with the configuration name for reading the configuration pair being had been written into record sheet, judges whether there is renaming.If so, then will
The configuration of renaming is to being written to for storing in the duplication of name result table with same configuration name, to effectively record renaming
Configuration pair, avoids missing inspection.
Optionally, as an embodiment of the present invention, further include before the step S103:To the XML found
File carries out format detection, judges whether the format of XML file is legal, and illegal XML file is abandoned.
The efficiency that detection is repeated to improve configuration to name, is establishing thread, to described to the XML file found
The configuration of XML file to XML file to before carrying out repeating to name detection, first carrying out format detection.In embodiments of the present invention,
The XML file for possessing proper syntax is referred to as legal XML.It is in accordance with document type definition (DTD) to possess proper syntax
Syntax rule.Specifically, whether it is legal XML by the XML file of DTD verifications.
S104:The result of detection is repeated to name by default display rule display configuration.
In embodiments of the present invention, the default display rule includes the data category of display, and data category includes detection
XML file number, detection configuration pair number, renaming configuration pair number, occur renaming configuration pair XML
The number of file.Further, the renaming configuration ratio shared in total configuration in detection is also shown.It is described default
Show that rule can be self-defined by developer,
Optionally, as an embodiment of the present invention, when the configuration of duplication of name is to write-in duplication of name result table, the step
S104 further includes:Duplication of name result table is converted into JSON formats.JSON (JavaScript Object Notation) is a kind of
The data interchange format of lightweight.It is based on JavaScript Programming Language, Standard ECMA-262
The a subset of 3rd Edition-December 1999.JSON uses the text formatting for being totally independent of language, but also makes
With the custom (including C, C++, C#, Java, JavaScript, Perl, Python etc.) for being similar to C language family.JSON lattice
The data of formula are easy to people and read and write, while being also easy to machine parsing and generating, and effectively promote network transmission efficiency.
In embodiments of the present invention, by obtaining the environment file packet for waiting for that name repeats detection, the environment file is searched
XML file in packet, the XML file include configuration pair, and thread is established for the XML file found, to XML texts
The configuration of part parses the XML file, obtains all configurations pair in the XML file to carrying out repeating to name detection
Configuration name, be successively read in the XML file configuration name of configuration pair, and write-in is read in the configuration that will have read configuration name
In record sheet, the configuration name for the configuration centering newly read is compared with the configuration name of configuration pair in the reading record sheet,
If the configuration name for the configuration centering newly read is identical as the configuration configuration name of centering for reading record sheet storage, by the new reading
The configuration pair taken has the configuration of same configuration name to being written in duplication of name result table with the reading record sheet, to accurately read
The configuration pair in XML file, the number for the configuration pair that fast and easy statistics is born the same name is taken finally to press default display rule display configuration
To name repetition detection as a result, so that developer checks.By carrying out duplication of name detection to environment file packet, find to match in advance
The problem of setting to bearing the same name, avoiding load configuration clock synchronization from carrying out covering operation to the configuration name re-defined leads to subsequent development and fortune
Occur more mistakes when row, to which development efficiency can be improved.
As an embodiment of the present invention, Fig. 6 shows provided in an embodiment of the present invention a kind of including providing new configuration
The detection method that the configuration of name repeats name, details are as follows:
S201:Obtain the environment file packet for waiting for that name repeats detection.
S202:The XML file in the environment file packet is searched, the XML file includes configuration pair.
S203:Thread is established for the XML file found, the configuration of the XML file is examined to carrying out repeating to name
It surveys.
S204:The result of detection is repeated to name by default display rule display configuration.
In the present embodiment, the specific steps of step S201 to step S204 are referring to above-described embodiment step S101 to step
S104, details are not described herein.
S205:Obtain the realization code for the configuration centering that name repeats.Wherein, at one, configuration configures name and reality in
Modern code corresponds, i.e., one configuration name corresponds to a set of realization code.
S206:Extract the keyword in the realization code.
In embodiments of the present invention, as unit of word, feature is extracted from the realization code.Specifically, generation will be realized
Whether code is divided into the character string as unit of word, traverse the character string, check word in the word frequency look-up table pre-established.
If the word frequency of word described in the word frequency look-up table is added 1 by word in the word frequency look-up table pre-established, if institute's predicate
Not in the word frequency look-up table pre-established, then institute's predicate is added in the word frequency look-up table, and the word of institute's predicate
Frequency is set to 1.After the character string, which traverses, to be completed, the word frequency of word in the word frequency look-up table is counted, it is maximum to choose word frequency
Word is as the keyword for realizing code.
S207:According to the configuration name of the keyword and the configuration centering, the new configuration name of the configuration pair is generated.
In embodiments of the present invention, by the keyword extracted from the realization code of the configuration pair and the configuration
To configuration name be combined, generate the new configuration name of described configuration pair, so as to developer's reference, avoid naming again
The configuration pair repeated.
Optionally, the configuration name according to the keyword and the configuration centering generates the new of the configuration pair and matches
Setting name further includes:The configuration name of described keyword, the configuration centering is subjected to permutation and combination with preset spcial character, is generated
New configuration is named in the configuration.
In the embodiment of the present invention, the environment file packet for waiting for that name repeats detection is taken, the XML in the environment file packet is searched
File, the XML file include configuration pair, establish thread for the XML file found, the configuration to the XML file
Detection is named to carrying out repetition, shows rule display configuration to name repetition detection as a result, by environment file by default
Packet carries out duplication of name detection, finds the problem of configuration is to bearing the same name in advance, avoid load configuration clock synchronization to the configuration name that re-defines into
Row covering operation leads to more mistakes occur when subsequent development and operation, improves development efficiency, then obtain the configuration that name repeats
The realization code of centering extracts the keyword realized in code, according to the configuration of the keyword and the configuration centering
Name generates the new configuration name of the configuration pair, recommends developer's reference, avoids developer from naming repetition again, into one
Step improves development efficiency.
It should be understood that the size of the serial number of each step is not meant that the order of the execution order in above-described embodiment, each process
Execution sequence should be determined by its function and internal logic, the implementation process without coping with the embodiment of the present invention constitutes any limit
It is fixed.
Corresponding to the detection method that the configuration described in foregoing embodiments repeats name, Fig. 7 shows the embodiment of the present application
The structure diagram of the detection device of offer illustrates only and the relevant part of the embodiment of the present application for convenience of description.
With reference to Fig. 7, which includes:File packet acquiring unit 71, file search unit 72 are configured to detection unit
73, as a result display unit 74, wherein:
File packet acquiring unit 71, for obtaining the environment file packet for waiting for that name repeats detection;
File search unit 72, for searching the XML file in the environment file packet, the XML file includes matching
It sets pair;
Configuration is to detection unit 73, for establishing thread for the XML file found, the configuration to the XML file
To carrying out repeating name detection;
As a result display unit 74, the result for repeating detection to name by default display rule display configuration.
Optionally, the file search unit 72 includes:
File set acquisition module is obtained for being unziped it to the environment file packet for waiting for that name repeats to detect
File set;
Subfile packet detection module whether there is subfile packet for detecting in the file set;
Subfile combination acquisition module, if for there are subfile packets in the file set, to the subfile packet
It unzips it, obtains subfile set;
File search module, for based on the file set and the subfile set, searching XML file.
Optionally, described configure includes to detection unit 73:
Name acquisition module is configured, for being parsed to the XML file, obtains all configurations pair in the XML file
Configuration name;
Name comparison module is configured, for the configuration name of all configurations pair in the XML file to be compared one by one, is judged
With the presence or absence of the configuration name repeated;
If number statistical module counts the number of the configuration name of repetition for there is the configuration name repeated.
Optionally, the configuration name comparison module includes:
First write-in submodule, the configuration name for being successively read configuration pair in the XML file, and configuration will have been read
Write-in is read in record sheet in the configuration of name;
Name comparison sub-module is configured, the configuration name of the configuration centering for will newly read is configured with the reading record sheet
To configuration name be compared;
Second write-in submodule, if the configuration name of the configuration centering for newly reading and the configuration pair for reading record sheet storage
In configuration name it is identical, then by the new reading configuration pair with it is described reading record sheet in have similarly configure name configuration pair
It is written in duplication of name result table.
Optionally, the detection device further includes:
Code obtaining unit, the realization code for obtaining the configuration centering that name repeats;
Keyword extracting unit, for extracting the keyword in the realization code;
Name generation unit is configured, for the configuration name according to the keyword and the configuration centering, generates the configuration
To new configuration name.
In the embodiment of the present invention, by obtaining the environment file packet for waiting for that name repeats detection, the environment file packet is searched
In XML file, the XML file include configuration pair, thread is established for the XML file found, to the XML file
Configuration to carrying out repeating to name detection, by default display rule display configuration to name repeat detection as a result, by ring
Border file packet carries out duplication of name detection, finds the problem of configuration is to bearing the same name in advance, and load configuration clock synchronization is avoided to match to what is re-defined
Setting name and cover operating leads to more mistakes occur when subsequent development and operation, to which development efficiency can be improved.
Fig. 8 is the schematic diagram for the smart machine that one embodiment of the invention provides.As shown in figure 8, the intelligence of the embodiment is set
Standby 8 include:Processor 80, memory 81 and it is stored in the meter that can be run in the memory 81 and on the processor 80
Calculation machine program 82, such as road conditions prediction program.The processor 80 realizes above-mentioned each match when executing the computer program 82
The step in the processing method embodiment repeated to name, such as step 101 shown in FIG. 1 are set to 104.Alternatively, the processing
Device 80 realizes the function of each module/unit in above-mentioned each device embodiment when executing the computer program 82, such as shown in Fig. 7
The function of module 71 to 74.
Illustratively, the computer program 82 can be divided into one or more module/units, it is one or
Multiple module/units are stored in the memory 81, and are executed by the processor 80, to complete the present invention.Described one
A or multiple module/units can be the series of computation machine program instruction section that can complete specific function, which is used for
Implementation procedure of the computer program 82 in the smart machine 8 is described.
The smart machine 8 can be that the calculating such as desktop PC, notebook, palm PC and high in the clouds smart machine are set
It is standby.The smart machine may include, but be not limited only to, processor 80, memory 81.It will be understood by those skilled in the art that Fig. 8
The only example of smart machine 8 does not constitute the restriction to smart machine 8, may include than illustrating more or fewer portions
Part either combines certain components or different components, such as the smart machine can also include input-output equipment, net
Network access device, bus etc..
The processor 80 can be central processing unit (Central Processing Unit, CPU), can also be
Other general processors, digital signal processor (Digital Signal Processor, DSP), application-specific integrated circuit
(Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field-
Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic,
Discrete hardware components etc..General processor can be microprocessor or the processor can also be any conventional processor
Deng.
The memory 81 can be the internal storage unit of the smart machine 8, such as the hard disk of smart machine 8 or interior
It deposits.The memory 81 can also be to be equipped on the External memory equipment of the smart machine 8, such as the smart machine 8
Plug-in type hard disk, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card dodge
Deposit card (Flash Card) etc..Further, the memory 81 can also both include the storage inside list of the smart machine 8
Member also includes External memory equipment.The memory 81 is for storing needed for the computer program and the smart machine
Other programs and data.The memory 81 can be also used for temporarily storing the data that has exported or will export.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, it can also
It is that each unit physically exists alone, it can also be during two or more units be integrated in one unit.Above-mentioned integrated list
The form that hardware had both may be used in member is realized, can also be realized in the form of SFU software functional unit.
If the integrated module/unit be realized in the form of SFU software functional unit and as independent product sale or
In use, can be stored in a computer read/write memory medium.Based on this understanding, the present invention realizes above-mentioned implementation
All or part of flow in example method, can also instruct relevant hardware to complete, the meter by computer program
Calculation machine program can be stored in a computer readable storage medium, the computer program when being executed by processor, it can be achieved that on
The step of stating each embodiment of the method.Wherein, the computer program includes computer program code, the computer program generation
Code can be source code form, object identification code form, executable file or certain intermediate forms etc..The computer-readable medium
May include:Any entity or device, recording medium, USB flash disk, mobile hard disk, magnetic of the computer program code can be carried
Dish, CD, computer storage, read-only memory (ROM, Read-Only Memory), random access memory (RAM,
Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium etc..It should be noted that described
The content that computer-readable medium includes can carry out increasing appropriate according to legislation in jurisdiction and the requirement of patent practice
Subtract, such as in certain jurisdictions, according to legislation and patent practice, computer-readable medium does not include electric carrier signal and electricity
Believe signal.
Embodiment described above is merely illustrative of the technical solution of the present invention, rather than its limitations;Although with reference to aforementioned reality
Applying example, invention is explained in detail, it will be understood by those of ordinary skill in the art that:It still can be to aforementioned each
Technical solution recorded in embodiment is modified or equivalent replacement of some of the technical features;And these are changed
Or replace, the spirit and scope for various embodiments of the present invention technical solution that it does not separate the essence of the corresponding technical solution should all
It is included within protection scope of the present invention.
Claims (10)
1. a kind of detection method that configuration repeats name, which is characterized in that including:
Obtain the environment file packet for waiting for that name repeats detection;
The XML file in the environment file packet is searched, the XML file includes configuration pair;
Thread is established for the XML file found, the configuration of the XML file is detected to carrying out repeating to name;
The result of detection is repeated to name by default display rule display configuration.
2. according to the method described in claim 1, it is characterized in that, described search XML file in the environment file packet
Step, including:
The environment file packet for waiting for that name repeats to detect is unziped it, file set is obtained;
It detects and whether there is subfile packet in the file set;
If there are subfile packets in the file set, the subfile packet is unziped it, obtains subfile set;
Based on the file set and the subfile set, XML file is searched.
3. according to the method described in claim 1, it is characterized in that, described establish thread for the XML file found, to institute
The step of configuration of XML file is to carrying out repeating to name detection is stated, including:
The XML file is parsed, the configuration name of all configurations pair in the XML file is obtained;
The configuration name of all configurations pair in the XML file is compared one by one, judges whether the configuration name repeated;
If there is the configuration name repeated, the number of the configuration name of repetition is counted.
4. according to the method described in claim 3, it is characterized in that, the configuration by all configurations pair in the XML file
Name be compared one by one, judge whether repeat configuration name the step of, including:
It is successively read the configuration name of configuration pair in the XML file, and the configuration for having read configuration name is read into record to write-in
In table;
The configuration name for the configuration centering newly read is compared with the configuration name of configuration pair in the reading record sheet;
If the configuration name for the configuration centering newly read is identical as the configuration configuration name of centering for reading record sheet storage, will be described
The configuration pair newly read has the configuration of same configuration name in write-in duplication of name result table with the reading record sheet.
5. method according to any one of claims 1 to 4, which is characterized in that match by default display rule display described
After setting the step of repeating the result of detection to name, including:
Obtain the realization code for the configuration centering that name repeats;
Extract the keyword in the realization code;
According to the configuration name of the keyword and the configuration centering, the new configuration name of the configuration pair is generated.
6. a kind of computer readable storage medium, the computer-readable recording medium storage has computer program, feature to exist
In realizing that configuration repeats name as described in any one of claim 1 to 5 when the computer program is executed by processor
The step of processing method.
7. a kind of smart machine, including memory, processor and it is stored in the memory and can be on the processor
The computer program of operation, which is characterized in that the processor realizes following steps when executing the computer program:
Obtain the environment file packet for waiting for that name repeats detection;
The XML file in the environment file packet is searched, the XML file includes configuration pair;
Thread is established for the XML file found, the configuration of the XML file is detected to carrying out repeating to name;
The result of detection is repeated to name by default display rule display configuration.
8. smart machine as claimed in claim 7, which is characterized in that when the XML texts searched in the environment file packet
The step of part, including:
The environment file packet for waiting for that name repeats to detect is unziped it, file set is obtained;
It detects and whether there is subfile packet in the file set;
If there are subfile packets in the file set, the subfile packet is unziped it, obtains subfile set;
Based on the file set and the subfile set, XML file is searched.
9. smart machine as claimed in claim 7, which is characterized in that it is described to establish thread for the XML file found, it is right
The step of configuration of the XML file is to carrying out repeating to name detection, including:
The XML file is parsed, the configuration name of all configurations pair in the XML file is obtained;
The configuration name of all configurations pair in the XML file is compared one by one, judges whether the configuration name repeated;
If there is the configuration name repeated, the number of the configuration name of repetition is counted.
10. such as claim 7 to 9 any one of them smart machine, which is characterized in that the processor executes the computer
Following steps are also realized when program:
Obtain the realization code for the configuration centering that name repeats;
Extract the keyword in the realization code;
According to the configuration name of the keyword and the configuration centering, the new configuration name of the configuration pair is generated.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810014461.2A CN108427580B (en) | 2018-01-08 | 2018-01-08 | Configuration pair naming repetition detection method, storage medium and intelligent device |
PCT/CN2018/082831 WO2019134297A1 (en) | 2018-01-08 | 2018-04-12 | Method and device for detecting configuration pair naming duplicate, storage medium, and smart device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810014461.2A CN108427580B (en) | 2018-01-08 | 2018-01-08 | Configuration pair naming repetition detection method, storage medium and intelligent device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108427580A true CN108427580A (en) | 2018-08-21 |
CN108427580B CN108427580B (en) | 2020-01-10 |
Family
ID=63155806
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810014461.2A Active CN108427580B (en) | 2018-01-08 | 2018-01-08 | Configuration pair naming repetition detection method, storage medium and intelligent device |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN108427580B (en) |
WO (1) | WO2019134297A1 (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112272320A (en) * | 2020-10-20 | 2021-01-26 | Vidaa美国公司 | Display device and duplicate name detection method thereof |
CN112306508A (en) * | 2020-10-13 | 2021-02-02 | 武汉木仓科技股份有限公司 | Configuration information file updating method and device and processing equipment |
CN114237719A (en) * | 2020-09-09 | 2022-03-25 | 中国联合网络通信集团有限公司 | USB flash disk identification method, system, computer equipment and storage medium |
US12015821B2 (en) | 2020-09-21 | 2024-06-18 | VIDAA USA, Inc. | Display apparatus and signal transmission method for display apparatus |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP2113839A1 (en) * | 2008-04-30 | 2009-11-04 | SpringSource Limited | A computer system and a method of deploying an application in a computer system |
CN104461508A (en) * | 2014-11-12 | 2015-03-25 | 国云科技股份有限公司 | Method for solving problem of duplication of names of functions in JS files |
CN106294164A (en) * | 2016-08-15 | 2017-01-04 | 中国银行股份有限公司 | A kind of code check method and device |
CN106874442A (en) * | 2017-02-08 | 2017-06-20 | 三和智控(北京)***集成有限公司 | Named by data name and realize data from the method and device for carrying characteristic information |
CN107463683A (en) * | 2017-08-09 | 2017-12-12 | 上海壹账通金融科技有限公司 | The naming method and terminal device of code element |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7500223B2 (en) * | 2004-01-02 | 2009-03-03 | International Business Machines Corporation | Automatically creating JavaScript objects to invoke methods on server-side Java beans |
CN105446874B (en) * | 2014-09-25 | 2019-03-15 | 北京畅游天下网络技术有限公司 | A kind of detection method and device of resource distribution file |
CN105045598A (en) * | 2015-08-07 | 2015-11-11 | 北京思特奇信息技术股份有限公司 | Java-based web front-end performance optimization and online method and system |
-
2018
- 2018-01-08 CN CN201810014461.2A patent/CN108427580B/en active Active
- 2018-04-12 WO PCT/CN2018/082831 patent/WO2019134297A1/en active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP2113839A1 (en) * | 2008-04-30 | 2009-11-04 | SpringSource Limited | A computer system and a method of deploying an application in a computer system |
CN104461508A (en) * | 2014-11-12 | 2015-03-25 | 国云科技股份有限公司 | Method for solving problem of duplication of names of functions in JS files |
CN106294164A (en) * | 2016-08-15 | 2017-01-04 | 中国银行股份有限公司 | A kind of code check method and device |
CN106874442A (en) * | 2017-02-08 | 2017-06-20 | 三和智控(北京)***集成有限公司 | Named by data name and realize data from the method and device for carrying characteristic information |
CN107463683A (en) * | 2017-08-09 | 2017-12-12 | 上海壹账通金融科技有限公司 | The naming method and terminal device of code element |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114237719A (en) * | 2020-09-09 | 2022-03-25 | 中国联合网络通信集团有限公司 | USB flash disk identification method, system, computer equipment and storage medium |
CN114237719B (en) * | 2020-09-09 | 2023-11-28 | 中国联合网络通信集团有限公司 | USB flash disk identification method, system, computer equipment and storage medium |
US12015821B2 (en) | 2020-09-21 | 2024-06-18 | VIDAA USA, Inc. | Display apparatus and signal transmission method for display apparatus |
CN112306508A (en) * | 2020-10-13 | 2021-02-02 | 武汉木仓科技股份有限公司 | Configuration information file updating method and device and processing equipment |
CN112272320A (en) * | 2020-10-20 | 2021-01-26 | Vidaa美国公司 | Display device and duplicate name detection method thereof |
CN112272320B (en) * | 2020-10-20 | 2022-04-15 | Vidaa美国公司 | Display device and duplicate name detection method thereof |
Also Published As
Publication number | Publication date |
---|---|
CN108427580B (en) | 2020-01-10 |
WO2019134297A1 (en) | 2019-07-11 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN107704265B (en) | Configurable rule generation method for service flow | |
WO2019051420A1 (en) | Automating identification of code snippets for library suggestion models | |
CN108427580A (en) | Configure detection method, storage medium and the smart machine repeated to name | |
CN110688307B (en) | JavaScript code detection method, device, equipment and storage medium | |
CN110502227B (en) | Code complement method and device, storage medium and electronic equipment | |
CN107644323A (en) | A kind of intelligent checks system of service-oriented stream | |
US20150142718A1 (en) | Ontology-Aided Business Rule Extraction Using Machine Learning | |
CN112015430A (en) | JavaScript code translation method and device, computer equipment and storage medium | |
CN111124479B (en) | Method and system for analyzing configuration file and electronic equipment | |
CN110262783B (en) | Interface generation method and device and terminal equipment | |
US20160321218A1 (en) | System and method for transforming image information for a target system interface | |
US8996357B2 (en) | Method for generating diagrams, and information processing apparatus for same | |
CN109325217B (en) | File conversion method, system, device and computer readable storage medium | |
CN107368500B (en) | Data extraction method and system | |
US7882429B2 (en) | High-level virtual machine for fast XML parsing and validation | |
US11144430B2 (en) | System and method for evaluating and facilitating customized guidelines using usability code pattern analysis | |
CN115469849B (en) | Service processing system, method, electronic equipment and storage medium | |
Aivaloglou et al. | A grammar for spreadsheet formulas evaluated on two large datasets | |
CN109284268A (en) | A kind of method, system and the electronic equipment of fast resolving log | |
Le Zou et al. | On synchronizing with web service evolution | |
CN115146070A (en) | Key value generation method, knowledge graph generation method, device, equipment and medium | |
US20220222065A1 (en) | System and method of computer-assisted computer programming | |
CN111950257A (en) | File analysis method and device | |
JP2005122398A (en) | Dynamic document generating program, recording medium thereof, dynamic document generating device, and dynamic document generating method | |
CN111368522A (en) | Information generation method and device, computer equipment and computer readable storage 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 |