CN112948396A - Data storage method and device, electronic equipment and storage medium - Google Patents

Data storage method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN112948396A
CN112948396A CN202110349293.4A CN202110349293A CN112948396A CN 112948396 A CN112948396 A CN 112948396A CN 202110349293 A CN202110349293 A CN 202110349293A CN 112948396 A CN112948396 A CN 112948396A
Authority
CN
China
Prior art keywords
service
data processing
rule
type
data
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
CN202110349293.4A
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.)
China Construction Bank Corp
Original Assignee
China Construction Bank Corp
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 China Construction Bank Corp filed Critical China Construction Bank Corp
Priority to CN202110349293.4A priority Critical patent/CN112948396A/en
Publication of CN112948396A publication Critical patent/CN112948396A/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/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/25Integrating or interfacing systems involving database management systems
    • G06F16/258Data format conversion from or to a database

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention discloses a data storage method, a data storage device, electronic equipment and a storage medium, wherein the method comprises the following steps: acquiring the rule content of each data processing rule and the system identification of the service processing system to which the data processing rule belongs; determining a service processing type and a service execution type corresponding to the current data processing rule aiming at each data processing rule; and for each data processing rule, correspondingly storing the current data processing rule, the corresponding system identifier, the service execution type and the corresponding service processing type into a target database, so that when a service processing request is received, the data processing rule is called from the target database to process the service in the service processing system. The technical scheme of the embodiment of the invention realizes the unified storage of the data processing rules, improves the maintenance efficiency of the target database and reduces the work tasks of maintenance personnel.

Description

