CN113360595A - Parameter loading method and device in blacklist parameter file - Google Patents

Parameter loading method and device in blacklist parameter file Download PDF

Info

Publication number
CN113360595A
CN113360595A CN202110606158.3A CN202110606158A CN113360595A CN 113360595 A CN113360595 A CN 113360595A CN 202110606158 A CN202110606158 A CN 202110606158A CN 113360595 A CN113360595 A CN 113360595A
Authority
CN
China
Prior art keywords
file
parameter
query
blacklist
preset result
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.)
Pending
Application number
CN202110606158.3A
Other languages
Chinese (zh)
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.)
Merchants China Soft Information Co ltd
Original Assignee
Merchants China Soft Information 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 Merchants China Soft Information Co ltd filed Critical Merchants China Soft Information Co ltd
Priority to CN202110606158.3A priority Critical patent/CN113360595A/en
Publication of CN113360595A publication Critical patent/CN113360595A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • G06F16/3349Reuse of stored results of previous queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/31Indexing; Data structures therefor; Storage structures
    • G06F16/313Selection or weighting of terms for indexing

Abstract

The application discloses a method and a device for loading parameters in a blacklist parameter file, wherein the method comprises the following steps: responding to the parameter loading request, and acquiring query parameters to be queried; acquiring a preset result file, wherein the preset result file is obtained by compressing blacklist parameter files in a grading manner; and inquiring result data corresponding to the inquiry parameters in the preset result file by adopting a binary search method. The technical problem that when the blacklist parameter file is too large, the time consumed for loading the parameters by the charging software at the lane end is too long, and the normal charging function is influenced is solved.

Description

