CN106951399A - A kind of method and device for quickly generating ONIX normative documents - Google Patents

A kind of method and device for quickly generating ONIX normative documents Download PDF

Info

Publication number
CN106951399A
CN106951399A CN201710178592.XA CN201710178592A CN106951399A CN 106951399 A CN106951399 A CN 106951399A CN 201710178592 A CN201710178592 A CN 201710178592A CN 106951399 A CN106951399 A CN 106951399A
Authority
CN
China
Prior art keywords
onix
file
specifications
target product
product information
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
Application number
CN201710178592.XA
Other languages
Chinese (zh)
Other versions
CN106951399B (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.)
BEIJING JETSEN TECHNOLOGY Co Ltd
Original Assignee
BEIJING JETSEN TECHNOLOGY Co 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 BEIJING JETSEN TECHNOLOGY Co Ltd filed Critical BEIJING JETSEN TECHNOLOGY Co Ltd
Priority to CN201710178592.XA priority Critical patent/CN106951399B/en
Publication of CN106951399A publication Critical patent/CN106951399A/en
Application granted granted Critical
Publication of CN106951399B publication Critical patent/CN106951399B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/103Formatting, i.e. changing of presentation of documents

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Document Processing Apparatus (AREA)

Abstract

The present invention provides a kind of method and device for quickly generating ONIX normative documents, methods described includes positioning each level element in ONIX specifications using predefined paths language, and according to the path file obtained by positioning, target product information is converted into the intermediate file that at least part content meets ONIX specifications, standardization processing is carried out to intermediate file again, entire contents is met ONIX specifications, the corresponding ONIX normative documents of target product information are quickly generated eventually through templated synthesis.It can be seen that, the present invention realizes a kind of automation scheme for quickly generating ONIX normative documents, user only needs to provide target product information to be converted, and trigger the generating process of ONIX normative documents quickly generating for ONIX normative documents can be achieved, the file structure of ONIX specifications need not be considered, process is complicated when efficiently solving prior art generation ONIX normative documents, efficiency it is relatively low under the problems such as.

Description