Data storage method and device, electronic equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of data processing, in particular to a data storage method and device, electronic equipment and a storage medium.
Background
Due to the rapid development of the internet, many service industries handle business online nowadays. Such as a mobile business hall, a Unicom business hall, various banks, etc. A plurality of subsystems of the service industry correspond to different service types, so that the user experience is facilitated. However, different subsystems have their own databases, so that one service system has a plurality of databases, which increases many costs and increases maintenance costs.
Disclosure of Invention
Embodiments of the present invention provide a data storage method, an apparatus, an electronic device, and a storage medium, so as to implement standardized processing on data processing rules, and store the data processing rules in a unified database, thereby facilitating maintenance of the database.
In a first aspect, an embodiment of the present invention provides a data storage method, where the method includes:
acquiring the rule content of each data processing rule and the system identification of the service processing system to which the data processing rule belongs;
determining a service processing type and a service execution type corresponding to the current data processing rule aiming at each data processing rule;
and for each data processing rule, correspondingly storing the current data processing rule, the corresponding system identifier, the service execution type and the corresponding service processing type into a target database, so that when a service processing request is received, the data processing rule is called from the target database to process the service in the service processing system.
In a second aspect, an embodiment of the present invention further provides a data retrieving method, where the method includes:
receiving a service processing request and acquiring a system identifier of a service processing system in the service processing request;
and based on the system identification, acquiring a data processing rule matched with the system identification from all data processing rules pre-stored in a target database so as to process the service based on the data processing rule.
In a third aspect, an embodiment of the present invention further provides a data storage apparatus, where the apparatus includes:
the first system identification acquisition module is used for acquiring the rule content of each data processing rule and the system identification of the service processing system to which the data processing rule belongs;
the type determining module is used for determining a service processing type and a service execution type corresponding to the current data processing rule aiming at each data processing rule;
and the data processing rule storage module is used for correspondingly storing the current data processing rule, the affiliated service processing system, the service execution type and the corresponding service processing type into a target database aiming at each data processing rule so as to call the data processing rule based on the target database to process the service in the service processing system.
In a fourth aspect, an embodiment of the present invention further provides a data retrieving apparatus, where the apparatus includes:
the second system identification acquisition module is used for receiving the service processing request and acquiring the system identification of the service processing system in the service processing request;
and the service processing module is used for acquiring a data processing rule matched with the system identifier from each data processing rule pre-stored in a target database based on the system identifier so as to process the service based on the data processing rule.
In a fifth aspect, an embodiment of the present invention further provides an electronic device, where the electronic device includes:
one or more processors;
a storage device for storing one or more programs,
when the one or more programs are executed by the one or more processors, the one or more processors implement the data storage method and/or the data retrieval method provided by the embodiment of the invention.
In a sixth aspect, the present invention further provides a storage medium containing computer-executable instructions, which when executed by a computer processor, are used for executing the data storage method and/or the data retrieval method provided by the present invention.
According to the technical scheme of the embodiment of the invention, the rule content of each data processing rule and the system identification of the service processing system to which the data processing rule belongs are obtained, the service processing type and the service execution type corresponding to the current data processing rule are determined aiming at each data processing rule, and the uniqueness of the data processing rule is ensured through the system identification, the service processing type and the service execution type. And correspondingly storing the current data processing rule, the corresponding system identifier, the service execution type and the corresponding service processing type into a target database aiming at each data processing rule so as to ensure that the data processing rules with the same format are stored in the unified target database. When a business processing request is received, data processing rules can be invoked from the target database to process the business in the business processing system. The data storage method of the embodiment of the invention realizes the unified storage of the data processing rules, can realize the storage of various data processing rules by only using one target database, improves the maintenance efficiency of the target database and reduces the work tasks of maintenance personnel.
Drawings
In order to more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, a brief description is given below of the drawings used in describing the embodiments. It should be clear that the described figures are only views of some of the embodiments of the invention to be described, not all, and that for a person skilled in the art, other figures can be derived from these figures without inventive effort.
Fig. 1 is a schematic flowchart of a data storage method according to a first embodiment of the present invention;
fig. 2 is a schematic flowchart of a data storage method according to a second embodiment of the present invention;
FIG. 3 is a schematic diagram illustrating a rule management interface according to a second embodiment of the present invention;
fig. 4 is a schematic flowchart of a data storage method according to a third embodiment of the present invention;
fig. 5 is a flowchart illustrating a data retrieving method according to a fourth embodiment of the present invention;
FIG. 6 is a schematic structural diagram of a data storage device according to a fifth embodiment of the present invention;
fig. 7 is a schematic structural diagram of a data retrieving device according to a sixth embodiment of the present invention;
fig. 8 is a schematic structural diagram of an electronic device in a seventh embodiment of the invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a schematic flow chart of a data storage method according to an embodiment of the present invention, where the embodiment is applicable to a case where data processing rules are stored, and the method may be executed by a data storage device, and the data storage device may be implemented in a form of software and/or hardware.
As shown in fig. 1, the data storage method according to the embodiment of the present invention specifically includes the following steps:
s110, acquiring the rule content of each data processing rule and the system identification of the service processing system to which the data processing rule belongs.
It should be noted that the data storage method in the embodiment of the present invention is suitable for uniformly storing data processing rules corresponding to different service processing systems.
The business processing system is internally provided with a data processing rule, and the business processing system carries out business processing based on the data processing rule. The data processing rule refers to a rule condition when a service is processed. The rule content refers to a specific processing rule for processing the service in the service processing system. The rule content comprises data processing conditions, data processing flows, data processing identifiers and the like. The business processing system in the embodiment of the invention is a processing system for handling business, and comprises at least one of a public accumulation fund processing system, a client inquiry system and a personal loan handling system. The system identification refers to the unique identification of each service processing system. The representation form of the system identifier in the data processing rule may be a system ID, and may also be a data ID of the data processing rule. Different service processing systems can be distinguished through system identification.
Specifically, the rule content of each data processing rule and the system identifier of the service processing system to which the data processing rule belongs are obtained, preparation is made for subsequent storage of the data processing rule, and the system identifier is obtained, so that each data processing rule can be distinguished conveniently.
In this embodiment of the present invention, the acquiring the rule content of each data processing rule and the system identifier of the service processing system to which the data processing rule belongs includes: and aiming at each service processing system, calling a pre-stored data processing rule and a system identifier of the current service processing system from the current service processing system.
Each business processing system stores corresponding data processing rules and system identification. When obtaining the data processing rules, the internally stored data processing rules and system identification may be called from each business processing system. It should be noted that each business processing system processes data independently, and therefore, the rule contents of the data processing rules stored in each business processing system may be the same, and of course, the stored formats may also be different.
For each data processing rule, the rule content of each data processing rule and the system identifier of the service processing system to which the data processing rule belongs can be acquired in different manners, and the acquisition manner includes at least one of the following manners:
the first step of obtaining the rule content of each data processing rule and the system identifier of the service processing system to which the data processing rule belongs includes: and calling the data processing rule and the system identification from a cache of the current business processing system.
The cache refers to an area which is set by each business processing system and can temporarily store data, and the data processing rules are stored through the cache. When the service processing system works, the time for searching and acquiring the data processing rule can be reduced, and the running speed of the whole system is improved. Efficiency may be improved when data processing rules and system identification are invoked from a business processing system. The format of the data processing rule stored in the cache may be a key value pair, and the key may be a system identifier. value may be a data processing rule.
Secondly, the data processing rules and the system identification are called from the database corresponding to the business processing system. Each service processing System is provided with a corresponding database, and the database can be any one of MySQL, Hbase, Distributed File System (HDFS), and the like. It should be noted that the database of each service processing system stores data independently without interfering with each other. And the data processing rule and the system identification are called from the database of the service processing system, so that the calling effectiveness of the data processing rule and the system identification is improved.
Optionally, when the data processing rule and the system identifier are not retrieved from the cache, the data processing rule and the system identifier are retrieved from a database corresponding to the current service processing system.
Specifically, the data processing rules and the system identification are firstly called from the cache to accelerate the calling speed, and when the data processing rules and the system identification cannot be called from the cache, a standby scheme is adopted to call from the database of the business processing system, so that the corresponding data processing rules and the system identification can be called from the current business processing system.
And S120, determining the service processing type and the service execution type corresponding to the current data processing rule aiming at each data processing rule.
Wherein the service processing type includes: at least one of a core service type, a public accumulation fund service type and a customer inquiry service type; the service execution type comprises at least one of a research and development type, a test type and an online type. It should be noted that one service processing type may include a plurality of service processing systems. The representation of the business process type in the data processing rule may be a business process type ID. Accordingly, the expression of the service execution type may be a service execution ID (or environment ID). The data processing rule can be uniquely determined through the service processing type, the service execution type and the system identification. Of course, it is also possible to distinguish between different data processing rules using only system identification.
Specifically, the service processing type and the service execution type corresponding to each data processing rule are obtained to distinguish the data processing rules.
S130, correspondingly storing the current data processing rule, the corresponding system identification, the service execution type and the corresponding service processing type into a target database aiming at each data processing rule, and calling the data processing rule from the target database to process the service in the service processing system when receiving a service processing request.
The target database refers to a region where the data processing rule is finally stored, and may be any one of MySQL, Hbase, a Distributed File System (HDFS), and the like. In the embodiment of the invention, the target database is set as MySQL. The service processing request refers to a request which is received by a service processing system and needs to process data. The service refers to a service for data processing by a service processing system, such as the handling of personal loans, the transfer of accounts between enterprise users, the handling of public funds, and the like.
Specifically, a data processing rule may be uniquely determined based on the data identifier, the service execution type, and the service processing type. And correspondingly storing the data processing rules, the system identification, the service execution type and the service processing type in a target database so as to ensure that the storage formats of the data processing rules are the same. When receiving service processing requests through each service processing system, corresponding data processing rules can be called from the target database, and services in the service processing systems are processed through the called data processing rules, namely, data are processed.
According to the technical scheme of the embodiment of the invention, the rule content of each data processing rule and the system identification of the service processing system to which the data processing rule belongs are obtained, the service processing type and the service execution type corresponding to the current data processing rule are determined aiming at each data processing rule, and the uniqueness of the data processing rule is ensured through the system identification, the service processing type and the service execution type. And correspondingly storing the current data processing rule, the corresponding system identifier, the service execution type and the corresponding service processing type into a target database aiming at each data processing rule so as to ensure that the data processing rules with the same format are stored in the unified target database. When a business processing request is received, data processing rules can be invoked from the target database to process the business in the business processing system. The data storage method of the embodiment of the invention realizes the unified storage of the data processing rules, can realize the storage of various data processing rules by only using one target database, improves the maintenance efficiency of the target database and reduces the work tasks of maintenance personnel.
Example two
Fig. 2 is a schematic flow chart of a data storage method according to an embodiment of the present invention, and the embodiment of the present invention specifically optimizes step 120 on the basis of alternative solutions of the foregoing embodiment, and details of the optimization are set forth in the embodiment of the present invention, wherein technical terms the same as or similar to those of the foregoing embodiment will not be repeated.
As shown in fig. 2, the data storage method according to the embodiment of the present invention includes the following steps:
s210, acquiring the rule content of each data processing rule and the system identification of the service processing system to which the data processing rule belongs.
S220, acquiring a trigger operation on a rule management interface aiming at each data processing rule, determining at least one functional control corresponding to the trigger operation, and determining a configuration item corresponding to the at least one functional control; and determining a service processing type and a service execution type based on the configuration items.
The rule management interface is a visual interface, and at least one function control and at least one configuration item corresponding to the function control are arranged on the rule management interface. The function control refers to a function button that can be triggered by a user, for example, a function control of a service processing type and a function control of a service execution type. The configuration items refer to options corresponding to the function control, for example, when the function control is of a service execution type, the corresponding configuration items include a development type, a test type, and an online type. The display form of the configuration items can be options set on the rule management interface for a user to select, or an input box requiring the user to input characters and the like. In the embodiment of the present invention, the configuration items are set in the form of selection items, and the display form of the rule management interface is shown in fig. 3. It should be understood that fig. 3 is a schematic diagram of a rule management interface, and a specific display form of the rule management interface is not specifically limited in the embodiment of the present invention. The manner of acquiring the trigger operation may be to monitor a click operation of a mouse on the function control, or to monitor a trigger operation of an enter key, or to monitor a click operation of a user on a screen when the rule management interface is a touch screen, so as to set a service processing type and a service execution type of each data processing rule.
Specifically, by acquiring a trigger operation of a user on a rule management interface, at least one function control corresponding to the trigger operation is determined, a configuration item corresponding to the at least one function control is determined, and then a service processing type and a service execution type are determined based on the configuration item. And determining the service processing type and the service execution type of the data processing rule through the triggering operation of the user on the rule management interface so as to distinguish different data processing rules.
In this embodiment of the present invention, before the determining a service processing type and a service execution type based on the configuration item, the method includes: and checking the configuration items according to preset configuration item rules to determine whether the configuration items conform to the preset configuration item rules.
Different configuration item rules are set for different business processing systems, and the configuration item rules comprise at least one of user authority and field limitations of configuration items. After the functional control and at least one configuration item corresponding to the functional control are determined, verifying the configuration item, verifying whether the configuration item meets the rule of the configuration item, and if so, determining a service processing type and a service execution type based on the configuration item. And if not, feeding back a verification failure message to the user on the rule management interface so as to remind the user. The way of feeding back the check failure message to the user may be to pop up a window on the rule management interface, and display the word "check failure".
S230, correspondingly storing the current data processing rule, the corresponding system identification, the service execution type and the corresponding service processing type into a target database aiming at each data processing rule, so that when a service processing request is received, the data processing rule is called from the target database to process the service in the service processing system.
According to the technical scheme of the embodiment of the invention, the rule content of each data processing rule and the system identification of the service processing system to which the data processing rule belongs are obtained, the trigger operation on the rule management interface is obtained according to each data processing rule, the function control corresponding to the trigger operation and at least one configuration item corresponding to the function control are determined, so that the service processing type and the service execution type are determined, and the uniqueness of the data processing rule is ensured through the system identification, the service processing type and the service execution type. And the service processing type and the service execution type are obtained according to the mode of the rule management interface, so that the operation of a user is facilitated, and the user experience is improved. And correspondingly storing the current data processing rule, the corresponding system identifier, the service execution type and the corresponding service processing type into a target database aiming at each data processing rule so as to ensure that the data processing rules with the same format are stored in the unified target database. When a business processing request is received, data processing rules can be invoked from the target database to process the business in the business processing system. The data storage method of the embodiment of the invention realizes the unified storage of the data processing rules, can realize the storage of various data processing rules by only using one target database, and improves the maintenance efficiency of the target database.
EXAMPLE III
Fig. 4 is a schematic flow chart of a data storage method according to an embodiment of the present invention, where the embodiment of the present invention specifically optimizes step 130 on the basis of alternatives of the foregoing embodiments. The contents of the optimization are specifically described in the embodiments of the present invention. Technical terms identical or similar to those of the above embodiments will not be described again.
As shown in fig. 4, the data storage method according to the embodiment of the present invention includes the following steps:
s410, acquiring the rule content of each data processing rule and the system identification of the service processing system to which the data processing rule belongs.
And S420, determining the service processing type and the service execution type corresponding to the current data processing rule aiming at each data processing rule.
S430, regarding each data processing rule, taking the current data processing rule, the corresponding system identifier, the service execution type and the corresponding service processing type as a target data record; and storing the target data record into a target database according to a preset storage mode.
The preset storage mode may be storage sequentially according to storage time of the target data record, may be storage in a mode of dividing a storage area in the target database, or may be storage in a tree structure by storing the data processing rule, and the like.
Specifically, the current data processing rule, the corresponding system identifier, the service execution type, and the corresponding service processing type are stored in a form of a target data record, for example, the target database is MySQL, each data processing rule is stored in a target data table in a form of a target data record, and the system identifier, the service execution type, and the service processing type of the service processing system are stored in a form of a field. Optionally, the format of the target data table is set in the target database in advance. For example, a storage grid containing a system identifier, a service execution type, a service processing type, and a data processing rule in a storage data table and a location of the storage grid are preset. And storing the target data record in a target data table according to the data processing rule, the system identification, the service execution type and the position of the storage grid of the corresponding service processing type.
Illustratively, as shown in table 1, the data processing rules are stored in the form of:
TABLE 1
English name of field Name of Chinese character Field format
id System identification id Varchar
businessId Service processing type id Varchar
versionId Service execution type id Varchar
value Value of data Varchar
Specifically, the target data records are stored in the target database in the format in table 1, one data processing rule can be uniquely determined according to the system identifier, the service processing type and the service execution type, confusion among the data processing rules during storage is avoided, the format of the data processing rule is unified according to the above manner, the unified database can be used for storing the data processing rules of each service processing system, and maintenance of the database is facilitated.
In the embodiment of the present invention, the storage of the target data record may be in a manner of dividing a storage area in the target database, or may be in a manner of storing the data processing rule in a tree structure. The specific storage manner is explained as follows:
first, the storage area in the target database is divided. Specifically, the storing the target data record into a target database according to a preset storage manner includes: dividing the target database into at least one storage area according to a preset storage area dividing mode; determining a target storage area corresponding to the service processing system according to the system type of the service processing system; and recording and storing the target data to the target storage area.
The division mode of the storage area comprises division according to any one of a storage position, a data volume size, a system type of a service processing system, a service execution type and a service processing type. And storing a plurality of target data records in the same area according to the service processing type or the service execution type, wherein at the moment, the target data records are sequentially stored according to the storage sequence. The data size means that the storage area is divided into at least one storage area according to the same data size. The system types of the service processing systems can be distinguished by system identifications.
Specifically, the target database is divided into at least one storage area according to a preset storage area division mode, and the target data record is stored in the target storage area according to the target storage area of the system type of the service processing system. Such a storage mode may be a regionalized form of the target data record, which is convenient for a user to search or retrieve the target data record in the target database.
And secondly, storing the data processing rules in a tree structure. Specifically, the storing the target data record into a target database according to a preset storage manner includes: determining a system identifier of the business processing system; and if the target database comprises the system identification, taking the system identification as a root node, and storing the target data record as a leaf node of the root node in the target database.
The root node and the leaf nodes refer to nodes in a tree structure, and one root node is associated with at least one leaf node.
Specifically, a system identifier of the service processing system is determined, query is performed in the target database based on the system identifier, when the system identifier exists in the target database, the system identifier is used as a root node, and the target data record is stored in the target database as a leaf node of the root node. Optionally, when the system identifier is not queried in the target database, the system identifier and the corresponding storage area are added, the system identifier is used as a root node, and the target data record is stored in the target database as a leaf node of the root node.
According to the technical scheme of the embodiment of the invention, the rule content of each data processing rule and the system identification of the service processing system to which the data processing rule belongs are obtained, the service processing type and the service execution type corresponding to the current data processing rule are determined aiming at each data processing rule, and the uniqueness of the data processing rule is ensured through the system identification, the service processing type and the service execution type. And correspondingly storing the current data processing rule, the corresponding system identifier, the service execution type and the corresponding service processing type of each data processing rule into a target database in a target data recording mode so as to ensure that the storage form of the data processing rules is uniform. When a business processing request is received, data processing rules can be invoked from the target database to process the business in the business processing system. The data storage method of the embodiment of the invention realizes the unified storage of the data processing rules, can realize the storage of various data processing rules by only using one target database, improves the maintenance efficiency of the target database and reduces the work tasks of maintenance personnel.
Example four
Fig. 5 is a flowchart illustrating a data retrieving method according to an embodiment of the present invention. The embodiment of the invention is a data retrieval method based on the data storage scheme provided by the embodiment.
As shown in fig. 5, the data retrieving method according to the embodiment of the present invention includes the following steps:
s510, receiving the service processing request, and acquiring the system identifier of the service processing system in the service processing request.
The service processing request refers to a request for processing a service. The service processing request comprises at least one item of system identification, service processing type and service execution type. And acquiring the service processing request through the service processing system, and acquiring the system identifier of the service processing system in the service processing request to prepare for subsequently calling the data processing rule from the target database.
S520, based on the system identification, obtaining a data processing rule matched with the system identification from all data processing rules pre-stored in a target database, and processing the service based on the data processing rule.
The target database stores each data processing rule, the corresponding system identifier, the service processing type and the service execution type in advance, and the storage form can be in a target data record mode.
Specifically, after the system identifier is obtained, a data processing rule matched with the system identifier is determined from the data processing rules in the target database based on the system identifier, and the data processing rule is obtained to process the service. Of course, here, one data processing rule is uniquely determined by the system identifier, and in order to improve the uniqueness of the data processing rule, the system identifier, the service processing type, and the service execution type in the service processing request may be acquired to uniquely determine one data processing rule. And querying the matched system identification, service processing type and service execution type in the target database to determine the corresponding data processing rule.
According to the technical scheme of the embodiment of the invention, the system identification of the service processing system in the service processing request is obtained by receiving the service processing request. And based on the system identification, acquiring a data processing rule matched with the system identification from each data processing rule pre-stored in the target database so as to process the service according to the data processing rule. The target database stores the data processing rules in advance, so that the storage formats of the data processing rules are kept uniform, the maintenance of the target database is facilitated, and the acquisition of the data processing rules by the service processing systems is facilitated.
EXAMPLE five
Fig. 6 is a schematic structural diagram of a data storage device according to an embodiment of the present invention, where the data storage device according to the embodiment of the present invention can execute the data storage method according to the embodiment of the present invention, and has functional modules and beneficial effects corresponding to the execution method. The device includes: a first system identification acquisition module 610, a type determination module 620 and a data processing rule storage module 630; wherein:
a first system identifier obtaining module 610, configured to obtain rule contents of each data processing rule and a system identifier of a service processing system to which the data processing rule belongs;
a type determining module 620, configured to determine, for each data processing rule, a service processing type and a service execution type corresponding to a current data processing rule;
the data processing rule storage module 630 is configured to, for each data processing rule, correspondingly store the current data processing rule, the corresponding system identifier, the service execution type, and the corresponding service processing type in a target database, so as to invoke the data processing rule based on the target database to process the service in the service processing system.
Further, the first system identifier obtaining module 610 includes:
and the first system identifier acquisition submodule is used for calling the pre-stored data processing rule and the system identifier of the current service processing system from the current service processing system aiming at each service processing system.
Further, the first system identifier obtaining module 610 includes:
and the second system identifier acquisition submodule is used for calling the data processing rule and the system identifier from the cache of the current service processing system.
Further, the apparatus further comprises:
and the data processing rule calling module is used for calling the data processing rule and the system identifier from a database corresponding to the current business processing system when the data processing rule and the system identifier are not called from the cache.
Further, the type determining module 620 includes:
the first type determining submodule is used for acquiring triggering operation on a rule management interface, determining at least one functional control corresponding to the triggering operation and determining a configuration item corresponding to the at least one functional control; and determining a service processing type and a service execution type based on the configuration items.
Further, the apparatus further comprises:
and the configuration item checking module is used for checking the configuration item according to a preset configuration item rule so as to determine whether the configuration item conforms to the preset configuration item rule.
Further, the data processing rule storage module 630 includes:
the first data processing rule storage submodule is used for taking the current data processing rule, the corresponding system identification, the service execution type and the corresponding service processing type as a target data record; and storing the target data record into a target database according to a preset storage mode.
Further, the first data processing rule storage submodule includes:
the first storage unit is used for dividing the target database into at least one storage area according to a preset storage area dividing mode; determining a target storage area corresponding to the service processing system according to the system type of the service processing system; and recording and storing the target data to the target storage area.
Further, the first data processing rule storage submodule includes:
the second storage unit is used for determining the system identifier of the service processing system; and if the target database comprises the system identification, taking the system identification as a root node, and storing the target data record as a leaf node of the root node in the target database.
Further, the service processing types include: at least one of a core service type, a public accumulation fund service type and a customer inquiry service type; the service execution type comprises at least one of a research and development type, a test type and an online type.
According to the technical scheme of the embodiment of the invention, the rule content of each data processing rule and the system identification of the service processing system to which the data processing rule belongs are obtained, the service processing type and the service execution type corresponding to the current data processing rule are determined aiming at each data processing rule, and the uniqueness of the data processing rule is ensured through the system identification, the service processing type and the service execution type. And correspondingly storing the current data processing rule, the corresponding system identifier, the service execution type and the corresponding service processing type into a target database aiming at each data processing rule so as to ensure that the data processing rules with the same format are stored in the unified target database. When a business processing request is received, data processing rules can be invoked from the target database to process the business in the business processing system. The data storage method of the embodiment of the invention realizes the unified storage of the data processing rules, can realize the storage of various data processing rules by only using one target database, improves the maintenance efficiency of the target database and reduces the work tasks of maintenance personnel.
It should be noted that, the sub-modules and modules included in the apparatus are merely divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be implemented; in addition, specific names of the functional modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the embodiment of the present invention.
EXAMPLE six
Fig. 7 is a schematic structural diagram of a data retrieving device according to an embodiment of the present invention. The data calling device provided by the embodiment of the invention can execute the data calling method provided by the embodiment of the invention, and has the corresponding functional modules of the execution method and the beneficial effects. The device includes: a second system identifier obtaining module 710 and a service processing module 720; wherein:
a second system identifier obtaining module 710, configured to receive the service processing request, and obtain a system identifier of the service processing system in the service processing request;
and the service processing module 720 is configured to obtain, based on the system identifier, a data processing rule matched with the system identifier from data processing rules pre-stored in a target database, so as to process a service based on the data processing rule.
According to the technical scheme of the embodiment of the invention, the system identification of the service processing system in the service processing request is obtained by receiving the service processing request. And based on the system identification, acquiring a data processing rule matched with the system identification from each data processing rule pre-stored in the target database so as to process the service according to the data processing rule. The target database stores the data processing rules in advance, so that the storage formats of the data processing rules are kept uniform, the maintenance of the target database is facilitated, and the acquisition of the data processing rules by the service processing systems is facilitated.
It should be noted that, the sub-modules and modules included in the apparatus are merely divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be implemented; in addition, specific names of the functional modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the embodiment of the present invention.
EXAMPLE seven
Fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the present invention. FIG. 8 illustrates a block diagram of an exemplary electronic device 80 suitable for use in implementing embodiments of the present invention. The electronic device 80 shown in fig. 8 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiment of the present invention.
As shown in fig. 8, the electronic device 80 is in the form of a general purpose computing device. The components of the electronic device 80 may include, but are not limited to: one or more processors or processing units 801, a system memory 802, and a bus 803 that couples various system components including the system memory 802 and the processing unit 801.
Bus 803 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
The electronic device 80 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by electronic device 80 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 802 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)804 and/or cache memory 805. The electronic device 80 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 806 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 8, and commonly referred to as a "hard drive"). Although not shown in FIG. 8, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 803 by one or more data media interfaces. Memory 802 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 808 having a set (at least one) of program modules 807 may be stored, for instance, in memory 802, such program modules 807 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may include an implementation of a network environment. Program modules 807 generally perform the functions and/or methodologies of embodiments of the present invention as described herein.
The electronic device 80 may also communicate with one or more external devices 809 (e.g., keyboard, pointing device, display 810, etc.), with one or more devices that enable a user to interact with the device 80, and/or with any devices (e.g., network card, modem, etc.) that enable the electronic device 80 to communicate with one or more other computing devices. Such communication may occur via an input/output (I/O) interface 811. Also, the electronic device 80 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 812. As shown, the network adapter 812 communicates with the other modules of the electronic device 80 over the bus 803. It should be appreciated that although not shown in FIG. 8, other hardware and/or software modules may be used in conjunction with electronic device 80, 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.
The processing unit 801 executes various functional applications and data processing by running a program stored in the system memory 802, for example, implementing a data storage method and/or a data retrieval method provided by an embodiment of the present invention.
Example eight
Embodiments of the present invention also provide a storage medium containing computer-executable instructions, which when executed by a computer processor, are operable to perform a data storage method, and/or a data retrieval method; the data storage method comprises the following steps:
acquiring the rule content of each data processing rule and the system identification of the service processing system to which the data processing rule belongs; determining a service processing type and a service execution type corresponding to the current data processing rule aiming at each data processing rule; and for each data processing rule, correspondingly storing the current data processing rule, the corresponding system identifier, the service execution type and the corresponding service processing type into a target database, so that when a service processing request is received, the data processing rule is called from the target database to process the service in the service processing system.
The data calling method comprises the following steps: receiving a service processing request and acquiring a system identifier of a service processing system in the service processing request; and based on the system identification, acquiring a data processing rule matched with the system identification from all data processing rules pre-stored in a target database so as to process the service based on the data processing rule.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer 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 computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, 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. In the context of this document, a computer 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.
A computer readable signal medium may include a propagated data signal with computer 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 computer readable signal medium may also be any computer readable medium that is not a computer 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 computer 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.
Computer program code for carrying out operations for embodiments 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, Smalltalk, 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 computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (15)

