Method and device for quickly loading configuration files with multiple threads

A configuration file and multi-threading technology, applied in the field of network communication, can solve problems such as insufficient utilization of system resources, achieve the effect of improving startup speed and system resource utilization, and shortening time

Inactive Publication Date: 2017-06-06
OPZOON TECH
View PDF3 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

At present, multi-core technology has been widely used, and the traditional single-threaded loading configuration method cannot make full use of system resources

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
  • Method and device for quickly loading configuration files with multiple threads
  • Method and device for quickly loading configuration files with multiple threads

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0023] The present invention provides a method for multi-threaded fast loading of configuration files, such as figure 1 As shown, the method includes:

[0024] S1: Initialize the configuration delivery queue and the end mark; the end mark is the process of marking the parsing configuration file, and the end mark is 1 when the parsing configuration file ends;

[0025] After the end mark is initialized, the end mark M=0; in the process of parsing the configuration file, the end mark M is always 0, and when the configuration file is completely parsed, the end mark M=1.

[0026] S2: Analyze the configuration file item by item, and save the delivered data obtained through analysis into the configuration delivery queue;

[0027] Before parsing the configuration file one by one, read the entire configuration file and save the configuration file to the cache. The command parsing thread parses configuration files one by one from the cache, enqueues the parsed data as a whole, and put...

Embodiment 2

[0032] The present invention also provides a device for quickly loading configuration files with multiple threads, such as figure 2 As shown, the device includes:

[0033] The initialization module 101 is used to initialize the configuration delivery queue and the end mark; the end mark is the process of marking the parsing configuration file, and the end mark is 1 when the parsing configuration file ends;

[0034] The command parsing thread 102 is used for parsing the configuration file one by one, and saving the sent data obtained by parsing into the configuration sending queue;

[0035] At least one command delivery thread 103 is used to obtain the delivery data stored in the configuration delivery queue by means of a lock, and generate system usage data from the acquired delivery data. When the configuration delivery queue is empty, And the end mark is 1, then the system loading configuration is completed.

[0036] The device also includes:

[0037] The startup module ...

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 provides a method and a device for quickly loading configuration files by multiple threads. The method includes steps of S1, initializing a configuration issuing array and a finishing tab; S2, analyzing the configuration files one by one and storing issued data acquired by analyzing into the configuration issuing array; and S3, acquiring the stored issued data in the configuration issuing array by a plurality of command issuing threads in a lock manner and generating system using data by the acquired issuing data, and completing configuration loading of the system when the configuration issuing array is empty and the finishing tap is 1. By the method and the device for quickly loading configuration files by multiple threads, system configuration loading time is greatly shortened, starting speed of the device and system resource utilization rate are increased.

Description

technical field [0001] The invention relates to the technical field of network communication, in particular to a method and device for quickly loading configuration files with multiple threads. Background technique [0002] In security devices, bootloading configuration is a necessary item, and the traditional loading method is a thread for loading. For configuration files with tens of thousands of configuration items in actual applications, it takes too long for the device to actually load the configuration files. At present, multi-core technology has been widely used, and the traditional single-thread loading configuration method cannot make full use of system resources. Contents of the invention [0003] (1) Solved technical problems [0004] The technical problem solved by the present invention is to provide a method and device for quickly loading configuration files by multithreading, so as to quickly load configuration files and make full use of system resources. ...

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
Patent Type & Authority Patents(China)
IPC IPC(8): G06F9/445
Inventor 朱志博
Owner OPZOON TECH
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products