A kind of method and device for quickly generating ONIX normative documents
Technical field
ONIX (Online are quickly generated the invention belongs to digital publishing technical field, more particularly to one kind Information exchange, online information is exchanged) method and device of normative document.
Background technology
Under the background in mobile Internet and big data epoch, the convergence of traditional publication and New Media further can not Stop, descriptions and DIF of the ONIX by duplication checking information in the unified standard publication field of circulation can be met out Version person is by internet to publisher (such as whole seller, dealer, retailer, internet book store or other publishing houses), library Deng terminal client and other be related in the supply chain of Books Marketing the demand that related trading partner transmits books electronic information, ONIX specifications provide comprehensive, deep level development, using and management publication product information digital solution, it can By integrating distribution of publications information resources, to realize " time processing, whole process is shared " of publication product information, for build across Languages, across media, trans-regional open publication circulation information platform provide required technical foundation.
(CN Online Information eXchange, China exists for development and national standard CNONIX with ONIX Line information is exchanged) appearance, ONIX files and its related derivative standard as publication information carrier will in Publishing Industry it is wide General application.At present, when by the use of ONIX files and its related derivative standard as publication information carrier, usually through following methods The corresponding ONIX normative documents of produce product information are published in generation:
(1) definition and the one by one corresponding node object of each element in manual creation ONIX specifications;
(2) according to the hierarchical relationship between each element in ONIX specifications, the set membership between each node object is built, and be based on Publication product information creates the example of each node object;
(3) ONIX files (file where the node object of establishment) root node is serialized, generation correspondence ONIX normative documents.
The method for generating ONIX normative documents above, hence it is evident that have the disadvantages that:Founder needs to take considerable time Manual creation node object simultaneously builds the set membership between each node object;And because ONIX specifications/standard is complex in itself, Hierarchical structure is more, and founder is relying on file structure/hierarchical structure of ONIX specifications, during manual creation ONIX normative documents, Establishment process is relatively complicated.
The content of the invention
In view of this, it is an object of the invention to provide a kind of method and device for quickly generating ONIX normative documents, purport Complicated, the technical problem under efficiency is relatively low in the establishment process for solving to exist when prior art is generating ONIX normative documents.
Therefore, the present invention is disclosed directly below technical scheme:
A kind of method for quickly generating ONIX normative documents, including:
Obtain target product information to be converted;
The ONIX template files of the predetermined file form created according to ONIX specifications are obtained, and are created according to ONIX specifications The path file for the predefined paths language format built;Wherein, the ONIX template files include:With the root element in ONIX specifications Corresponding root node and the NameSpace of ONIX specifications, the path file are included according to each yuan provided in ONIX specifications The routing information for each element that the hierarchical relationship of element is set up;
According to the path file, the target product information is converted at least part content and met in ONIX specifications Between file;Wherein, the intermediate file includes:Meet the routing information in the path file and believed based on the target product Breath completes each node element of instantiation;
When the intermediate file only partial content meets ONIX specifications, standardization processing is carried out to the intermediate file, Obtain the result file that full content meets ONIX specifications;
Predetermined synthesis processing is carried out to the result file and the ONIX template files, the target production is obtained The corresponding ONIX normative documents of product information.
The above method, it is preferred that acquisition target product information to be converted, including:
Target product information is gathered, and generates the formfile for including the target product information.
The above method, it is preferred that the ONIX template files according to ONIX specification creation predetermined file forms, and in advance Determine the path file of path language form, including:
According to ONIX specifications, ONIX template files are created using extended-boundary-condition method file format;
The hierarchical relationship of each element provided according to ONIX specifications, each element is set up using XML Path Language Xpath Routing information, obtain path file.
The above method, it is preferred that the intermediate file only partial content meets ONIX specifications and is:Determined by resource inspection Go out at least one the local resource address for existing in the intermediate file and not meeting ONIX specifications;
It is then described when the intermediate file only partial content meets ONIX specifications, the intermediate file is standardized Processing, including:
At least one local resource corresponding at least one local resource address in the intermediate file is uploaded to Cyberspace, and obtain uploaded resource corresponding Uniform Resource Identifier URI in cyberspace;
At least one local resource address in the intermediate file is replaced with into corresponding Uniform Resource Identifier URI.
The above method, it is preferred that described that predetermined conjunction is carried out to the result file and the ONIX template files Into processing, including:
Create the template copies of the ONIX template files, the template copies and the content one of the ONIX template files Cause;
The file content of the result file is filled to the root node of the template copies, the target is obtained The corresponding ONIX normative documents of product information.
The above method, it is preferred that in the ONIX templates of the predetermined file form for obtaining and being created according to ONIX specifications After file, also include:
According to predetermined checking specification, and corresponding verification tool is used, verify the correctness of the ONIX template files.
A kind of device for quickly generating ONIX normative documents, including:
First acquisition unit, the target product information to be converted for obtaining;
Second acquisition unit, the ONIX template files for obtaining the predetermined file form created according to ONIX specifications, And the path file of the predefined paths language format created according to ONIX specifications;Wherein, the ONIX template files include:With The NameSpace of the corresponding root node of root element in ONIX specifications and ONIX specifications, the path file is included according to ONIX The routing information for each element that the hierarchical relationship of each element provided in specification is set up;
Converting unit, for according to the path file, the target product information to be converted at least part content symbol Close the intermediate file of ONIX specifications;Wherein, the intermediate file includes:Meet the routing information in the path file and be based on The target product information completes each node element of instantiation;
Processing unit, for when the intermediate file only partial content meets ONIX specifications, entering to the intermediate file Row standardization processing, obtains the result file that full content meets ONIX specifications;
Synthesis unit, is handled for carrying out predetermined synthesis to the result file and the ONIX template files, Obtain the corresponding ONIX normative documents of the target product information.
Said apparatus, it is preferred that the first acquisition unit, is further used for:
Target product information is gathered, and generates the formfile for including the target product information.
Said apparatus, it is preferred that the establishment of ONIX template files and path file acquired in the second acquisition unit Process includes:
According to ONIX specifications, ONIX template files are created using extended-boundary-condition method file format;According to ONIX specifications The hierarchical relationship of each element provided, the routing information of each element is set up using XML Path Language Xpath, path is obtained File.
Said apparatus, it is preferred that the intermediate file only partial content meets ONIX specifications and is:Determined by resource inspection Go out at least one the local resource address for existing in the intermediate file and not meeting ONIX specifications;Then the processing unit, enters one Walking is used for:
At least one local resource corresponding at least one local resource address in the intermediate file is uploaded to Cyberspace, and obtain uploaded resource corresponding Uniform Resource Identifier URI in cyberspace;By the intermediate file In at least one local resource address replace with corresponding Uniform Resource Identifier URI.
Said apparatus, it is preferred that the synthesis unit, is further used for:
Create the template copies of the ONIX template files, the template copies and the content one of the ONIX template files Cause;The file content of the result file is filled to the root node of the template copies, the target product is obtained The corresponding ONIX normative documents of information.
Said apparatus, it is preferred that also include:
Authentication unit, for according to predetermined checking specification, and uses corresponding verification tool, verifies the ONIX templates The correctness of file.
The method for quickly generating ONIX normative documents provided from above scheme, the present invention, including use predetermined road Footpath language (such as Xpath) is positioned to each level element in ONIX specifications, and according to first comprising each level obtained by positioning The path file of plain routing information, the intermediate file that at least part content meets ONIX specifications is converted to by target product information, Standardization processing is carried out to the intermediate file again, entire contents is met ONIX specifications, it is fast eventually through templated synthesis The corresponding ONIX normative documents of target product information are generated fastly.As can be seen here, the present invention realizes one kind and quickly generates ONIX The automation implementation of normative document, when using the present invention program, user only needs to provide target product letter to be converted Cease, and trigger the generating process of ONIX normative documents and quickly generating for ONIX normative documents can be achieved, it is not necessary to consider that ONIX is advised File structure/hierarchical structure of model, process complexity, efficiency are relatively low when efficiently solving prior art generation ONIX normative documents Inferior technical problem.
Brief description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, below will be to embodiment or existing The accompanying drawing to be used needed for having technology description is briefly described, it should be apparent that, drawings in the following description are only this The embodiment of invention, for those of ordinary skill in the art, on the premise of not paying creative work, can also basis The accompanying drawing of offer obtains other accompanying drawings.
Fig. 1 is the method flow diagram for quickly generating ONIX normative documents that the embodiment of the present invention one is provided;
Fig. 2 is the acquisition interface schematic diagram for the target product information that the embodiment of the present invention one is provided;
Fig. 3 is the additional resource process chart that the embodiment of the present invention one is provided;
Fig. 4 is the brief schematic flow sheet of the inventive method that the embodiment of the present invention one is provided;
Fig. 5 is the method flow diagram for quickly generating ONIX normative documents that the embodiment of the present invention two is provided;
Fig. 6-Fig. 7 is the structural representation for the device for quickly generating ONIX normative documents that the embodiment of the present invention three is provided.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is carried out clear, complete Site preparation is described, it is clear that described embodiment is only a part of embodiment of the invention, rather than whole embodiments.It is based on Embodiment in the present invention, it is every other that those of ordinary skill in the art are obtained under the premise of creative work is not made Embodiment, belongs to the scope of protection of the invention.
Embodiment one
The embodiment of the present invention one provides a kind of method for quickly generating ONIX normative documents, for generate books, e-book, The corresponding ONIX normative documents of all kinds of publication product informations such as CD, ONIX normative documents are quickly generated with reference to shown in Fig. 1 Method flow diagram, methods described may comprise steps of:
Step 101, acquisition target product information to be converted.
The target product information to be converted, can be with ONIX normative documents generate the books of demand, e-book, The corresponding product information of all kinds of publications such as CD, publication product information generally comprises but is not limited to title, price, publication The much informations such as society, publication ground, product form.
The present invention provides graphical interaction interface especially by user, and the figure is passed through to gather acquisition user Change the target product information to be converted that interactive interface is inputted, i.e., the target product letter of demand is generated with ONIX normative documents Breath, with reference to Fig. 2, Fig. 2 shows a kind of examples of interfaces figure of the graphical interaction interface with product information acquisition function.
When user, which exists, generates demand to the ONIX normative documents of a certain product or certain batch of product, the figure can be passed through The corresponding product information of shape interactive interface typing, on this basis, the execution body of the inventive method for example can be with software What mode was realized there is the inventive method to handle the processing unit or system of logic, and user is in graphical interaction interface for collection The product information of typing, and the product information based on collection generates a corresponding formfile, to be embodied as follow-up ONIX standards Product information needed for the generation of file is provided is basic.
In other embodiment of the present invention, target product to be converted can also be obtained by way of automatically extracting Information, can be (and inhuman by automatically extracting for example, for generating a certain e-book of demand with ONIX normative documents Work typing) e-book the information such as title, price, publishing house, realize the acquisition of target product information.
Step 102, the ONIX template files for obtaining the predetermined file form created according to ONIX specifications, and according to ONIX The path file for the predefined paths language format that specification is created;Wherein, the ONIX template files include:With in ONIX specifications The corresponding root node of root element and ONIX specifications NameSpace, the path file includes providing according in ONIX specifications Each element the routing information of each element set up of hierarchical relationship.
The inventive method is follow-up to combine profit by the ONIX template file and path file general according to ONIX specification creations With the ONIX template files, path file and the target product information to be converted, to generate the target product information Corresponding ONIX normative documents.
ONIX specifications provide the hierarchical relationship between each element, attribute and each element that constitute ONIX normative documents.Tool Body, in general, ONIX specifications are provided with root element onixMessage (root element is used to state an ONIX message), production Various other elements such as product element product and title, price, publishing house, while the attribute of respective element presence is stated, Such as positive title of title presence, additional title attribute, and define the hierarchical relationship between each element, for example, product element Product is root element onixMessage lower floor's element, the element such as title, price, publishing house for product element lower floor's member Element etc..
The present embodiment specifically uses XML (eXtensible Markup Language, extensible markup language) tray Formula creates ONIX template files, and the ONIX template files created remain the root element and NameSpace of ONIX specifications, i.e., Specifically, root element onixMessage and the product element in ONIX specifications is described using XML, so as to create To ONIX template files include based on XML describe onixMessage root nodes and product child nodes.
Correspondingly, the hierarchical relationship for each element that the present embodiment is provided according to ONIX specifications, using Xpath (XML paths Language) routing information of each element is set up, obtain path file.Wherein, it need to ensure that (correspondence removes root element for each child node Outside other elements) create unique XPath paths, that is, ensure that each node has unique correspondence position, therefore XPath Condition description in path for node does not allow keywords such as " or " occur, but allows " and " keyword, such as fruit section occur The corresponding father node of point has fixed value (the declaratively numerical value of such as father node), it is also desirable to increase father node in XPath descriptions For the description of value, father node corresponding for child node, independent XPath paths are described without being individually for it, son section is created During point, system can create corresponding father node for it automatically according to the path of child node.
After the establishment of path file is completed, the path file of establishment need to be preserved, preservation form permission is self-defined, It can be directly described by enumerated variable, XML format can also be taken to be preserved.In the present embodiment, it is specific to use The preservation for the scheme realizing route file being described by enumerated variable.
It should be noted that the ONIX template files and path file is the general texts needed for generation ONIX normative documents Part, in the case where the content of ONIX specifications does not change and (such as upgrades and update), the ONIX template files and path text Part correspondingly will not also change, based on this, can regard the generating process of ONIX template files and path file as the present invention The pre-treatment step of method is fulfiled ahead of schedule, so as to when carrying out the generation of ONIX normative documents, can directly obtain what is previously generated ONIX template files and path file, and it is used.
Step 103, according to the path file, the target product information is converted at least part content and meets ONIX The intermediate file of specification;Wherein, the intermediate file includes:Meet the routing information in the path file and be based on the mesh Mark product information completes each node element of instantiation.
On the basis of acquisition target product information to be converted and general ONIX normative documents, path file, this step Suddenly according to the path file, the target product information is converted into the middle text that at least part content meets ONIX specifications Part.
Wherein, the generating process for the intermediate file that at least part content meets ONIX specifications includes:
1) each hierarchy node in the Xpath paths that include of identification path file, and node attribute (including node type And ID etc.) and property value;
2) node is carried out successively according to the node and property value identified and attribute is created.
Specifically, it is primarily based on recognition result and creates node, the corresponding attribute of node is created afterwards, is finally produced using target Corresponding information in product information is node valuation, and realization is instantiated to node.Create in node process if running into path Identical node, then take additional strategy, i.e., increase the new brotgher of node at the same level under the node existed, for example, mesh Two front covers that can mutually replace may be included in mark product information, it is intended to so that being used in different publishing houses/publication date Different front covers are published, for such a situation, when carrying out the establishment of front cover node, then can be tactful using above-mentioned addition, Two fraternal front cover nodes at the same level are created under identical front cover node path.
3) recursive strategies are used, the step 2 of the above is repeated), after the completion of recursive procedure, that is, realize whole path text The generation and instantiation of node in part corresponding to all XPath, can obtain the centre that at least part content meets ONIX specifications File.
Wherein, the digital form quotation content of all additional resources in ONIX code requirements ONIX files is using unified Resource identifier (URI, Uniform Resource Identifier), without allowing local resource link etc. occur originally Ground resource address.Based on this, at least part content of intermediate file meets ONIX specifications, refers to there may be in intermediate file The not permitted appearance of ONIX specifications, that is, do not meet the local resource address of ONIX specifications.In view of intermediate file correspondence include or Not comprising local resource address both of these case, so that the intermediate file of generation is probably to comply fully with ONIX specifications (situation for not including local resource address), it is also possible to be not fully consistent with ONIX specifications and (include the feelings of local resource address Condition), namely at least part content of intermediate file meets ONIX specifications.
Step 104, when the intermediate file only partial content meets ONIX specifications, to the intermediate file carry out specification Change is handled, and obtains the result file that full content meets ONIX specifications.
In view of the intermediate file may be comprising the local resource address not permitted in ONIX specifications, with reference to Fig. 3, this step Especially by the address that all additional resources in resource inspection, analysis intermediate file are carried out to the intermediate file, in judging Between file whether include local resource address, if under certain node of intermediate file include local resource address, by the node It is put into the XML node container being pre-created.
The node of ONIX specifications is not met for each in XML node container, that reads that it includes does not meet ONIX specifications Local resource address, and then obtain the local resource indicated by the local resource address, and the local resource is uploaded To cyberspace, so that local resource is converted into Internet resources, while obtaining, to upload resource right in cyberspace The Uniform Resource Identifier URI answered, wherein, cyberspace can use third-party platform, can also carry out self-built.On this basis, By all local resource addresses for not meeting ONIX specifications included in intermediate file, replace with and meet ONIX specifications accordingly Uniform Resource Identifier URI, it is achieved thereby that carrying out standardization processing to intermediate file so that entire contents meet ONIX Specification.
When intermediate file does not include local resource address, then it need not be carried out at above-mentioned resource conversion Reason.
Step 105, the synthesis processing predetermined to the result file and ONIX template files progress, obtain institute State the corresponding ONIX normative documents of target product information.
Standardization processing is being carried out to intermediate file, obtained after the result file, this step is to the processing Destination file and the ONIX template files carry out predetermined synthesis processing, and obtaining the corresponding ONIX of target product information with this marks Quasi- file.
Specifically, predetermined synthesis is carried out to the result file and the ONIX template files to handle, including:Wound The template copies of the ONIX template files are built, the template copies are consistent with the content of the ONIX template files;Will be described The file content of result file is filled to the root node of the template copies, obtains the target product information corresponding ONIX normative documents.
During the actual implementation present invention, various processes that can be in advance to the present invention program carry out automation function realization, from And, when exist some/ONIX normative documents of certain batch product generate demand when, user only needs offer to there is ONIX normative documents The product information of some of generation demand/certain batch product is (as passed through the target product information needed for graphical interaction interface typing Deng), and trigger the automation product process (referring to the brief schematic flow sheet shown in Fig. 4) of ONIX normative documents, you can it is fast Fast-growing is into required ONIX normative documents.
The method for quickly generating ONIX normative documents provided from above scheme, the present invention, including use predetermined road Footpath language (such as Xpath) is positioned to each level element in ONIX specifications, and according to first comprising each level obtained by positioning The path file of plain routing information, the intermediate file that at least part content meets ONIX specifications is converted to by target product information, Standardization processing is carried out to the intermediate file again, entire contents is met ONIX specifications, it is fast eventually through templated synthesis The corresponding ONIX normative documents of target product information are generated fastly.As can be seen here, the present invention realizes one kind and quickly generates ONIX The automation implementation of normative document, when using the present invention program, user only needs to provide target product letter to be converted Cease, and trigger the generating process of ONIX normative documents and quickly generating for ONIX normative documents can be achieved, it is not necessary to consider that ONIX is advised File structure/hierarchical structure of model, process complexity, efficiency are relatively low when efficiently solving prior art generation ONIX normative documents Inferior technical problem.
Embodiment two
In the embodiment of the present invention two, the method flow diagram for quickly generating ONIX normative documents with reference to shown in Fig. 5, the side Method can also include after the step 102:
Step 102 ', according to predetermined checking specification, and use corresponding verification tool, verify the ONIX template files Correctness.
The present embodiment provides the proof scheme that verification of correctness is carried out to the ONIX template files obtained.
Wherein, corresponding Schema files can be downloaded from official website first, afterwards, can the Schema files based on download, And the correctness of the ONIX template files is verified using XMLSPY instruments.
Specifically, because ONIX template files only include the ONIX data of product section, lack corresponding when information is sent Sender and receiving side data, so that, can be first by increasing under the onixmessage root nodes of ONIX template files Header nodes, such as specific increase sender header nodes and recipient's header nodes, realization is required when being sent to information Sender and receiving side data carry out polishing, on this basis on, reuse corresponding tool, such as XMLSPY instruments, utilize Schema specifications can be again by institute after the completion of carrying out verification of correctness, subsequent authentication to the node hierarchical structure of ONIX template files The information deletion of supplement.
The present embodiment can effectively ensure each node level in ONIX template files by being verified to ONIX template files The correctness of structure, is that the generation of follow-up ONIX normative documents is laid a good foundation.
Embodiment three
The present embodiment provides a kind of device for quickly generating ONIX normative documents, and ONIX is quickly generated with reference to shown in Fig. 6 The structural representation of the device of normative document, the device includes:
First acquisition unit 61, the target product information to be converted for obtaining;Second acquisition unit 62, for obtain according to The ONIX template files of the predetermined file form created according to ONIX specifications, and the predefined paths language created according to ONIX specifications Say the path file of form;Wherein, the ONIX template files include:The root node corresponding with the root element in ONIX specifications And the NameSpace of ONIX specifications, the path file includes the hierarchical relationship institute according to each element provided in ONIX specifications The routing information for each element set up;Converting unit 63, for according to the path file, the target product information to be turned It is changed to the intermediate file that at least part content meets ONIX specifications;Wherein, the intermediate file includes:Meet the path file In routing information and each node element of instantiation is completed based on the target product information;Processing unit 64, is used for When the intermediate file only partial content meets ONIX specifications, standardization processing is carried out to the intermediate file, whole is obtained Content meets the result file of ONIX specifications;Synthesis unit 65, for the result file and the ONIX Template file carries out predetermined synthesis processing, obtains the corresponding ONIX normative documents of the target product information.
In an embodiment of the embodiment of the present invention, the first acquisition unit is further used for:Gather target product Information, and generate the formfile for including the target product information.
In an embodiment of the embodiment of the present invention, ONIX template files and path that the second acquisition unit is obtained The establishment process of file includes:According to ONIX specifications, ONIX template files are created using extended-boundary-condition method file format; The hierarchical relationship of each element provided according to ONIX specifications, is believed using the XML Path Language Xpath paths for setting up each element Breath, obtains path file.
In an embodiment of the embodiment of the present invention, the processing unit is further used for:By in the intermediate file At least one local resource address corresponding at least one local resource be uploaded to cyberspace, and obtain uploaded money Source corresponding Uniform Resource Identifier URI in cyberspace;By at least one local resource address in the intermediate file Replace with corresponding Uniform Resource Identifier URI.
In an embodiment of the embodiment of the present invention, the synthesis unit is further used for:Create the ONIX templates The template copies of file, the template copies are consistent with the content of the ONIX template files;By the result file File content is filled to the root node of the template copies, obtains the corresponding ONIX normative documents of the target product information.
In an embodiment of the embodiment of the present invention, with reference to Fig. 7, described device also include authentication unit 66, for according to According to predetermined checking specification, and corresponding verification tool is used, verify the correctness of the ONIX template files.
It is and upper herein, it is necessary to which explanation, what the present embodiment was related to quickly generates the description of the device of ONIX normative documents The description of literary method is similar, and is described with the beneficial effect of method, and ONIX normative documents are quickly generated for the present invention The ins and outs that do not disclose in the present embodiment of device, refer to the explanation of the inventive method embodiment, this implementation to this not Remake and repeat.
In summary, there is following advantage in the scheme for quickly generating ONIX normative documents of the invention:The present invention program is led to Cross XPath to be positioned each Hierarchy nodes in ONIX specifications, and according to the path file obtained by positioning, utilize recursive scheme By target product information conversion generation ONIX intermediate files, on this basis, being merged by resource inspection and template realizes mesh Mark quickly generating for the corresponding ONIX normative documents of product information.Using the present invention program, user only needs to provide to be converted Target product information, and trigger the generating process of ONIX normative documents and can be achieved to quickly generate ONIX normative documents, it is not necessary to examine Consider file structure/hierarchical structure of ONIX specifications, less system resource can be taken in the case of independent of file structure ONIX files are quickly generated, under process complexity, efficiency are relatively low when efficiently solving prior art generation ONIX normative documents Etc. technical problem.Simultaneously as node path is described using XPath, secondary development efficiency can be improved significantly.
It should be noted that each embodiment in this specification is described by the way of progressive, each embodiment weight Point explanation be all between difference with other embodiment, each embodiment identical similar part mutually referring to.
For convenience of description, describe to be divided into various modules when system above or device with function or unit is described respectively. Certainly, the function of each unit can be realized in same or multiple softwares and/or hardware when implementing the application.
As seen through the above description of the embodiments, those skilled in the art can be understood that the application can Realized by the mode of software plus required general hardware platform.Understood based on such, the technical scheme essence of the application On the part that is contributed in other words to prior art can be embodied in the form of software product, the computer software product It can be stored in storage medium, such as ROM/RAM, magnetic disc, CD, including some instructions are to cause a computer equipment (can be personal computer, server, or network equipment etc.) performs some of each embodiment of the application or embodiment Method described in part.
Finally, in addition it is also necessary to explanation, herein, the relational terms of such as first, second, third and fourth or the like It is used merely to make a distinction an entity or operation with another entity or operation, and not necessarily requires or imply these There is any this actual relation or order between entity or operation.Moreover, term " comprising ", "comprising" or its is any Other variants are intended to including for nonexcludability, so that process, method, article or equipment including a series of key elements Not only include those key elements, but also other key elements including being not expressly set out, or also include being this process, side Method, article or the intrinsic key element of equipment.In the absence of more restrictions, limited by sentence "including a ..." Key element, it is not excluded that also there is other identical element in the process including the key element, method, article or equipment.
The above is only the preferred embodiment of the present invention, it is noted that for the ordinary skill people of the art For member, under the premise without departing from the principles of the invention, some improvements and modifications can also be made, these improvements and modifications also should It is considered as protection scope of the present invention.