1. A method of storing data, comprising:
acquiring the rule content of each data processing rule and the system identification of the service processing system to which the data processing rule belongs;
determining a service processing type and a service execution type corresponding to the current data processing rule aiming at each data processing rule;
and for each data processing rule, correspondingly storing the current data processing rule, the corresponding system identifier, the service execution type and the corresponding service processing type into a target database, so that when a service processing request is received, the data processing rule is called from the target database to process the service in the service processing system.
2. The method according to claim 1, wherein the obtaining the rule content of each data processing rule and the system identifier of the service processing system to which the data processing rule belongs comprises:
and aiming at each service processing system, calling a pre-stored data processing rule and a system identifier of the current service processing system from the current service processing system.
3. The method according to claim 2, wherein the obtaining the rule content of each data processing rule and the system identifier of the service processing system to which the data processing rule belongs comprises:
and calling the data processing rule and the system identification from a cache of the current business processing system.
4. The method of claim 3, further comprising:
and when the data processing rule and the system identification are not called from the cache, calling the data processing rule and the system identification from a database corresponding to the current business processing system.
5. The method of claim 1, wherein determining the traffic processing type and the traffic execution type corresponding to the current data processing rule comprises:
acquiring a trigger operation on a rule management interface, determining at least one function control corresponding to the trigger operation, and determining a configuration item corresponding to the at least one function control;
and determining a service processing type and a service execution type based on the configuration items.
6. The method of claim 5, wherein prior to said determining a traffic handling type and a traffic execution type based on said configuration items, comprising:
and checking the configuration items according to preset configuration item rules to determine whether the configuration items conform to the preset configuration item rules.
7. The method of claim 1, wherein the storing the current data processing rule, the corresponding system identifier, the service execution type, and the corresponding service processing type into the target database comprises:
taking the current data processing rule, the corresponding system identification, the service execution type and the corresponding service processing type as a target data record;
and storing the target data record into a target database according to a preset storage mode.
8. The method of claim 7, wherein storing the target data record in a target database according to a preset storage manner comprises:
dividing the target database into at least one storage area according to a preset storage area dividing mode;
determining a target storage area corresponding to the service processing system according to the system type of the service processing system;
and recording and storing the target data to the target storage area.
9. The method of claim 7, wherein storing the target data record in a target database according to a preset storage manner comprises:
determining a system identifier of the business processing system;
and if the target database comprises the system identification, taking the system identification as a root node, and storing the target data record as a leaf node of the root node in the target database.
10. The method of claim 1, wherein the traffic handling type comprises: at least one of a core service type, a public accumulation fund service type and a customer inquiry service type;
the service execution type comprises at least one of a research and development type, a test type and an online type.
11. A method for retrieving data, comprising:
receiving a service processing request and acquiring a system identifier of a service processing system in the service processing request;
and based on the system identification, acquiring a data processing rule matched with the system identification from all data processing rules pre-stored in a target database so as to process the service based on the data processing rule.
12. A data storage device, comprising:
the first system identification acquisition module is used for acquiring the rule content of each data processing rule and the system identification of the service processing system to which the data processing rule belongs;
the type determining module is used for determining a service processing type and a service execution type corresponding to the current data processing rule aiming at each data processing rule;
and the data processing rule storage module is used for correspondingly storing the current data processing rule, the affiliated service processing system, the service execution type and the corresponding service processing type into a target database aiming at each data processing rule so as to call the data processing rule based on the target database to process the service in the service processing system.
13. A data retrieval device, comprising:
the second system identification acquisition module is used for receiving the service processing request and acquiring the system identification of the service processing system in the service processing request;
and the service processing module is used for acquiring a data processing rule matched with the system identifier from each data processing rule pre-stored in a target database based on the system identifier so as to process the service based on the data processing rule.
14. An electronic device, characterized in that the electronic device comprises:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement a data storage method as claimed in any one of claims 1-10 and/or a data retrieval method as claimed in claim 11.
15. A storage medium containing computer-executable instructions for performing the data storage method of any one of claims 1-10 and/or the data retrieval method of claim 11 when executed by a computer processor.
CN202110349293.4A 2021-03-31 2021-03-31 Data storage method and device, electronic equipment and storage medium Pending CN112948396A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110349293.4A CN112948396A (en) 2021-03-31 2021-03-31 Data storage method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110349293.4A CN112948396A (en) 2021-03-31 2021-03-31 Data storage method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN112948396A true CN112948396A (en) 2021-06-11

