CN109614140B - Configuration data processing method and device, electronic equipment and storage medium - Google Patents

Configuration data processing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN109614140B
CN109614140B CN201811544179.1A CN201811544179A CN109614140B CN 109614140 B CN109614140 B CN 109614140B CN 201811544179 A CN201811544179 A CN 201811544179A CN 109614140 B CN109614140 B CN 109614140B
Authority
CN
China
Prior art keywords
container
configuration
data
scheme
initialization
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.)
Active
Application number
CN201811544179.1A
Other languages
Chinese (zh)
Other versions
CN109614140A (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.)
Taikang Insurance Group Co Ltd
Original Assignee
Taikang Insurance Group 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 Taikang Insurance Group Co Ltd filed Critical Taikang Insurance Group Co Ltd
Priority to CN201811544179.1A priority Critical patent/CN109614140B/en
Publication of CN109614140A publication Critical patent/CN109614140A/en
Application granted granted Critical
Publication of CN109614140B publication Critical patent/CN109614140B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Abstract

The embodiment of the invention relates to a configuration data processing method and device, electronic equipment and a storage medium, which relate to the technical field of computers, and the method comprises the following steps: determining mapping relations among a plurality of configuration tables by performing hierarchical initialization on the plurality of configuration tables; initializing the plurality of configuration tables according to the mapping relation, and packaging the plurality of configuration tables in initialization containers corresponding to the memory; reinitializing the plurality of configuration tables in the initialization container, and packaging the reinitialized configuration tables in a mirror image container; determining a mirror image container corresponding to each thread, and acquiring configuration data corresponding to each thread according to the mirror image container. The embodiment of the invention can improve the efficiency of obtaining the configuration data.

Description