Claims (12)

1. a kind of method for quickly generating ONIX normative documents, it is characterised in that including:
Obtain target product information to be converted;
The ONIX template files of the predetermined file form created according to ONIX specifications are obtained, and created according to ONIX specifications The path file of predefined paths language format;Wherein, the ONIX template files include:It is relative with the root element in ONIX specifications The root node and the NameSpace of ONIX specifications answered, the path file are included according to each element provided in ONIX specifications The routing information for each element that hierarchical relationship is set up;
According to the path file, the target product information is converted into the middle text that at least part content meets ONIX specifications Part;Wherein, the intermediate file includes:Meet routing information in the path file and complete based on the target product information Into each node element of instantiation;
When the intermediate file only partial content meets ONIX specifications, standardization processing is carried out to the intermediate file, obtained Full content meets the result file of ONIX specifications;
Predetermined synthesis processing is carried out to the result file and the ONIX template files, the target product letter is obtained Cease corresponding ONIX normative documents.
2. according to the method described in claim 1, it is characterised in that described to obtain target product information to be converted, including:
Target product information is gathered, and generates the formfile for including the target product information.
3. according to the method described in claim 1, it is characterised in that the foundation ONIX specification creation predetermined file forms ONIX template files, and predefined paths language format path file, including:
According to ONIX specifications, ONIX template files are created using extended-boundary-condition method file format;
The hierarchical relationship of each element provided according to ONIX specifications, the road of each element is set up using XML Path Language Xpath Footpath information, obtains path file.
4. according to the method described in claim 1, it is characterised in that the intermediate file only partial content meets ONIX specifications For:Determine there is at least one the local resource address for not meeting ONIX specifications in the intermediate file by resource inspection;
It is then described when the intermediate file only partial content meets ONIX specifications, the intermediate file is carried out at standardization Reason, including:
At least one local resource corresponding at least one local resource address in the intermediate file is uploaded to network Space, and obtain uploaded resource corresponding Uniform Resource Identifier URI in cyberspace;
At least one local resource address in the intermediate file is replaced with into corresponding Uniform Resource Identifier URI.
5. according to the method described in claim 1, it is characterised in that described to the result file and the ONIX templates File carries out predetermined synthesis processing, including:
The template copies of the ONIX template files are created, the template copies are consistent with the content of the ONIX template files;
The file content of the result file is filled to the root node of the template copies, the target product is obtained The corresponding ONIX normative documents of information.
6. according to the method described in claim 1, it is characterised in that in the predetermined text for obtaining and being created according to ONIX specifications After the ONIX template files of part form, also include:
According to predetermined checking specification, and corresponding verification tool is used, verify the correctness of the ONIX template files.
7. a kind of device for quickly generating ONIX normative documents, it is characterised in that including:
First acquisition unit, the target product information to be converted for obtaining;
Second acquisition unit, the ONIX template files for obtaining the predetermined file form created according to ONIX specifications, and according to The path file of the predefined paths language format created according to ONIX specifications;Wherein, the ONIX template files include:With ONIX The NameSpace of the corresponding root node of root element in specification and ONIX specifications, the path file is included according to ONIX specifications The routing information for each element that the hierarchical relationship of each element of middle offer is set up;
Converting unit, for according to the path file, the target product information being converted at least part content and met The intermediate file of ONIX specifications;Wherein, the intermediate file includes:Meet the routing information in the path file and be based on institute State each node element that target product information completes instantiation;
Processing unit, for when the intermediate file only partial content meets ONIX specifications, professional etiquette to be entered to the intermediate file Generalized processing, obtains the result file that full content meets ONIX specifications;
Synthesis unit, handles for carrying out predetermined synthesis to the result file and the ONIX template files, obtains The corresponding ONIX normative documents of the target product information.
8. device according to claim 7, it is characterised in that the first acquisition unit, is further used for:
Target product information is gathered, and generates the formfile for including the target product information.
9. device according to claim 7, it is characterised in that the ONIX template files acquired in the second acquisition unit And the establishment process of path file includes:
According to ONIX specifications, ONIX template files are created using extended-boundary-condition method file format;There is provided according to ONIX specifications Each element hierarchical relationship, the routing information of each element is set up using XML Path Language Xpath, path file is obtained.
10. device according to claim 7, it is characterised in that the intermediate file only partial content meets ONIX specifications For:Determine there is at least one the local resource address for not meeting ONIX specifications in the intermediate file by resource inspection; Then the processing unit, is further used for:
At least one local resource corresponding at least one local resource address in the intermediate file is uploaded to network Space, and obtain uploaded resource corresponding Uniform Resource Identifier URI in cyberspace;By in the intermediate file At least one local resource address replaces with corresponding Uniform Resource Identifier URI.
11. device according to claim 7, it is characterised in that the synthesis unit, is further used for:
The template copies of the ONIX template files are created, the template copies are consistent with the content of the ONIX template files; The file content of the result file is filled to the root node of the template copies, the target product information is obtained Corresponding ONIX normative documents.
12. device according to claim 7, it is characterised in that also include:
Authentication unit, for according to predetermined checking specification, and uses corresponding verification tool, verifies the ONIX template files Correctness.
CN201710178592.XA 2017-03-23 2017-03-23 Method and device for quickly generating ONIX standard file Active CN106951399B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710178592.XA CN106951399B (en) 2017-03-23 2017-03-23 Method and device for quickly generating ONIX standard file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710178592.XA CN106951399B (en) 2017-03-23 2017-03-23 Method and device for quickly generating ONIX standard file