Parameter loading method and device in blacklist parameter file
Technical Field
The present application relates to the field of traffic technologies, and in particular, to a method and an apparatus for loading parameters in a blacklist parameter file.
Background
In the technical field of highways, the traffic department will place vehicles with fee evasion, fake plate and other behaviors in a blacklist and formulate a blacklist parameter file. However, over time, there are more and more users in the blacklist, resulting in an increasing amount of data for the blacklist parameter file.
In the process of actually carrying out charging work, software at each lane end needs to respond quickly. However, if the blacklist parameter file is too large, the time consumed for loading the parameters by the charging software at the lane end is too long, and the normal charging function is affected.
Therefore, it is an urgent technical problem to be solved by those skilled in the art to provide a method for quickly loading parameters in a blacklist parameter file.
Disclosure of Invention
The application provides a parameter loading method and device in a blacklist parameter file, and solves the technical problems that when the blacklist parameter file is too large, the time consumed for loading parameters by charging software at a lane end is too long, and the normal charging function is influenced.
In view of this, a first aspect of the present application provides a method for loading parameters in a blacklist parameter file, including:
responding to the parameter loading request, and acquiring query parameters to be queried;
acquiring a preset result file, wherein the preset result file is obtained by grading blacklist parameter files;
and inquiring result data corresponding to the inquiry parameters in the preset result file by adopting a binary search method.
Optionally, the configuration process of the preset result file includes:
acquiring a blacklist parameter file;
creating a file header corresponding to the preset result file according to the file parameters corresponding to the blacklist parameter file;
classifying the blacklist parameter file according to a main key field and a reserved field in the file header to obtain the preset result file;
and the query parameter and the primary key field are the same parameter data.
Optionally, the ranking the blacklist parameter file according to the primary key field and the reserved field in the file header specifically includes:
splitting an index field corresponding to the main key field in the blacklist parameter file according to the main key field in the file header to obtain a hierarchical index;
recording the next-level hierarchical index of the hierarchical index in each hierarchical index;
and in the last-level hierarchical index, recording the data content corresponding to the hierarchical index according to the reserved field in the file header.
Optionally, a binary search method is adopted to query the result data corresponding to the query parameter in the preset result file, and the method specifically includes:
querying in the preset result file by using the query parameter by adopting a binary search method;
when the data content corresponding to the query parameter exists in the preset result file, taking the data content as result data corresponding to the query parameter;
and when the data content corresponding to the query parameter does not exist in the preset result file, using the data which is not found as the result data corresponding to the query parameter.
Optionally, querying in the preset result file by using the query parameter by using a binary search method specifically includes:
and searching from the hierarchical indexes in the preset result file step by adopting a binary search method.
A second aspect of the present application provides a device for loading parameters in a blacklist parameter file, including:
the first acquisition unit is used for responding to the parameter loading request and acquiring the query parameters to be queried;
the second acquisition unit is used for acquiring a preset result file, wherein the preset result file is obtained by grading the blacklist parameter files;
and the query unit is used for querying the result data corresponding to the query parameters in the preset result file by adopting a binary search method.
Optionally, the configuration process of the preset result file includes:
acquiring a blacklist parameter file;
creating a file header corresponding to the preset result file according to the file parameters corresponding to the blacklist parameter file;
classifying the blacklist parameter file according to a main key field and a reserved field in the file header to obtain the preset result file;
and the query parameter and the primary key field are the same parameter data.
Optionally, the ranking the blacklist parameter file according to the primary key field and the reserved field in the file header specifically includes:
splitting an index field corresponding to the main key field in the blacklist parameter file according to the main key field in the file header to obtain a hierarchical index;
recording the next-level hierarchical index of the hierarchical index in each hierarchical index;
and in the last-level hierarchical index, recording the data content corresponding to the hierarchical index according to the reserved field in the file header.
Optionally, the query unit specifically includes:
the query subunit is configured to query the preset result file by using the query parameter through a binary search method;
the first judging subunit is configured to, when data content corresponding to the query parameter exists in the preset result file, use the data content as result data corresponding to the query parameter;
and the second judging subunit is configured to, when the data content corresponding to the query parameter does not exist in the preset result file, use the data that is not found as the result data corresponding to the query parameter.
Optionally, the query subunit is specifically configured to perform lookup step by step from the hierarchical index in the preset result file by using a binary lookup method.
From the above technical method, the present application has the following advantages:
according to the parameter loading method in the blacklist parameter file, after the query parameter is obtained based on the parameter loading request, the preset result file after the blacklist parameter file is compressed in a grading mode is obtained, the blacklist parameter file is compressed in a grading mode, the memory of the preset result file is relatively small, and the result data corresponding to the query parameter is queried in the preset result file through a binary query method with high search efficiency and short time consumption.
Drawings
In order to more clearly illustrate the technical method in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without inventive labor.
Fig. 1 is a schematic flowchart illustrating a first embodiment of a method for loading parameters in a blacklist parameter file according to an embodiment of the present application;
fig. 2 is a schematic flowchart of a second embodiment of a method for loading parameters in a blacklist parameter file according to the present application;
FIG. 3 is a partial screenshot of a blacklist parameter file in an application example of the present application;
FIG. 4 is a schematic diagram of a header created for the blacklist parameter file in FIG. 3 in an application example of the present application;
FIG. 5 is a partial screenshot of a first-level hierarchical index created for the blacklist parameter file shown in FIG. 3 according to an application example of the present application;
FIG. 6 is a partial screenshot of a secondary hierarchical index created for the blacklist parameter file shown in FIG. 3 according to an application example of the present application;
FIG. 7 is a partial screenshot of a three-level hierarchical index and data created for the blacklist parameter file shown in FIG. 3 according to an application example of the present application;
fig. 8 is a schematic structural diagram of an embodiment of a parameter loading apparatus in a blacklist parameter file in an embodiment of the present application.
Detailed Description
The embodiment of the application provides a method and a device for loading parameters in a blacklist parameter file, and solves the technical problems that when the blacklist parameter file is too large, the time consumed for loading the parameters by charging software at a lane end is too long, and the normal charging function is influenced.
In order to make the method of the present application better understood, the technical method in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
A first aspect of the embodiments of the present application provides a parameter loading method applied to a blacklist parameter file of a vehicle-mounted terminal, and specifically refer to the following contents:
to facilitate understanding, please refer to fig. 1, where fig. 1 is a schematic flowchart of a first embodiment of a method for loading parameters in a blacklist parameter file in an embodiment of the present application.
In this embodiment, a method for loading parameters in a blacklist parameter file includes:
step 101, responding to a parameter loading request, and acquiring query parameters to be queried.
The parameter loading method in the blacklist parameter file in this embodiment may be executed by a computer for running the toll collection software at the lane end. The parameter loading request can be triggered by a toll collector, or can be triggered by a camera after the camera at the lane end collects vehicle information, because the camera is connected with a computer.
It can be understood that there may be differences in colors, vehicle types, and brands among vehicles, if these parameters are used as query parameters, multiple result data may be found for the same query parameter, and final confirmation needs to be performed manually, so in this embodiment, in order to ensure that the finally queried result data is unique and accurate, the result data is queried by using different parameters (for example, card numbers, license plates, and the like corresponding to the vehicles) among the vehicles as query parameters.
And 102, acquiring a preset result file, wherein the preset result file is obtained by compressing the blacklist parameter file in a grading manner.
In this embodiment, the preset result file is obtained by compressing the blacklist parameter file in a hierarchical manner, that is, the preset result file has a smaller file volume than the blacklist parameter file, so that when the preset result file is loaded and run by a computer, a required memory is smaller, and time consumption during loading and running is shorter.
It is understood that the preset result file may be deployed on a computer, so that the result file can be loaded directly from the memory of the computer when parameter loading is performed; the preset result file can also be sent to the computer by the server side at regular time.
In this embodiment, the file format of the blacklist parameter file is not limited, and may be a json file or a txt file.
And 103, inquiring result data corresponding to the query parameters in a preset result file by adopting a binary search method.
After the query parameters to be queried and the preset result file of the query basis are obtained, the result data corresponding to the query parameters are queried in the preset result file by adopting a binary search method. It can be understood that the binary search method has high search efficiency and short time consumption, and therefore has higher query efficiency when querying result data corresponding to the query parameters.
In the parameter loading method in the blacklist parameter file in the embodiment, after the query parameter is obtained based on the parameter loading request, the preset result file after the blacklist parameter file is compressed in a hierarchical manner is obtained, because the blacklist parameter file is compressed in a hierarchical manner, the memory of the preset result file at this time is relatively small, and the result data corresponding to the query parameter is queried in the preset result file by adopting a binary query method with high query efficiency and short time consumption, that is, in the application, the query efficiency is improved while the file volume is reduced, and the rapid query and loading of the parameter are realized, so that the technical problem that when the blacklist parameter file is too large, the charging software at a lane end consumes too long time to load the parameter, and the normal charging function is influenced is solved.
The above embodiment is a first embodiment of a method for loading parameters in a blacklist parameter file provided in the embodiment of the present application, and the following embodiment is a second embodiment of the method for loading parameters in a blacklist parameter file provided in the embodiment of the present application.
Referring to fig. 2, fig. 2 is a flowchart illustrating a second embodiment of a method for loading parameters in a blacklist parameter file according to the present application.
In this embodiment, a method for loading parameters in a blacklist parameter file includes:
step 201, responding to the parameter loading request, and acquiring query parameters to be queried.
It should be noted that the description of step 201 is the same as the description of step 101 in the first embodiment, and reference may be specifically made to the description of step 101, which is not repeated herein.
Step 202, obtaining a preset result file, wherein the preset result file is obtained by compressing the blacklist parameter file in a grading manner.
It should be noted that the preset result file can be obtained by performing hierarchical compression on the blacklist parameter file, and for convenience of understanding, the configuration process of the preset result file is specifically described in this embodiment, and includes:
acquiring a blacklist parameter file;
creating a file header corresponding to a preset result file according to file parameters corresponding to the blacklist parameter file;
classifying the blacklist parameter files according to the main key field and the reserved field in the file header to obtain a preset result file;
wherein, the query parameter and the primary key field are the same parameter data.
It can be understood that, because the query parameter is used for querying the parameter when the parameter is loaded, and the classification basis when the blacklist parameter file is classified is the primary key field, in order to ensure that the corresponding data can be queried in the preset result file through the query parameter, the query parameter and the primary key field should be the same parameter data. The main key field is also an index basis when the parameters are loaded, and the reserved field corresponds to the data content loaded when the parameters are loaded, so that the blacklist parameter files are classified according to the main key field and the reserved field to obtain a preset result file.
Specifically, in this embodiment, the ranking of the blacklist parameter file according to the primary key field and the reserved field in the file header specifically includes:
splitting an index field corresponding to the main key field in the blacklist parameter file according to the main key field in the file header to obtain a hierarchical index;
recording the next-level hierarchical index of the hierarchical index in each hierarchical index;
and in the last-level hierarchical index, recording the data content corresponding to the hierarchical index according to the reserved field in the file header.
Note that, in each hierarchical index, the number of next hierarchical indexes below the hierarchical index also needs to be recorded.
It can be understood that by means of hierarchical storage, repeated storage of data one by one during recording is avoided, and the hierarchical storage can ensure complete recording of the data.
And step 203, inquiring in a preset result file by using the inquiry parameters by adopting a binary search method.
In this embodiment, a binary search method is adopted, and the query in the preset result file by using the query parameter specifically includes:
and searching from the grading index in the preset result file step by adopting a binary search method.
And 204, when the data content corresponding to the query parameter exists in the preset result file, taking the data content as result data corresponding to the query parameter.
When the data content corresponding to the query parameter is found in the preset result file, the user corresponding to the query parameter is indicated as a blacklist user, and at the moment, the relevant data content of the blacklist user stored in the preset result file is returned.
Step 205, when there is no data content corresponding to the query parameter in the preset result file, taking the data that is not found out as the result data corresponding to the query parameter.
When the data content corresponding to the query parameter does not exist in the preset result file, it is indicated that the user corresponding to the query parameter is not the blacklist user, and the relevant data content corresponding to the query parameter does not exist in the preset result file storing the relevant data content of the blacklist user, and at this time, the data which is not found is taken as the result data corresponding to the query parameter.
In the parameter loading method in the blacklist parameter file in the embodiment, after the query parameter is obtained based on the parameter loading request, the preset result file after the blacklist parameter file is compressed in a hierarchical manner is obtained, because the blacklist parameter file is compressed in a hierarchical manner, the memory of the preset result file at this time is relatively small, and the result data corresponding to the query parameter is queried in the preset result file by adopting a binary query method with high query efficiency and short time consumption, that is, in the application, the query efficiency is improved while the file volume is reduced, and the rapid query and loading of the parameter are realized, so that the technical problem that when the blacklist parameter file is too large, the charging software at a lane end consumes too long time to load the parameter, and the normal charging function is influenced is solved.
The second embodiment of the parameter loading method in the blacklist parameter file provided in the embodiment of the present application is an application example of the parameter loading method in the blacklist parameter file provided in the embodiment of the present application.
The parameter loading method in the blacklist parameter file in the application example comprises the following steps:
the preparation method comprises the following steps: a zip compressed file of the blacklist parameter file issued from the center of the central part is decompressed and analyzed into a json file, and then the json file is converted into a txt file (hereinafter, abbreviated as a blacklist parameter file), and a partial screenshot of the blacklist parameter file in the application example is shown in fig. 3, and the size of the partial screenshot is about 32M.
At this time, the first line in the blacklist parameter file is a field name, and the second line begins with a field value sorted by field name, which may be '\ t' or ',' partition.
The method comprises the following steps: and acquiring a blacklist parameter file. At this time, the file parameters of the obtained blacklist parameter file may include:
(1) the path of the blacklist parameter file;
(2) separators, i.e. '\ t' or ','.
(3) The primary key field and the rating used as a rating basis, typically a card number field, for example: cardId (H:4,8, 8);
(4) reserved fields (the number may be one or more), such as: type, status, version.
Step two: and creating a file header corresponding to the preset result file according to the blacklist parameter file received in the first step. The content in the file header in the application example comprises:
(1) first row: the file name of the blacklist parameter file and the line number of the file header except the first line;
(2) a second row: a generation time;
(3) third row: black list parameter file size;
(4) fourth row: a primary key field, a reserved field;
(5) the fifth element: number of fields in blacklist parameter file
(6) A sixth row: total number of records in the blacklist parameter file.
The header created for the blacklist parameter file shown in fig. 3 is specifically shown in fig. 4.
Step three: and grading the blacklist parameter file according to the main key field and the reserved field in the file header to obtain a preset result file.
(1) Data in the blacklist parameter file are sorted according to the main key field, so that subsequent data grading is facilitated;
(2) and splitting the index field according to the primary key field to obtain a plurality of hierarchical indexes. For example, in the case of the card number field cardId (H:4,8,8), the index field is cardId, and the card number "11010808220000134443" is taken as an example, the hierarchical system is from the 0 th digit, and "1101" of 4-bit length is a one-level index; starting at bit 4, the 8-bit length "08082200" is a secondary index; starting at bit 12, the 8-bit length "00134443" is a three-level index;
(3) recording index head, the content includes index level, upper index content and record number under the index
(4) Recording an index content string under the index of the current level;
(5) if the index is the last level index, the data content is recorded after the index string, and the data content field is from the reserved field.
A partial screenshot of a primary hierarchical index created for the blacklist parameter file shown in fig. 3 is shown in fig. 5, a partial screenshot of a secondary hierarchical index is shown in fig. 6, and a partial screenshot of a tertiary hierarchical index and data is shown in fig. 7.
Step four, using preset result file
Step 1: opening the preset result file generated in the above step, reading the file header first, and the steps are:
(1) reading the first line, and mainly obtaining the line number of the file header;
(2) and reading the file header according to the line number read in the last step to obtain information such as a main key field, a reserved field, a record number and the like.
Step 2: loading a preset result file into a memory to prepare for query;
and step 3: and during query, quickly positioning the row of the last-level index where the card number is located from the hierarchical indexes step by step according to the query parameters so as to find the required data.
Compared with the prior art, the application example has the following advantages:
1. by using the hierarchical index, the content of the most important search condition is simplified, and meanwhile, the query speed can be improved;
2. unnecessary fields are removed by setting reserved fields, a storage structure is optimized, and the size is further reduced;
3. and a database system of a third party is not used, so that the stability problem, the extra memory requirement and the extra installation and maintenance workload brought by the database system are not worried about.
The above is an application example of the parameter loading method in the blacklist parameter file provided in the embodiment of the present application, and the following is an embodiment of the parameter loading device in the blacklist parameter file provided in the embodiment of the present application.
Referring to fig. 8, fig. 8 is a schematic structural diagram illustrating an embodiment of a parameter loading apparatus in a blacklist parameter file according to an embodiment of the present application.
The parameter loading apparatus in a blacklist parameter file in this embodiment includes:
a first obtaining unit 801, configured to obtain, in response to a parameter loading request, a query parameter to be queried;
a second obtaining unit 802, configured to obtain a preset result file, where the preset result file is obtained by compressing blacklist parameter files in a hierarchical manner;
the query unit 803 is configured to query result data corresponding to the query parameter in a preset result file by using a binary search method.
Further, the configuration process of the preset result file comprises the following steps:
acquiring a blacklist parameter file;
creating a file header corresponding to a preset result file according to file parameters corresponding to the blacklist parameter file;
classifying the blacklist parameter files according to the main key field and the reserved field in the file header to obtain a preset result file;
wherein, the query parameter and the primary key field are the same parameter data.
Further, according to the main key field and the reserved field in the file header, the blacklist parameter file is classified, which specifically includes:
splitting an index field corresponding to the main key field in the blacklist parameter file according to the main key field in the file header to obtain a hierarchical index;
recording the next-level hierarchical index of the hierarchical index in each hierarchical index;
and in the last-level hierarchical index, recording the data content corresponding to the hierarchical index according to the reserved field in the file header.
Further, the query unit 803 specifically includes:
the query subunit is used for querying in a preset result file by using a binary search method and utilizing query parameters;
the first judgment subunit is used for taking the data content as the result data corresponding to the query parameter when the data content corresponding to the query parameter exists in the preset result file;
and the second judging subunit is used for taking the data which is not searched out as the result data corresponding to the query parameter when the data content corresponding to the query parameter does not exist in the preset result file.
And further, the query subunit is specifically configured to perform lookup step by step from the hierarchical index in the preset result file by using a binary lookup method.
In the parameter loading method in the blacklist parameter file in the embodiment, after the query parameter is obtained based on the parameter loading request, the preset result file after the blacklist parameter file is compressed in a hierarchical manner is obtained, because the blacklist parameter file is compressed in a hierarchical manner, the memory of the preset result file at this time is relatively small, and the result data corresponding to the query parameter is queried in the preset result file by adopting a binary query method with high query efficiency and short time consumption, that is, in the application, the query efficiency is improved while the file volume is reduced, and the rapid query and loading of the parameter are realized, so that the technical problem that when the blacklist parameter file is too large, the charging software at a lane end consumes too long time to load the parameter, and the normal charging function is influenced is solved.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
The terms "first," "second," "third," "fourth," and the like in the description of the application and the above-described figures, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are, for example, capable of operation in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
It should be understood that in the present application, "at least one" means one or more, "a plurality" means two or more. "and/or" for describing an association relationship of associated objects, indicating that there may be three relationships, e.g., "a and/or B" may indicate: only A, only B and both A and B are present, wherein A and B may be singular or plural. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. "at least one of the following" or similar expressions refer to any combination of these items, including any combination of single item(s) or plural items. For example, at least one (one) of a, b, or c, may represent: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", wherein a, b, c may be single or plural.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.