Configuration data processing method and device, electronic equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to a configuration data processing method, a configuration data processing device, electronic equipment and a computer readable storage medium.
Background
Many parameters are required for the reinsurance calculation, and the parameters are stored in different configuration tables according to different functions. Most of the data in the configuration tables are maintained in the tables through the reinsurance system foreground page, and a small part of the data are directly configured in the database. The configuration tables generally have certain dependency relationships among the key fields, the dependency relationships are used as main clues for matching parameters in later-stage calculation, and corresponding parameter values are matched according to the clues.
In the related art, when obtaining configuration information, generally, a query is performed item by item, and configuration parameters are queried from a table once every time a piece of data is used. In this way, because many configuration parameters are needed by the reinsurance calculation program, interaction with the database is too frequent during one-by-one query, and the operation amount is large; and matching parameters from a large amount of data takes too long and is inefficient. In addition, since the re-secure calculation adopts a multi-thread mode, all the configuration tables are initialized in the same class, and when each thread in the calculation thread group obtains the configuration parameters, the execution efficiency of the threads is affected.
It is to be noted that the information disclosed in the above background section is only for enhancement of understanding of the background of the embodiments of the present invention and therefore may include information that does not constitute prior art known to a person of ordinary skill in the art.
Disclosure of Invention
Embodiments of the present invention provide a method, an apparatus, an electronic device, and a storage medium for processing configuration data, so as to overcome the problems of low efficiency and low accuracy of processing configuration data due to limitations and defects of related technologies at least to some extent.
Additional features and advantages of embodiments of the invention will be set forth in the detailed description which follows, or in part will be obvious from the description, or may be learned by practice of embodiments of the invention.
According to an aspect of an embodiment of the present invention, there is provided a configuration data processing method, including: determining mapping relations among a plurality of configuration tables by performing hierarchical initialization on the plurality of configuration tables; initializing the plurality of configuration tables according to the mapping relation, and packaging the plurality of configuration tables in initialization containers corresponding to the memory; reinitializing the plurality of configuration tables in the initialization container, and packaging the reinitialized configuration tables in a mirror image container; determining a mirror image container corresponding to each thread, and acquiring configuration data corresponding to each thread according to the mirror image container.
Optionally, determining the mapping relationship between the plurality of configuration tables by performing hierarchical initialization on the plurality of configuration tables includes: initializing the configuration tables according to dependency hierarchy level according to the accumulative scheme code, the reinsurance scheme number and the tariff table number respectively to determine the mapping relationship among the configuration tables.
Optionally, encapsulating the configuration tables in the initialization container corresponding to the memory includes: storing the plurality of configuration table data and the log table data into an initialization container, and storing the log table data into an accumulation scheme set; and acquiring a cumulative scheme code from the cumulative scheme set, and packaging the configuration tables in the initialization container through the cumulative scheme code.
Optionally, the packaging the plurality of configuration tables in the initialization container through the accumulation scheme encoding includes: packaging the configuration table associated with the accumulation scheme code to a first container according to the accumulation scheme code; packaging the configuration table associated with the reinsurance scheme number to a first container according to the reinsurance scheme number; packaging a configuration table associated with the tariff table number into a first container according to the tariff table number; wherein the first container comprises a one-to-one container or a one-to-many container.
Optionally, encapsulating the configuration table associated with the accumulation scheme code into the first container according to the accumulation scheme code includes: if the first container is a one-to-one container, the accumulation scheme code is used as a primary key, and the data of the configuration table associated with the accumulation scheme code is packaged in a second container in the first container as a value; and if the first container is a one-to-many container, the accumulation scheme code is used as a main key, the data of the configuration table associated with the accumulation scheme code is packaged in a third container in the first container as a value, and the third container comprises a fourth container for storing each record.
Optionally, encapsulating the configuration table associated with the reinsurance scheme number according to the reinsurance scheme number into the first container includes: if the first container is a one-to-many container, the republishing scheme number is used as a main key, data of a configuration table associated with the republishing scheme number is packaged in a third container in the first container as a value, and the third container comprises a fourth container for storing each record; and encoding the accumulation scheme as a primary key, and packaging each first container as a value in another first container.
Optionally, packaging the configuration table associated with the tariff table number to the first container according to the tariff table number includes: if the first container is a one-to-one container, the tariff table number is used as a main key, and data of a configuration table associated with the tariff table number is packaged into the first container as a value; and if the first container is a one-to-many container, the tariff table number is used as a main key, data of a configuration table associated with the tariff table number is packaged in a third container in the first container as a value, and the third container comprises a fourth container for storing each record.
Optionally, the mirror container includes configuration data corresponding to an accumulation scheme code, and the method further includes: if the accumulative scheme code is updated, emptying the mirror image container; and acquiring the configuration data corresponding to the updated cumulative scheme codes from the initialization container again and storing the configuration data in the mirror image container.
Optionally, determining a mirror image container corresponding to each thread, and acquiring configuration data corresponding to each thread according to the mirror image container includes: constructing an extension class object matched with the initialization class object, and associating the names of all threads with the extension class object; and determining the extension class object corresponding to the thread, and determining a mirror image container corresponding to the extension class object to obtain the configuration data corresponding to the thread.
According to an aspect of an embodiment of the present invention, there is provided a configuration data processing apparatus including: the mapping relation determining module is used for determining the mapping relation among the plurality of configuration tables by carrying out hierarchical initialization on the plurality of configuration tables; the initialization container packaging module is used for initializing the configuration tables according to the mapping relation and packaging the configuration tables in initialization containers corresponding to the memory; a mirror image container obtaining module, configured to reinitialize the configuration tables in the initialization container, and package the reinitialized configuration tables in a mirror image container; and the configuration data acquisition module is used for determining the mirror image container corresponding to each thread and acquiring the configuration data corresponding to each thread according to the mirror image container.
According to an aspect of an embodiment of the present invention, there is provided an electronic apparatus including: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform any one of the above described configuration data processing methods via execution of the executable instructions.
According to an aspect of an embodiment of the present invention, there is provided a computer-readable storage medium on which a computer program is stored, the computer program, when executed by a processor, implementing the configuration data processing method of any one of the above.
In the configuration data processing method, the configuration data processing apparatus, the electronic device, and the computer-readable storage medium provided in the exemplary embodiments of the present invention, on one hand, the configuration table is read into the initialization container in the memory, and the configuration data is read from the initialization container, so that the number of interactions and the interaction frequency between the calculation program and the database are reduced, and the operation amount is reduced. On the other hand, the configuration data associated with the thread is obtained through the mirror image container associated with the thread, the purpose of quickly inquiring the configuration parameters from the packaged container data can be achieved, and compared with the method for inquiring item by item, the method can reduce the inquiry times, improve the inquiry efficiency and the calculation efficiency, and improve the inquiry accuracy.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of embodiments of the invention.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the embodiments of the invention and, together with the description, serve to explain the principles of the embodiments of the invention. It is obvious that the drawings in the following description are only some of the embodiments of the invention, and that for a person skilled in the art, other drawings can be derived from them without inventive effort.
Fig. 1 schematically shows a flowchart of a configuration data processing method in an embodiment of the present invention.
Fig. 2 schematically shows a schematic diagram of a configuration table mapping relationship in the embodiment of the present invention.
Fig. 3 schematically shows a structure diagram of a first-layer initialization container in an embodiment of the present invention.
Fig. 4 schematically shows a structure diagram of a second layer initialization container in an embodiment of the present invention.
Fig. 5 schematically shows a structure of a third layer initialization container in the embodiment of the present invention.
FIG. 6 is a diagram schematically illustrating binding of an extended class object to a thread in an embodiment of the present invention.
Fig. 7 schematically shows a schematic diagram of acquiring configuration data in an embodiment of the present invention.
Fig. 8 schematically shows a block diagram of a configuration data processing apparatus in an embodiment of the present invention.
Fig. 9 schematically shows a block diagram of an electronic device in an embodiment of the invention.
Fig. 10 schematically shows a program product in an embodiment of the invention.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments. In the following description, numerous specific details are provided to provide a thorough understanding of embodiments of the invention. One skilled in the relevant art will recognize, however, that the invention may be practiced without one or more of the specific details, or with other methods, components, devices, steps, and so forth. In other instances, well-known techniques have not been shown or described in detail to avoid obscuring aspects of embodiments of the invention.
Furthermore, the drawings are merely schematic illustrations of embodiments of the invention, which are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus their repetitive description will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices.
The embodiment of the invention provides a configuration data processing method which can be applied to an application scene of acquiring and loading configuration parameters in reinsurance calculation. Referring to fig. 1, a configuration data processing method according to an embodiment of the present invention will be described in detail.
In step S110, a mapping relationship between a plurality of configuration tables is determined by performing hierarchical initialization on the plurality of configuration tables.
In this exemplary embodiment, the configuration table may also be understood as a physical table, and the physical table is a table in a specific data source. Is a table for mysql, a Hbase table and an index for ES. mysql, Hbase and ES these physical tables must have a reasonable key.
The plurality of configuration tables may include, but are not limited to, the various forms in the reinsurance calculation shown in FIG. 2. In order to facilitate statistics and subsequent calculation, a plurality of configuration tables can be hierarchically initialized to obtain mapping relations among the configuration tables. Specifically, the configuration tables may be initialized according to a dependency hierarchy or a hierarchy according to an accumulation scheme code, a reinsurance scheme number, and a rate, respectively, to determine a mapping relationship between the configuration tables. The first layer is specifically an accumulation scheme definition table, an accumulation risk seed/responsibility table, a last accumulation premium information table, a last sub-protection record table, a re-protection scheme table and a log path table which are initialized according to the accumulation scheme codes. The second layer is to initialize the overflow line setting table, the allocation setting table, the branch protection company definition table and the reinsurance scheme calculation table according to the reinsurance scheme number. The third layer is specifically that a tariff table definition table, a tariff table updating track table, a tariff table field definition table and a universal tariff table are initialized according to the tariff table numbers. After hierarchical initialization, a mapping relationship between a plurality of configuration tables as shown in fig. 2 may be obtained.
It should be noted that the configuration tables having mapping relationships all have the same field identifier, for example, the initialization cumulative scheme definition table, the cumulative risk/liability table, the last cumulative quota information table, the last shareholding record table, the reshield scheme table, and the log path table all include cumulative scheme codes, and the like.
In step S120, the configuration tables are initialized according to the mapping relationship, and the configuration tables are packaged in an initialization container corresponding to the memory.
In the exemplary embodiment, all configuration tables are initialized in one static constructor, and the configuration tables can be initialized only once during the program operation. The constructor may provide a number of special methods, one of which is responsible for the initialization of the member variables (fields) in a class. Example constructors are classified into default constructors and non-default constructors. The constructor is used for initializing when creating an object, and when creating an object, the system initializes the default for the instance of the object. This default initialization can be implemented by a custom constructor if it is desired to change.
The static constructor can initialize the configuration tables and package the configuration tables in corresponding initialization containers in the memory. The specific process comprises the following steps: reading configuration table data and log table data, storing the configuration table data and the log table data into corresponding containers, and storing the log table data into an accumulation scheme set; and acquiring a cumulative scheme code from the cumulative scheme set, and packaging all the configuration tables into the initialization container according to the cumulative scheme code. The process of encapsulating all configuration tables into an initialization container may be understood as a process of designing an initialization container. The container initialization means a container that initializes data in a physical table (configuration table) to a memory and stores the data in the memory. The container refers to an open-source application container engine, so that a developer can package an application and a dependency package into a portable container and then distribute the container to any popular Linux machine, and virtualization can be realized. The containers are fully sandboxed without any interface between each other. Container data refers to data stored in a container.
Since the mapping of the configuration table is determined by hierarchical level initialization, the initialization container can also be divided into three levels. On the basis, acquiring an accumulation scheme code from the accumulation scheme set, and packaging all configuration tables in an initialization container according to the accumulation scheme code, wherein the three levels sequentially comprise accumulation scheme code packaging, repayment scheme number packaging and tariff table number packaging.
First, the initialization container of the first layer will be explained. The first layer specifically includes: and packaging the configuration table associated with the accumulation scheme code into a first container according to the accumulation scheme code. Specifically, the cumulative scheme definition table, the contract scheme risk responsibility association table and the reinsurance scheme table are packaged into a first container according to the cumulative scheme codes (the previous cumulative premium information table and the previous sub-guarantee record table are not loaded into a memory because the data volume is too large, and if the parameters in the two tables are used in the calculation process, the parameters are directly read from the tables). The first container may be a MAP container, which is an associative container. The method is characterized in that the adding and deleting nodes have little influence on the iterator, and have no influence on other nodes except for the operation node. For an iterator, the real value may be modified, but the key may not be modified.
Further, the MAP container may be divided into a one-to-one container and a one-to-many container according to the corresponding relationship between the cumulative scheme code and the data obtained in each configuration table, and for the one-to-one container or the one-to-many container, the data therein is stored in a key value pair form, and the primary key values of the MAP container are all cumulative scheme codes.
Fig. 3, diagram a, shows a first container according to the accumulation scheme coding design. Referring to fig. 3, if the accumulation scheme codes and other data (data of the configuration table corresponding to the accumulation scheme codes) are one-to-one, the first container is a one-to-one container, and the other data can be sequentially stored as V values of the MAP container in the second container located in the first container, wherein the second container can be a LIST container. Referring to fig. 3, if the data (cumulative, contract category) in the contract scheme liability association table is in one-to-one correspondence with the cumulative scheme code, the cumulative scheme code and the cumulative, contract category can be packaged in a MAP container. Specifically, the accumulation scheme code L00000XX may be used as a primary key of the MAP container, and whether to accumulate, contract category, is stored in the second container LIST container, and this is used as the value of the MAP container.
A second type of first container designed according to the accumulation scheme coding is shown in diagram B in fig. 3. Referring to fig. 3B, if the correspondence between the accumulation scheme code and other data (data of the configuration table corresponding to the accumulation scheme code) is one-to-many, the first container may be regarded as a one-to-many container, and at this time, the accumulation scheme code may be used as a primary key, and the data of the configuration table associated with the accumulation scheme code may be packaged as a value in a third container in the first container, and the third container includes a fourth container in which each record is stored. The third container may be, for example, a SET container, which is an association container, like a SET, in which the elements within do not repeat and appear ordered. The fourth container may be, for example, a SCHAM container.
Other data may be stored in order as the V value of the MAP container in a third container located in the first container, wherein the third container may be a SET container. Referring to fig. 3, as shown in diagram B, if the data (the reinsurance scheme number) of the reinsurance scheme table is one-to-many with the accumulation scheme code, the accumulation scheme code and the reinsurance scheme number can be packed in the MAP container. Specifically, the accumulation scheme code L00000XX may be used as a primary key of a MAP container, other data such as a reinsurance scheme number may be stored as a V value of the MAP container in a SET container corresponding to the physical table, and the SET container stores a SCHAM container corresponding to each record of the physical table. That is, the plan number will be stored again in the SCHAM container located in the SET container. The initialization containers with different structures are designed in a one-to-one and one-to-many mode, so that the configuration data of the configuration table related to the accumulation scheme codes can be loaded more accurately.
Next, as described in the second layer of the design initialization container, the configuration table associated with the reinsurance scheme number may be encapsulated into the first container according to the reinsurance scheme number. Specifically, the overflow line setting table, the share setting table, and the share company definition table are packaged into a first container (MAP container) according to the reinsurance scheme number. According to the corresponding relation between the number of the reinsurance scheme and the data obtained from each table, the MAP container is determined to be a one-to-many container, at this time, the number of the reinsurance scheme can be used as the value of the primary key K of the MAP container, and the data obtained from other tables can be used as the value.
Referring to fig. 4, the corresponding relationship between the values of the overflow line setting table, the partial guarantee amount setting table, and the partial guarantee company definition table and the reinsurance plan number is one-to-many, so that a MAP container can be designed for the values of the overflow line setting table, the partial guarantee amount setting table, and the partial guarantee company definition table, respectively. Similarly, the primary key of each MAP container is a reinsurance scheme number whose value is the value of each configuration table, and the value of each configuration table can be packaged in a SET container located in the MAP container, and each SET container contains a SCHAM container storing each record of the physical table.
It should be noted that, when designing the second-layer initialization container, each first container is packaged in another first container, the accumulation scheme is encoded as a primary key, and each first container is packaged in another first container as a value. The other first container refers to a layer of MAP containers which is sheathed outside each MAP container, namely an outer layer of MAP. The number of configuration tables associated with the outer-layer MAP and the number of the reinsurance schemes is the same, specifically, in each outer-layer MAP, the main key K is the accumulative scheme code, and the value is the value of each MAP container, so that each MAP container is respectively placed in different outer-layer MAPs, and the mutual influence among different configuration tables is avoided.
Further, the third layer of the initialization container will be explained. The configuration table associated with the tariff table number may be packaged into a first container according to the tariff table number. Specifically, the first case is: and if the first container is a one-to-one container, the tariff table number is used as a main key, and the data of the configuration table associated with the tariff table number is packaged in the first container as a value. Referring to a diagram a in fig. 5, if the correspondence between the data of the tariff definition table and the tariff number is one-to-one, the MAP container is a one-to-one container. At this time, the tariff table number may be used as a primary key, and the tariff table type in the tariff definition table may be packaged as a value in the MAP container.
Referring to a diagram B in fig. 5, data in the tariff number and tariff update trajectory table, the tariff field definition table, and the general tariff table are stored as values of MAP containers in the SET container corresponding to each configuration table, and the SCHAM container corresponding to each record of the configuration table is stored in the SET container. By designing the initialization containers of different structures corresponding to the tariff numbers in a one-to-one and one-to-many manner, the configuration data of the configuration table associated with the tariff number can be loaded more accurately.
By the method in fig. 3 to 5, the configuration tables are packaged in the initialization container corresponding to the memory, and the configuration tables are initialized by the initialization container. By reading some of the table data into memory, the computer program reduces interaction with the database and the interface. In addition, all configuration tables are hierarchically encapsulated in the initialization container through the accumulative scheme coding, the reinsurance scheme number and the tariff table number, and effective loading of a plurality of configuration tables can be achieved. According to the one-to-one relation or one-to-many relation between the accumulative scheme code, the reinsurance scheme number and the tariff table number and the data of the associated configuration table, different packaging containers and packaging formats are determined, the data can be accurately packaged, the unified management of a plurality of configuration tables is facilitated, and the configuration tables are processed.
In step S130, the configuration tables in the initialization container are initialized again, and the configuration tables after being initialized again are packaged in a mirror container.
In the present exemplary embodiment, the re-initialization refers to continuing the secondary initialization of the data of the configuration table after the primary initialization. The container data generated by the primary initialization is a complete set, and the container data generated by the secondary initialization refers to a subset of the container data generated by the primary initialization. The mirror container refers to a container for storing data of the configuration table, i.e., configuration data, in the secondary initialization process. It should be noted that the mirror container also uses a container nesting mode, which is basically the same as the initialization container and is not described here again. The mirror container data refers to the secondarily initialized configuration data stored in the mirror container. Since the cumulative scheme number is used as the primary key of the initialization container and the mirror container, the data stored in the mirror container is the complete configuration data of one cumulative scheme number. For example, when the accumulation scheme is encoded as L0000012, the mirror container data is the configuration data of all the configuration tables corresponding to L0000012.
On this basis, the method in the present exemplary embodiment may further include: if the accumulative scheme codes are updated, emptying the mirror image container; and acquiring the configuration data corresponding to the updated cumulative scheme codes from the initialization container again and storing the configuration data in the mirror image container. That is, if it is detected that the accumulation scheme code is changed, for example, updated from L0000012 to L0000034, all data corresponding to the accumulation scheme code L0000012 in the mirror image container may be cleared or deleted, so as to avoid mutual influence between configuration data of different accumulation scheme codes, and reduce the operation amount in acquiring data, thereby improving the accuracy of acquiring data. Further, the complete configuration data corresponding to the updated accumulation scheme code L0000034 may be obtained from the initialization container and stored in the mirror container.
In step S140, a mirror container corresponding to each thread is determined, and configuration data corresponding to each thread is obtained according to the mirror container.
In the exemplary embodiment, an extension class object may be written or constructed first, and the structure of the extension class object is similar to the structure of the initialization class object. The initialization class object and the extension class object can be classes defined by configuration data in a program during loading, and the extension class object can be used for obtaining part of container data in the initialization container according to the accumulation scheme coding. Each thread name may be bound or associated with the built extension class object at the time of each thread launch. Specifically, a thread name may be in one-to-one correspondence with each extension class object, and as shown in fig. 6, the extension class objects include an extension class object 1, an extension class object 2, an extension class object N, and so on, where a thread ThreadNo1 is bound to the extension class object 1, a thread ThreadNo2 is bound to the extension class object 2, a thread ThreadNo N is bound to the extension class object N, and so on.
The extension class object can be determined according to the thread name, the extension class object is further adopted, the mirror image container related to the extension class object is determined according to the accumulation scheme code, and the mirror image container is in one-to-one correspondence with the extension class object. Specifically, referring to fig. 7, after the mirror container L0X corresponding to the accumulation scheme encoding L0X is determined according to the thread name, the initialization container corresponding to the mirror container may be determined, so that all the configuration data corresponding to the current thread is obtained from the initialization container. Similarly, the configuration data corresponding to each thread can be obtained according to the one-to-one correspondence between the mirror image container and the thread. Configuration data is collected and obtained from the packaged container, so that the hit rate can be effectively improved, and the calculation efficiency is improved. In addition, each thread has the parameter initialization object and the extension class object, so that the mutual influence among a plurality of threads caused by the fact that a plurality of threads share one extension class object in the related art is avoided, and the thread execution efficiency is improved.
An embodiment of the present invention further provides a configuration data processing apparatus, and as shown in fig. 8, the configuration data processing apparatus 800 includes:
a mapping relation determining module 801, configured to determine a mapping relation between multiple configuration tables by performing hierarchical initialization on the multiple configuration tables;
an initialization container packaging module 802, configured to initialize the configuration tables according to the mapping relationship, and package the configuration tables in an initialization container corresponding to the memory;
a mirror container obtaining module 803, configured to reinitialize the configuration tables in the initialization container, and package the reinitialized configuration tables in a mirror container;
a configuration data obtaining module 804, configured to determine a mirror image container corresponding to each thread, and obtain configuration data corresponding to each thread according to the mirror image container.
Optionally, the mapping relation determining module includes: and the relationship analysis module is used for initializing the configuration tables according to the dependency relationship hierarchy level according to the accumulative scheme code, the reinsurance scheme number and the tariff table number so as to determine the mapping relationship among the configuration tables.
Optionally, initializing the container packaging module comprises: the storage module is used for storing the plurality of configuration table data and the log table data into an initialization container and storing the log table data into an accumulation scheme set; and the configuration table packaging module is used for acquiring an accumulation scheme code from the accumulation scheme set and packaging the plurality of configuration tables in the initialization container through the accumulation scheme code.
Optionally, the configuration table packaging module includes: the first packaging module is used for packaging the configuration table related to the accumulation scheme code to a first container according to the accumulation scheme code; the second packaging module is used for packaging the configuration table associated with the reinsurance scheme number to the first container according to the reinsurance scheme number; the third packaging module is used for packaging the configuration table related to the tariff table number to the first container according to the tariff table number; wherein the first container comprises a one-to-one container or a one-to-many container.
Optionally, the first package module comprises: the first type control module is used for taking the accumulation scheme code as a main key and packaging the data of the configuration table associated with the accumulation scheme code as a value in a second container in the first container if the first container is a one-to-one container; and the second type control module is used for taking the accumulation scheme code as a main key and packaging the data of the configuration table associated with the accumulation scheme code as a value in a third container in the first container if the first container is a one-to-many container, wherein the third container comprises a fourth container for storing each record.
Optionally, the second package module comprises: the packaging control module is used for taking the reinsurance scheme number as a main key and packaging data of a configuration table associated with the reinsurance scheme number as a value in a third container in the first container if the first container is a one-to-many container, wherein the third container comprises a fourth container for storing each record; and the repackaging module is used for encoding the accumulation scheme as a primary key and packing each first container as a value into another first container.
Optionally, the third packaging module comprises: the first control module is used for taking the tariff table number as a main key and packaging the data of the configuration table associated with the tariff table number as a value in the first container if the first container is a one-to-one container; and the second control module is used for taking the tariff table number as a main key and packaging the data of the configuration table associated with the tariff table number in a third container in the first container as a value if the first container is a one-to-many container, wherein the third container comprises a fourth container for storing each record.
Optionally, the mirroring container includes configuration data corresponding to an accumulation scheme code, and the apparatus further includes: a mirror image container emptying module, configured to empty the mirror image container if the accumulation scheme code is updated; and the storage module is used for acquiring the configuration data corresponding to the updated accumulative scheme codes from the initialization container again and storing the configuration data in the mirror image container.
Optionally, the configuration data obtaining module includes: the association control module is used for constructing an extension class object matched with the initialization class object and associating the names of all threads with the extension class object; and the container determining module is used for determining the extension class object corresponding to the thread and determining a mirror image container corresponding to the extension class object so as to obtain the configuration data corresponding to the thread.
It should be noted that, the specific details of each functional module in the configuration data processing apparatus have been described in detail in the corresponding configuration data processing method, and therefore are not described herein again.
It should be noted that although in the above detailed description several modules or units of the device for action execution are mentioned, such a division is not mandatory. Indeed, the features and functionality of two or more modules or units described above may be embodied in one module or unit, according to embodiments of the invention. Conversely, the features and functions of one module or unit described above may be further divided into embodiments by a plurality of modules or units.
Moreover, although the steps of a method in the embodiments of the invention are depicted in the drawings in a particular order, this does not require or imply that the steps must be performed in this particular order, or that all of the depicted steps must be performed, to achieve desirable results. Additionally or alternatively, certain steps may be omitted, multiple steps combined into one step execution, and/or one step broken down into multiple step executions, etc.
Through the above description of the embodiments, those skilled in the art will readily understand that the exemplary embodiments described herein may be implemented by software, or by software in combination with necessary hardware. Therefore, the technical solution according to the embodiment of the present invention can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a usb disk, a removable hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a mobile terminal, or a network device, etc.) to execute the method according to the embodiment of the present invention.
In the embodiment of the invention, the electronic equipment capable of realizing the method is also provided.
As will be appreciated by one skilled in the art, aspects of the present invention may be embodied as a system, method or program product. Thus, various aspects of the invention may be embodied in the form of: an entirely hardware embodiment, an entirely software embodiment (including firmware, microcode, etc.) or an embodiment combining hardware and software aspects that may all generally be referred to herein as a "circuit," module "or" system.
An electronic device 900 according to this embodiment of the invention is described below with reference to fig. 9. The electronic device 900 shown in fig. 9 is only an example and should not bring any limitations to the function and scope of use of the embodiments of the present invention.
As shown in fig. 9, the electronic device 900 is embodied in the form of a general purpose computing device. Components of electronic device 900 may include, but are not limited to: the at least one processing unit 910, the at least one memory unit 920, and a bus 930 that couples various system components including the memory unit 920 and the processing unit 910.
Wherein the storage unit stores program code that is executable by the processing unit 910 to cause the processing unit 910 to perform steps according to various exemplary embodiments of the present invention described in the above section "exemplary methods" of the present specification. For example, the processing unit 910 may perform the steps as shown in fig. 1.
The storage unit 920 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM)9201 and/or a cache memory unit 9202, and may further include a read only memory unit (ROM) 9203.
Storage unit 920 may also include a program/utility 9204 having a set (at least one) of program modules 9205, such program modules 9205 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may comprise an implementation of a network environment.
Bus 930 can be any of several types of bus structures including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The display unit 940 may be a display having a display function to show a processing result obtained by the processing unit 910 performing the method in the present exemplary embodiment through the display. The display includes, but is not limited to, a liquid crystal display or other display.
The electronic device 900 may also communicate with one or more external devices 1100 (e.g., keyboard, pointing device, bluetooth device, etc.), with one or more devices that enable a user to interact with the electronic device 900, and/or with any devices (e.g., router, modem, etc.) that enable the electronic device 900 to communicate with one or more other computing devices. Such communication may occur via input/output (I/O) interface 950. Also, the electronic device 900 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN) and/or a public network, such as the Internet) via the network adapter 960. As shown, the network adapter 960 communicates with the other modules of the electronic device 900 via the bus 930. It should be appreciated that although not shown, other hardware and/or software modules may be used in conjunction with the electronic device 900, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
In an embodiment of the present invention, a computer-readable storage medium is further provided, on which a program product capable of implementing the above-mentioned method of the present specification is stored. In some possible embodiments, aspects of the invention may also be implemented in the form of a program product comprising program code means for causing a terminal device to carry out the steps according to various exemplary embodiments of the invention described in the above section "exemplary methods" of the present description, when said program product is run on the terminal device.
Referring to fig. 10, a program product 1000 for implementing the above method according to an embodiment of the present invention is described, which may employ a portable compact disc read only memory (CD-ROM) and include program code, and may be run on a terminal device, such as a personal computer. However, the program product of the present invention is not limited in this regard and, in the present document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The program product may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
A computer readable signal medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable signal medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
Furthermore, the above-described figures are merely schematic illustrations of processes involved in methods according to exemplary embodiments of the invention, and are not intended to be limiting. It will be readily understood that the processes shown in the above figures are not intended to indicate or limit the chronological order of the processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, e.g., in multiple modules.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the embodiments of the invention following, in general, the principles of the embodiments of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the embodiments of the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the embodiments of the invention being indicated by the following claims.

