Looking for breakthrough ideas for innovation challenges? Try Patsnap Eureka!

Data insertion method and apparatus

A data insertion and data technology, applied in the field of data application, can solve the problem of high data error rate, achieve the effect of avoiding splicing errors, avoiding splicing, and improving the correct rate

Active Publication Date: 2018-07-03
ULTRAPOWER SOFTWARE
View PDF9 Cites 3 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0006] This application provides a data insertion method and device to solve the problem of high error rate of inserted data when inserting data into ElasticSearch through the existing technology

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Data insertion method and apparatus
  • Data insertion method and apparatus
  • Data insertion method and apparatus

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0045] The present application provides a data insertion method and device to solve the problem of high error rate of inserted data when inserting data into an ElasticSearch database through the prior art.

[0046] The first embodiment of the present application discloses a data insertion method. This method is suitable for the application scenario where the ElasticSearch search server inserts data into the database, see figure 1 As shown in the workflow diagram, the data insertion method includes the following steps:

[0047] Step S11, obtaining a mapping script, and obtaining the field type corresponding to each field name through the mapping script.

[0048] Wherein, the mapping script is the mapping script, specifically for obtaining the mapping script used when the Elasticsearch search server builds the index index. In the mapping script, each field name and field type (such as integer type or string type, etc.) are recorded. mapping relationship between them. By readi...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a data insertion method and apparatus. The method comprises the steps of obtaining a mapping script, and through the mapping script, obtaining field types corresponding to field names; then according to the field types corresponding to the field names, obtaining attributes of classes; according to the attributes of the classes, generating a JavaBean component; according tofield values corresponding to the field names and the JavaBean component, generating a to-be-inserted data object; through calling a character string generation method, converting the to-be-inserted data object to a json character string; and inserting the json character string into a database. Through the scheme disclosed by the method, data can be inserted in ElasticSearch; the method avoids splicing of the field names and the field values, so that the problem of splicing errors is avoided; and compared with the prior art, the data insertion accuracy is improved.

Description

technical field [0001] The present application relates to the field of data application, in particular to a data insertion method and device. Background technique [0002] ElasticSearch, referred to as ES, is a search server that can realize real-time search, has the advantages of stability, reliability, and easy installation and use, and has a wide range of applications. [0003] Wherein, in the application process of ElasticSearch, sometimes it is necessary to insert data into the database of Elasticsearch in the form of json (JavaScript Object Notation, JavaScript Object Notation) string, so as to save the data. Among them, the json string is composed of a field name (ie key) and a field value (ie value). In the prior art, when data insertion is required, the mapping script defined by ElasticSearch (i.e., mapping script) is first read, and the mapping script specifies the mapping between each field name and field type (such as integer type or string type, etc.) relation...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
IPC IPC(8): G06F17/30
CPCG06F16/90344
Inventor 王泓崴
Owner ULTRAPOWER SOFTWARE
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Patsnap Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Patsnap Eureka Blog
Learn More
PatSnap group products