Publications (2)

Publication Number Publication Date
CN106951399A true CN106951399A (en) 2017-07-14
CN106951399B CN106951399B (en) 2020-05-19

Family

ID=59472717

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710178592.XA Active CN106951399B (en) 2017-03-23 2017-03-23 Method and device for quickly generating ONIX standard file

Country Status (1)

Country Link
CN (1) CN106951399B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107632831A (en) * 2017-09-22 2018-01-26 厦门集微科技有限公司 The method and device of Express specification front-end code
CN109086260A (en) * 2018-08-29 2018-12-25 中国标准化研究院 Food data processing method and processing device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060101333A1 (en) * 2003-02-28 2006-05-11 Microsoft Corporation Importing and exporting markup language data in a spreadsheet application document
CN103559322A (en) * 2013-11-22 2014-02-05 方正国际软件有限公司 Document format conversion method
CN104991785A (en) * 2015-08-03 2015-10-21 江苏优聚思信息技术有限公司 Standardized clinical data service support system and method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060101333A1 (en) * 2003-02-28 2006-05-11 Microsoft Corporation Importing and exporting markup language data in a spreadsheet application document
CN103559322A (en) * 2013-11-22 2014-02-05 方正国际软件有限公司 Document format conversion method
CN104991785A (en) * 2015-08-03 2015-10-21 江苏优聚思信息技术有限公司 Standardized clinical data service support system and method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
刘高军,李丹,程利伟,钱程,段然: "基于CNONIX的XML与EXCEL相互转换技术研究", 《电子科学技术》 *
马蕾: "电子出版物元数据标准ONIX", 《现代情报》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107632831A (en) * 2017-09-22 2018-01-26 厦门集微科技有限公司 The method and device of Express specification front-end code
CN109086260A (en) * 2018-08-29 2018-12-25 中国标准化研究院 Food data processing method and processing device