Claims (11)

1. A method for processing configuration data, comprising:
determining mapping relations among a plurality of configuration tables by performing hierarchical initialization on the plurality of configuration tables;
initializing the plurality of configuration tables according to the mapping relation, and packaging the plurality of configuration tables in initialization containers corresponding to the memory; the initialization container is a container which initializes the data in the configuration table to the memory and stores the data in the memory;
reinitializing the plurality of configuration tables in the initialization container, and packaging the reinitialized configuration tables in a mirror image container; the mirror image container is a container for storing the data of the configuration table in the reinitialization process;
determining a mirror image container corresponding to each thread, and acquiring configuration data corresponding to each thread according to the mirror image container;
the determining the mapping relationship among the plurality of configuration tables by performing hierarchical initialization on the plurality of configuration tables comprises:
initializing the configuration tables according to dependency hierarchy level according to the accumulative scheme code, the reinsurance scheme number and the tariff table number respectively to determine the mapping relationship among the configuration tables.
2. The method of claim 1, wherein packaging the configuration tables in initialization containers corresponding to the memory comprises:
storing the plurality of configuration table data and the log table data into an initialization container, and storing the log table data into an accumulation scheme set;
and acquiring a cumulative scheme code from the cumulative scheme set, and packaging the configuration tables in the initialization container through the cumulative scheme code.
3. The method of claim 2, wherein the packaging the plurality of configuration tables in the initialization container via the accumulation scheme encoding comprises:
packaging the configuration table associated with the accumulation scheme code to a first container according to the accumulation scheme code;
packaging the configuration table associated with the reinsurance scheme number to a first container according to the reinsurance scheme number;
packaging a configuration table associated with the tariff table number into a first container according to the tariff table number;
wherein the first container comprises a one-to-one container or a one-to-many container.
4. The method of claim 3, wherein encapsulating the configuration table associated with the accumulation scheme encoding into a first container according to the accumulation scheme encoding comprises:
if the first container is a one-to-one container, the accumulation scheme code is used as a primary key, and the data of the configuration table associated with the accumulation scheme code is packaged in a second container in the first container as a value;
and if the first container is a one-to-many container, the accumulation scheme code is used as a main key, the data of the configuration table associated with the accumulation scheme code is packaged in a third container in the first container as a value, and the third container comprises a fourth container for storing each record.
5. The method of claim 3, wherein encapsulating the configuration table associated with the reinsurance scheme number in accordance with the reinsurance scheme number into a first container comprises:
if the first container is a one-to-many container, the republishing scheme number is used as a main key, data of a configuration table associated with the republishing scheme number is packaged in a third container in the first container as a value, and the third container comprises a fourth container for storing each record;
and encoding the accumulation scheme as a primary key, and packaging each first container as a value in another first container.
6. The method of claim 3, wherein packaging the configuration table associated with the tariff number into a first container according to the tariff number comprises:
if the first container is a one-to-one container, the tariff table number is used as a main key, and data of a configuration table associated with the tariff table number is packaged into the first container as a value;
and if the first container is a one-to-many container, the tariff table number is used as a main key, data of a configuration table associated with the tariff table number is packaged in a third container in the first container as a value, and the third container comprises a fourth container for storing each record.
7. The method of claim 3, wherein the mirrored container includes an accumulation scheme encoding corresponding configuration data, the method further comprising:
if the accumulative scheme code is updated, emptying the mirror image container;
and acquiring the configuration data corresponding to the updated cumulative scheme codes from the initialization container again and storing the configuration data in the mirror image container.
8. The method of claim 1, wherein determining a mirror container corresponding to each thread, and obtaining configuration data corresponding to each thread according to the mirror container comprises:
constructing an extension class object matched with the initialization class object, and associating the names of all threads with the extension class object;
and determining the extension class object corresponding to the thread, and determining a mirror image container corresponding to the extension class object to obtain the configuration data corresponding to the thread.
9. A configuration data processing apparatus, comprising:
the mapping relation determining module is used for determining the mapping relation among the plurality of configuration tables by carrying out hierarchical initialization on the plurality of configuration tables; the initialization container is a container which initializes the data in the configuration table to the memory and stores the data in the memory;
the initialization container packaging module is used for initializing the configuration tables according to the mapping relation and packaging the configuration tables in initialization containers corresponding to the memory;
a mirror image container obtaining module, configured to reinitialize the configuration tables in the initialization container, and package the reinitialized configuration tables in a mirror image container; the mirror image container is a container for storing the data of the configuration table in the reinitialization process;
the configuration data acquisition module is used for determining a mirror image container corresponding to each thread and acquiring configuration data corresponding to each thread according to the mirror image container;
the determining the mapping relationship among the plurality of configuration tables by performing hierarchical initialization on the plurality of configuration tables comprises:
initializing the configuration tables according to dependency hierarchy level according to the accumulative scheme code, the reinsurance scheme number and the tariff table number respectively to determine the mapping relationship among the configuration tables.
10. An electronic device, comprising:
a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform the configuration data processing method of any one of claims 1-8 via execution of the executable instructions.
11. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the configuration data processing method of any one of claims 1 to 8.
CN201811544179.1A 2018-12-17 2018-12-17 Configuration data processing method and device, electronic equipment and storage medium Active CN109614140B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811544179.1A CN109614140B (en) 2018-12-17 2018-12-17 Configuration data processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811544179.1A CN109614140B (en) 2018-12-17 2018-12-17 Configuration data processing method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN109614140A CN109614140A (en) 2019-04-12
CN109614140B true CN109614140B (en) 2022-02-08