Claims (10)

1. A method for loading parameters in a blacklist parameter file is characterized by comprising the following steps:
responding to the parameter loading request, and acquiring query parameters to be queried;
acquiring a preset result file, wherein the preset result file is obtained by compressing blacklist parameter files in a grading manner;
and inquiring result data corresponding to the inquiry parameters in the preset result file by adopting a binary search method.
2. The method of claim 1, wherein the configuring process of the preset result file comprises:
acquiring a blacklist parameter file;
creating a file header corresponding to the preset result file according to the file parameters corresponding to the blacklist parameter file;
classifying the blacklist parameter file according to a main key field and a reserved field in the file header to obtain the preset result file;
and the query parameter and the primary key field are the same parameter data.
3. The method of claim 2, wherein the step of ranking the blacklist parameter files according to the primary key field and the reserved field in the file header comprises:
splitting an index field corresponding to the main key field in the blacklist parameter file according to the main key field in the file header to obtain a hierarchical index;
recording the next-level hierarchical index of the hierarchical index in each hierarchical index;
and in the last-level hierarchical index, recording the data content corresponding to the hierarchical index according to the reserved field in the file header.
4. The method according to claim 3, wherein the querying the result data corresponding to the query parameter in the preset result file by using a binary search method specifically comprises:
querying in the preset result file by using the query parameter by adopting a binary search method;
when the data content corresponding to the query parameter exists in the preset result file, taking the data content as result data corresponding to the query parameter;
and when the data content corresponding to the query parameter does not exist in the preset result file, using the data which is not found as the result data corresponding to the query parameter.
5. The method of claim 4, wherein the querying parameter in the preset result file by using a binary search method specifically comprises:
and searching from the hierarchical indexes in the preset result file step by adopting a binary search method.
6. A device for loading parameters in a blacklist parameter file, comprising:
the first acquisition unit is used for responding to the parameter loading request and acquiring the query parameters to be queried;
the second acquisition unit is used for acquiring a preset result file, wherein the preset result file is obtained by compressing the blacklist parameter file in a grading manner;
and the query unit is used for querying the result data corresponding to the query parameters in the preset result file by adopting a binary search method.
7. The apparatus of claim 6, wherein the configuration process of the preset result file comprises:
acquiring a blacklist parameter file;
creating a file header corresponding to the preset result file according to the file parameters corresponding to the blacklist parameter file;
classifying the blacklist parameter file according to a main key field and a reserved field in the file header to obtain the preset result file;
and the query parameter and the primary key field are the same parameter data.
8. The apparatus of claim 7, wherein the step of ranking the blacklist parameter files according to the primary key field and the reserved field in the header comprises:
splitting an index field corresponding to the main key field in the blacklist parameter file according to the main key field in the file header to obtain a hierarchical index;
recording the next-level hierarchical index of the hierarchical index in each hierarchical index;
and in the last-level hierarchical index, recording the data content corresponding to the hierarchical index according to the reserved field in the file header.
9. The apparatus for loading parameters in a blacklist parameter file according to claim 8, wherein the query unit specifically includes:
the query subunit is configured to query the preset result file by using the query parameter through a binary search method;
the first judging subunit is configured to, when data content corresponding to the query parameter exists in the preset result file, use the data content as result data corresponding to the query parameter;
and the second judging subunit is configured to, when the data content corresponding to the query parameter does not exist in the preset result file, use the data that is not found as the result data corresponding to the query parameter.
10. The apparatus as claimed in claim 9, wherein the query subunit is configured to perform a step-by-step search from the hierarchical index in the preset result file by using a binary search method.
CN202110606158.3A 2021-05-26 2021-05-26 Parameter loading method and device in blacklist parameter file Pending CN113360595A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110606158.3A CN113360595A (en) 2021-05-26 2021-05-26 Parameter loading method and device in blacklist parameter file

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110606158.3A CN113360595A (en) 2021-05-26 2021-05-26 Parameter loading method and device in blacklist parameter file