Also Published As

Publication number Publication date
CN106951399B (en) 2020-05-19

Similar Documents

Publication Publication Date Title
CN107273117A (en) A kind of quick Code automatic build system for programming friendly
CN104933588A (en) Data annotation platform for expanding merchandise varieties and data annotation method
CN103077185A (en) Object-based user-defined information-expanding method
Villazón-Terrazas A method for reusing and re-engineering non-ontological resources for building ontologies
Boubeta-Puig et al. A model-driven approach for facilitating user-friendly design of complex event patterns
US10666731B2 (en) IRC-infoid data standardization for use in a plurality of mobile applications
Kazemi Zanjani et al. A scenario decomposition approach for stochastic production planning in sawmills
CN106951399A (en) A kind of method and device for quickly generating ONIX normative documents
CN102023859A (en) Digital development environment-oriented software integration method with reliability, maintainability and supportability
Chu Horses for courses: China's accommodative approach to food standard‐setting in response to the internationalization of regulation
CN106844490A (en) The structuring of BIM non-geometry information databases and the method and system for interacting
Santos et al. Semantic interoperability for multiagent simulation and decision support in power systems
CN107209779A (en) The storage of structured content and fetched in non-structured user's editable content store
CN110088772A (en) Object machine
Penadés et al. Product Line-based customization of e-Government documents
US20090100087A1 (en) Method and system for xform generation and processing application integration framework
Ghimire et al. Framework for inter-operative e-Procurement marketplace
Brambilla et al. A CASE tool for modelling and automatically generating web service-enabled applications
Diao et al. Optimization of Management Mode of Small‐and Medium‐Sized Enterprises Based on Decision Tree Model
Li et al. [Retracted] Research on Optimization of Food Industry Processing Process Based on Computational Intelligence
Lee et al. Interoperability for virtual manufacturing systems
Du et al. Research on the Implementation Path of Big Data Technology to Promote the Integration of Production and Marketing of Agricultural Products
Ji et al. Research Article A Regulated Anticounterfeiting Traceability Metamodel Based on Blockchain in Supply Chain in the Era of IR 4.0
Batat Experiential Design Thinking (EXDT): a new tool to create innovative phygital experiences for consumer well-being
Yu et al. Key technologies of traditional Chinese medicine traceability based on internet of things

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
PE01 Entry into force of the registration of the contract for pledge of patent right

Denomination of invention: A method and device for quickly generating ONIX standard files

Effective date of registration: 20220811

Granted publication date: 20200519

Pledgee: Beijing Beitou Financing Guarantee Co.,Ltd.

Pledgor: BEIJING JETSEN TECHNOLOGY Co.,Ltd.

Registration number: Y2022110000176

PE01 Entry into force of the registration of the contract for pledge of patent right