Family

ID=66010386

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811544179.1A Active CN109614140B (en) 2018-12-17 2018-12-17 Configuration data processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109614140B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111309972B (en) * 2020-02-25 2023-06-30 深圳市元征科技股份有限公司 Data processing method, device, terminal equipment and storage medium
CN113556375A (en) * 2020-04-26 2021-10-26 阿里巴巴集团控股有限公司 Cloud computing service method and device, electronic equipment and computer storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103617211A (en) * 2013-11-20 2014-03-05 浪潮电子信息产业股份有限公司 HBase loaded data importing method
CN104679884A (en) * 2015-03-16 2015-06-03 北京奇虎科技有限公司 Data analysis method, device and system of database
CN107133231A (en) * 2016-02-29 2017-09-05 中移(苏州)软件技术有限公司 A kind of data capture method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10073880B2 (en) * 2015-08-06 2018-09-11 International Business Machines Corporation Vertical tuning of distributed analytics clusters

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103617211A (en) * 2013-11-20 2014-03-05 浪潮电子信息产业股份有限公司 HBase loaded data importing method
CN104679884A (en) * 2015-03-16 2015-06-03 北京奇虎科技有限公司 Data analysis method, device and system of database
CN107133231A (en) * 2016-02-29 2017-09-05 中移(苏州)软件技术有限公司 A kind of data capture method and device