Publications (1)

Publication Number Publication Date
CN113360595A true CN113360595A (en) 2021-09-07

Family

ID=77530704

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110606158.3A Pending CN113360595A (en) 2021-05-26 2021-05-26 Parameter loading method and device in blacklist parameter file

Country Status (1)

Country Link
CN (1) CN113360595A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115589590A (en) * 2022-10-27 2023-01-10 上海创蓝云智信息科技股份有限公司 System, method, electronic equipment and storage medium for efficiently filtering short message blacklist

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103810246A (en) * 2013-12-27 2014-05-21 北京天融信软件有限公司 Index building method and device and index query method and device
CN103970853A (en) * 2014-05-05 2014-08-06 浙江宇视科技有限公司 Method and device for optimizing search engine
CN104375992A (en) * 2013-08-12 2015-02-25 中国移动通信集团浙江有限公司 Address matching method and device
CN105701096A (en) * 2014-11-25 2016-06-22 腾讯科技(深圳)有限公司 Index generation method, data inquiry method, index generation device, data inquiry device and system
US20200379948A1 (en) * 2019-06-03 2020-12-03 EMC IP Holding Company LLC Indexes and queries for files by indexing file directories

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104375992A (en) * 2013-08-12 2015-02-25 中国移动通信集团浙江有限公司 Address matching method and device
CN103810246A (en) * 2013-12-27 2014-05-21 北京天融信软件有限公司 Index building method and device and index query method and device
CN103970853A (en) * 2014-05-05 2014-08-06 浙江宇视科技有限公司 Method and device for optimizing search engine
CN105701096A (en) * 2014-11-25 2016-06-22 腾讯科技(深圳)有限公司 Index generation method, data inquiry method, index generation device, data inquiry device and system
US20200379948A1 (en) * 2019-06-03 2020-12-03 EMC IP Holding Company LLC Indexes and queries for files by indexing file directories

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115589590A (en) * 2022-10-27 2023-01-10 上海创蓝云智信息科技股份有限公司 System, method, electronic equipment and storage medium for efficiently filtering short message blacklist