Family

ID=76231581

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110349293.4A Pending CN112948396A (en) 2021-03-31 2021-03-31 Data storage method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112948396A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113806176A (en) * 2021-09-22 2021-12-17 中国建设银行股份有限公司 Data object identification method and device based on configuration management
CN114418554A (en) * 2022-03-15 2022-04-29 太平金融科技服务(上海)有限公司深圳分公司 Method, system, computer device and medium for managing rules in various business systems

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113806176A (en) * 2021-09-22 2021-12-17 中国建设银行股份有限公司 Data object identification method and device based on configuration management
CN114418554A (en) * 2022-03-15 2022-04-29 太平金融科技服务(上海)有限公司深圳分公司 Method, system, computer device and medium for managing rules in various business systems

Similar Documents

Publication Publication Date Title
US9996565B2 (en) Managing an index of a table of a database
US10002170B2 (en) Managing a table of a database
CN111709527A (en) Operation and maintenance knowledge map library establishing method, device, equipment and storage medium
CN112463800A (en) Data reading method and device, server and storage medium
CN112948396A (en) Data storage method and device, electronic equipment and storage medium
CN113254969B (en) Business data processing method and device, electronic equipment and storage medium
CN111815421A (en) Tax policy processing method and device, terminal equipment and storage medium
CN112860706A (en) Service processing method, device, equipment and storage medium
CN113760839A (en) Log data compression processing method and device, electronic equipment and storage medium
US20220300534A1 (en) Data processing method, data querying method, and server device
CN109033456B (en) Condition query method and device, electronic equipment and storage medium
CN114168616A (en) Data acquisition method and device, electronic equipment and storage medium
CN112258244B (en) Method, device, equipment and storage medium for determining task to which target object belongs
CN112039975A (en) Method, device, equipment and storage medium for processing message field
CN112965943A (en) Data processing method and device, electronic equipment and storage medium
CN110515954B (en) Data processing method, device, equipment and storage medium
CN111447268B (en) File structure conversion method, device, equipment and storage medium
CN114925050A (en) Data verification method and device based on knowledge base, electronic equipment and storage medium
CN114238391A (en) Data paging query method and device, electronic equipment and storage medium
CN112905635A (en) Service processing method, device, equipment and storage medium
CN113792138A (en) Report generation method and device, electronic equipment and storage medium
CN113761102A (en) Data processing method, device, server, system and storage medium
CN109710673B (en) Work processing method, device, equipment and medium
US20230214394A1 (en) Data search method and apparatus, electronic device and storage medium
CN114676163A (en) Data query method, device, equipment, system and storage medium

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