Also Published As

Publication number Publication date
CN109614140A (en) 2019-04-12

Similar Documents

Publication Publication Date Title
CN111814951B (en) Debugging deep neural network
US11436129B2 (en) System, method and recording medium for generating mobile test sequences
US10572178B2 (en) Expiration handling for block level backup of virtual machines
US8793646B2 (en) Aggregation of constraints across profiles
KR102527963B1 (en) Sort and Merge Instructions for General Purpose Processors
US20200409731A1 (en) Machine-learning based heap memory tuning
US11663270B2 (en) Vector string search instruction
US11507352B1 (en) Reducing semantic errors in code generated by machine learning models
CN109614140B (en) Configuration data processing method and device, electronic equipment and storage medium
US20220067180A1 (en) Security policy management for database
US20200348940A1 (en) Saving and restoring machine state between multiple executions of an instruction
CN108459913A (en) data parallel processing method, device and server
US10664506B2 (en) Decision table decomposition using semantic relations
US20200142669A1 (en) Controlling storage accesses for merge operations
US8433697B2 (en) Flexible metadata composition
US20090112566A1 (en) Automated generation of executable deployment code from a deployment activity model
US10387386B2 (en) Automatic attribute structural variation detection for not only structured query language database
US10649797B2 (en) Online method handle deduplication
US20180143812A1 (en) Control flow graph analysis
US10795800B2 (en) Programming language runtime deferred exception handling
US10481882B2 (en) Reducing waste areas inside strings
CN113574513A (en) Detecting changes to storage keys for protecting memory
US11687449B2 (en) Concurrent marking garbage collection
US11681865B2 (en) Annotating a log based on log documentation
US11327793B2 (en) Garbage collection work stealing mechanism

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