Similar Documents

Publication Publication Date Title
CN104298726B (en) A kind of BMS data-storage systems and its method based on database
CN112744115B (en) Information processing method, device and system of electric automobile and processor
JPWO2003069715A1 (en) Reuse method of secondary battery
CN111445121A (en) Risk assessment method and apparatus, storage medium, and electronic apparatus
CN108764350A (en) Target identification method, device and electronic equipment
CN107832333B (en) Method and system for constructing user network data fingerprint based on distributed processing and DPI data
CN107767253B (en) Tax information management platform, method and system
CN102597966A (en) Operation management device and operation management method
CN111026961A (en) Method and system for indexing data of interest within multiple data elements
CN111652661B (en) Mobile phone client user loss early warning processing method
CN109753517A (en) A kind of method, apparatus, computer storage medium and the terminal of information inquiry
CN106776731A (en) One kind search implementation method, device and system
CN107391769B (en) Index query method and device
CN113360595A (en) Parameter loading method and device in blacklist parameter file
CN117291729B (en) Fixed asset investment management big data information system
CN113609389A (en) Community platform information pushing method and system
CN107809485A (en) A kind of information recommendation method and terminal
CN103093213A (en) Video file classification method and terminal
CN114840781A (en) Search result display method, search request processing method and device
CN109783265B (en) Abnormal business data processing method and device
CN106372121A (en) Server and data processing method
CN108521527B (en) Ticket difference detection method, system, computer storage medium and computer equipment
CN111831683A (en) Automatic auditing method and system based on dynamic extended scene matching
CN113538025B (en) Replacement prediction method and device for terminal equipment
CN111415235A (en) Method for generating distributed accounting right in block chain technology

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