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

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

Info

Publication number
CN114064148B
CN114064148B CN202111365228.7A CN202111365228A CN114064148B CN 114064148 B CN114064148 B CN 114064148B CN 202111365228 A CN202111365228 A CN 202111365228A CN 114064148 B CN114064148 B CN 114064148B
Authority
CN
China
Prior art keywords
target
configuration information
data sets
container
loading operation
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
CN202111365228.7A
Other languages
Chinese (zh)
Other versions
CN114064148A (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.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology 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 Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202111365228.7A priority Critical patent/CN114064148B/en
Publication of CN114064148A publication Critical patent/CN114064148A/en
Application granted granted Critical
Publication of CN114064148B publication Critical patent/CN114064148B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • 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
    • G06F16/2228Indexing structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45562Creating, deleting, cloning virtual machine instances
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

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

Abstract

The disclosure provides a data processing method, a device, electronic equipment and a storage medium, relates to the technical field of computers, and further relates to the field of databases, so as to at least solve the technical problems of complex operation process and high development cost in initializing a data set in a database in the related technology. The specific implementation scheme is as follows: implanting configuration information in the target starting container, wherein the configuration information is used for creating a plurality of data sets of the target type database and/or creating corresponding indexes for the plurality of data sets in the process of loading operation of the target starting container; and controlling the target starting container to execute the loading operation process, and calling configuration information at the target stage of the loading operation process to create a plurality of data sets and/or indexes corresponding to the plurality of data sets.

Description

Data processing method, device, electronic equipment and storage medium
Technical Field
The disclosure relates to the field of computer technology, and further relates to the field of databases, in particular to a data processing method, a data processing device, electronic equipment and a storage medium.
Background
A distributed file storage based database (MongoDB) can provide an extensible high-performance data storage solution for WEB applications. When a lightweight open source framework (e.g., spring) project is privately owned or public cloud deployment is performed, a data set in a MongoDB database needs to be initialized.
In the related art, a command or sentence script for creating a data set and an index may be executed at the time of initialization, or the data set and the index may be created at the time of first operation of the mongdb document through file annotation and index annotation in Spring item data. However, the related art has a complicated operation process of initializing the mongo db database and a high development cost.
Disclosure of Invention
The disclosure provides a data processing method, a device, electronic equipment and a storage medium, which at least solve the technical problems of complicated operation process and high development cost of initializing a data set in a database in the related technology.
According to an aspect of the present disclosure, there is provided a data processing method including: implanting configuration information in the target starting container, wherein the configuration information is used for creating a plurality of data sets of the target type database and/or creating corresponding indexes for the plurality of data sets in the process of loading operation of the target starting container; and controlling the target starting container to execute the loading operation process, and calling configuration information at the target stage of the loading operation process to create a plurality of data sets and/or indexes corresponding to the plurality of data sets.
According to still another aspect of the present disclosure, there is provided a data processing apparatus including: the configuration module is used for implanting configuration information into the target starting container, wherein the configuration information is used for creating a plurality of data sets of the target type database and/or creating corresponding indexes for the plurality of data sets in the process of loading operation of the target starting container; the creation module is used for controlling the target starting container to execute the loading operation process and calling configuration information in a target stage of the loading operation process so as to create a plurality of data sets and/or indexes corresponding to the plurality of data sets.
According to still another aspect of the present disclosure, there is provided an electronic apparatus including: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the data processing methods set forth in the present disclosure.
According to yet another aspect of the present disclosure, there is provided a non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the data processing method set forth in the present disclosure.
According to yet another aspect of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, performs the data processing method set forth in the present disclosure.
In the method, configuration information is implanted into the target starting container, and the configuration information is used for creating a plurality of data sets of the target type database and/or creating corresponding indexes for the plurality of data sets in the process of loading operation performed by the target starting container, so that the target starting container is controlled to execute the loading operation process, and the configuration information is called in the target stage of the loading operation process to create the plurality of data sets and/or indexes corresponding to the plurality of data sets, thereby achieving the purpose of efficiently creating the data sets in the database and indexes corresponding to the data sets, simplifying the operation flow of initializing the data sets in the database, further reducing the development cost, and further solving the technical problems of complicated operation process and higher development cost of initializing the data sets in the database in the related art.
It should be understood that the description in this section is not intended to identify key or critical features of the embodiments of the disclosure, nor is it intended to be used to limit the scope of the disclosure. Other features of the present disclosure will become apparent from the following specification.
Drawings
The drawings are for a better understanding of the present solution and are not to be construed as limiting the present disclosure. Wherein:
FIG. 1 is a schematic diagram of a related art data processing method;
FIG. 2 is a schematic diagram of yet another related art data processing method;
FIG. 3 is a block diagram of a hardware architecture of a computer terminal (or mobile device) for implementing a data processing method according to an embodiment of the present disclosure;
FIG. 4 is a flow chart of a data processing method according to an embodiment of the present disclosure;
FIG. 5a is a schematic diagram of a related art operation for creating a data set and index;
FIG. 5b is a schematic diagram of an operation for creating a data set and index according to an embodiment of the present disclosure;
FIG. 6a is a schematic diagram of a corresponding relationship between entities in the related art;
FIG. 6b is a schematic diagram of entity correspondence according to an embodiment of the present disclosure;
fig. 7 is a block diagram of a data processing apparatus according to an embodiment of the present disclosure.
Detailed Description
Exemplary embodiments of the present disclosure are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present disclosure to facilitate understanding, and should be considered as merely exemplary. Accordingly, one of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present disclosure. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
It should be noted that the terms "first," "second," and the like in the description and claims of the present disclosure and in the foregoing figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the disclosure described herein may be capable of operation in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The initialization process for the data set in the MongoDB database comprises the steps of creating the data set and the index of the corresponding set, wherein the initialization of the data set is generally carried out in the following two modes in the prior scheme:
mode one: a command or statement script that builds a data set and index is executed in the mongo db database. Although the method is simple and direct, when privately deploying some user servers which cannot access the external network, the situation that the MongoDB database cannot be logged in and then corresponding sentences cannot be executed occurs. Also for public cloud projects, the MongoDB databases in the production environment cannot be directly connected manually to execute statement operations, and when the manual operations are adopted for initialization, the sequence and the dependency relationship of table construction and index also need to be noted.
For example, fig. 1 is a schematic diagram of a data processing method in the related art, as shown in fig. 1, after initializing a data set in a mongo db database, manually creating the data set and a corresponding index of the mongo db database, then starting a project, and finally ending the creation flow.
Mode two: data sets and indexes are created at the first operation of the mongdb Document by file (Document) annotations and index (Indexed) annotations in Spring project data. In this way, the program automatically creates a set and index when operating the database without logging in the device where the MongoDB database is located. However, this scheme has a disadvantage when the user data size is large and the MongoDB database needs to be subjected to the homomorphic sub-table operation.
Because of the persistence class of Document annotation modifiers, only the field index of the Indexed annotation modifier can be created for a fixed data set, but the index cannot be established for the data set specifying other names. Therefore, when the user data volume is large and the MongoDB database needs to be subjected to the homostructure sub-table operation, the user also needs to log in the MongoDB database to carry out the manual command operation, and the problem similar to the problem that the corresponding server in the scheme I cannot be connected and cannot be operated is also faced.
Although Document annotation can also be utilized, the number of sub-tables is established according to the need, a large number of persistent entities with the same structure are established in a one-to-one correspondence, and then the collection and the index are automatically established when the database is operated. However, this way, a large number of repeated structure entities are established, increasing the load of the container during service start, consuming more server resources such as memory, and exponentially increasing the repeated codes. And if the persistent layer code needs to be modified later, all the persistent entity codes with the same structure are subjected to modification, so that a large amount of development cost is increased, and the maintenance of the system is not facilitated.
For example, fig. 2 is a schematic diagram of still another related art data processing method, as shown in fig. 2, after initializing a data set in a mongo db database, first performing item startup, creating the data set and adding an index according to annotations when the mongo db document is first operated after the item startup.
When the Spring project privatization or public cloud deployment is carried out in the existing scheme, the technical problems that the operation process for initializing the data set in the database is complex and the development cost is high exist.
In accordance with an embodiment of the present disclosure, a data processing method is provided, it being noted that the steps illustrated in the flowcharts of the figures may be performed in a computer system such as a set of computer executable instructions, and although a logical order is illustrated in the flowcharts, in some cases the steps illustrated or described may be performed in an order other than that illustrated herein.
The method embodiments provided by the embodiments of the present disclosure may be performed in a mobile terminal, a computer terminal, or similar electronic device. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the disclosure described and/or claimed herein. Fig. 3 shows a block diagram of a hardware architecture of a computer terminal (or mobile device) for implementing a data processing method.
As shown in fig. 3, the computer terminal 300 includes a computing unit 301 that can perform various appropriate actions and processes according to a computer program stored in a Read Only Memory (ROM) 302 or a computer program loaded from a storage unit 308 into a Random Access Memory (RAM) 303. In the RAM 303, various programs and data required for the operation of the computer terminal 300 can also be stored. The computing unit 301, the ROM 302, and the RAM 303 are connected to each other by a bus 304. An input/output (I/O) interface 305 is also connected to bus 304.
Various components in computer terminal 300 are connected to I/O interface 305, including: an input unit 306 such as a keyboard, a mouse, etc.; an output unit 307 such as various types of displays, speakers, and the like; a storage unit 308 such as a magnetic disk, an optical disk, or the like; and a communication unit 309 such as a network card, modem, wireless communication transceiver, etc. The communication unit 309 allows the computer terminal 300 to exchange information/data with other devices through a computer network such as the internet and/or various telecommunication networks.
The computing unit 301 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 301 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various computing units running machine learning model algorithms, a Digital Signal Processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 301 performs the data processing methods described herein. For example, in some embodiments, the data processing method may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as storage unit 308. In some embodiments, part or all of the computer program may be loaded and/or installed onto the computer terminal 300 via the ROM 302 and/or the communication unit 309. One or more steps of the data processing methods described herein may be performed when the computer program is loaded into RAM 303 and executed by computing unit 301. Alternatively, in other embodiments, the computing unit 301 may be configured to perform the data processing method by any other suitable means (e.g. by means of firmware).
Various implementations of the systems and techniques described here can be implemented in digital electronic circuitry, integrated circuitry, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
It should be noted here that, in some alternative embodiments, the electronic device shown in fig. 3 described above may include hardware elements (including circuits), software elements (including computer code stored on a computer readable medium), or a combination of both hardware and software elements. It should be noted that fig. 3 is only one example of a specific example, and is intended to illustrate the types of components that may be present in the above-described electronic device.
In the above-described operating environment, the present disclosure provides a data processing method as shown in fig. 4, which may be performed by a computer terminal or similar electronic device as shown in fig. 3. Fig. 4 is a flowchart of a data processing method provided according to an embodiment of the present disclosure. As shown in fig. 4, the method may include the steps of:
step S40, implanting configuration information in the target starting container, wherein the configuration information is used for creating a plurality of data sets of the target type database and/or creating corresponding indexes for the plurality of data sets in the process of loading operation of the target starting container;
the target starting container is an open source application framework, for example, the target starting container may be an open source application framework Springboot container.
The above-described object type databases include, but are not limited to, mongoDB databases, relational database management System (MySQL) databases, and the like. The plurality of data sets may be a plurality of sets (collections) in a mongo db database, or may be a plurality of data tables in MySQL.
Optionally, implanting configuration information in the target launch container includes: code is implanted in the target launch container that can be automatically executed, the code being operable to create multiple data sets of the target type database and/or to create corresponding indexes for the multiple data sets.
Optionally, configuration information is embedded in the target launch container, the configuration information being used to create multiple data sets of the target type database during execution of the load operation by the target launch container.
Optionally, configuration information is embedded in the target launch container, the configuration information being used to create corresponding indexes for the plurality of data sets during execution of the load operation by the target launch container.
Optionally, configuration information is embedded in the target launch container, the configuration information being used to create multiple data sets of the target type database and to create corresponding indexes for the multiple data sets during execution of the load operation by the target launch container.
In particular, the implementation process of implanting configuration information in the target boot container may refer to further description of the embodiments of the present disclosure, which is not repeated.
In step S42, the control target launch container executes the loading operation procedure, and invokes the configuration information at the target stage of the loading operation procedure to create a plurality of data sets and/or indexes corresponding to the plurality of data sets.
The target stage is the last operation step before the loading operation is completed.
According to the steps S40 to S42 of the present disclosure, configuration information is implanted into the target boot container, where the configuration information is used to create multiple data sets of the target type database and/or create corresponding indexes for the multiple data sets during the execution of the loading operation by the target boot container, so as to control the target boot container to execute the loading operation, and call the configuration information at the target stage of the loading operation to create multiple data sets and/or indexes corresponding to the multiple data sets, thereby achieving the purpose of efficiently creating the data sets in the database and indexes corresponding to the data sets, simplifying the operation flow of initializing the data sets in the database, and further reducing the development cost, and solving the technical problems of complicated operation process and high development cost of initializing the data sets in the database in the related art.
The data processing method of the above embodiment is further described below.
As an alternative embodiment, implanting configuration information in the target boot container at step S40 includes: configuration information is implanted during the loading operation performed by the target boot container.
As an alternative embodiment, the implantation configuration information includes any one of the following steps during the loading operation performed by the target boot container:
step S401, implanting configuration information in the target starting container based on the instance object provided by the target starting container in the process of loading operation of the target starting container;
in particular, the implementation of implanting configuration information in a target launch container based on an instance object provided by the target launch container may be further described with reference to the embodiments below.
In step S402, during the loading operation performed by the target boot container, configuration information is implanted in the target boot container based on the native manner of the target type database.
The native mode is used for representing that a native control command of the target type database is adopted to perform control operation on the target type database.
In particular, the implementation of implanting configuration information in a target launch container based on the native manner of the target type database may be further described with reference to the embodiments below.
Based on the step S401 or the step S402, in the process of executing the loading operation by the target startup container, the configuration information can be implanted into the target startup container based on the instance object provided by the target startup container or based on the original mode of the target type database, so that the configuration information can be directly invoked in the loading operation later, and the creation efficiency of a plurality of data sets and corresponding indexes thereof is improved.
As an alternative embodiment, in step S401, implanting configuration information in a target boot container based on an instance object provided by the target boot container includes:
step S4011, initializing a first instance object, wherein the first instance object is provided by a target launch container, and a bottom layer of the first instance object is connected with a target type database;
the first instance object may be a Mongo template instance object, i.e., a Mongo template object. Wherein, the MongoTemplate object can be provided by a Springboot container, and the bottom layer of the instance object is connected with the MongoDB database.
In step S4012, the configuration information is implanted through the initialized first instance object to create a plurality of data sets and/or indexes corresponding to the plurality of data sets.
Specifically, configuration information is implanted through the initialized first instance object to directly operate the MongoDB database, so that a plurality of data sets and/or indexes corresponding to the plurality of data sets are created.
Based on the above steps S4011 to S4012, configuration information can be embedded in the target launch container based on the instance object provided by the target launch container to create a plurality of data sets and/or indexes corresponding to the plurality of data sets using the first instance object.
As an alternative embodiment, implanting configuration information in the target launch container based on the native manner of the target type database in step S402 includes:
step S4021, creating a second instance object through a native control command of the target type database, wherein the second instance object is used for connecting with the target type database;
the second instance object is a Mongo client object, namely a Mongo client object, and the Mongo client object can establish connection with the Mongo db database through an internet protocol (Internet Protocol, IP) address and a port of parameter incoming.
Step S4022, obtaining a third instance object of the target type database through the second instance object;
the third instance object may be a Mongo database object, i.e., a Mongo database object.
Step S4023, obtaining a target set object of the target type database through a third instance object;
the target collection object is a Mongo collection object, namely a monglocollection object.
In step S4024, the configuration information is implanted through the target set object to create multiple data sets and/or indexes corresponding to the multiple data sets.
For example, the MongoDB database is directly operated by a MongoCollection object to create multiple data sets and indexes corresponding to the multiple data sets.
Based on the above steps S4021 to S4024, configuration information can be implanted in the target launch container based on the native manner of the target type database, so as to create multiple data sets and/or indexes corresponding to the multiple data sets.
As an alternative embodiment, in step S42, controlling the target boot container to perform the loading operation procedure, and calling the configuration information in the target phase includes: the control target starts the container to execute the loading operation process, and the configuration information is called in the last operation step before the loading operation is completed.
Specifically, in the process of controlling the target starting container to execute the loading operation, the target starting container is firstly loaded into the required resources, and the configuration information is called in the last operation step before the loading operation is completed, so that the loaded resources in the loading operation process can be fully utilized.
As an alternative embodiment, the plurality of data sets have the same data structure.
Specifically, the persisted entity classes for the multiple data sets are the same. Since the target launch container has been indexed to the corresponding set of mongo db databases at initialization, there is no need to create an index from annotations in the persisting entity. At this time, a persistent entity class is utilized to operate a plurality of aggregate sub-tables with the same data structure in the MongoDB database.
The following describes a data processing method according to an embodiment of the present disclosure with reference to a schematic diagram.
FIG. 5a is a schematic diagram of an operation procedure for creating data sets and indexes in the related art, and as shown in FIG. 5a, a deployment person needs to manually create a plurality of data sets and indexes corresponding to the plurality of data sets in a MongoDB database, and starts a project service after the creation is completed.
Fig. 5b is a schematic diagram of an operation procedure for creating a data set and an index according to an embodiment of the present disclosure, where, as shown in fig. 5b, when executing the data processing method according to an embodiment of the present disclosure, a deployment personnel may directly start a project service, and in a process of executing a loading operation by the project service, configuration information may be invoked to automatically create a plurality of data sets in a plurality of mongo db databases and indexes corresponding to the plurality of data sets.
The method and the device for loading the data sets in the target starting container call the configuration information in the loading operation process of the target starting container to create the data sets and the indexes corresponding to the data sets, can automatically execute the initialization task when the project service is started, and can simplify the manual operation of logging in the database for initialization in the related technology. Further, it is possible to avoid generation of abnormal data that does not conform to a table structure or an index due to the fact that the manual execution time is later than the service start time, while at the same time. The loading process of the service container does not need to wait for the completion of the collection and index creation in the database, thereby reducing the service unavailable time when the project is released.
FIG. 6a is a schematic diagram of an entity correspondence relationship in the related art, as shown in FIG. 6a, when a database table or a set is operated by adding Document notes, index notes, and the like into the persistent entity class, one persistent entity class can only uniquely correspond to an index for initializing a set of names, and for multiple set sub-tables of the same structure, the purpose of initializing each set sub-table can be achieved by establishing the same number of persistent entity classes as the number of sets. That is, when n data sets are established in the mongo db database, n persistent entity classes need to be created in the project container in a one-to-one correspondence, which is disadvantageous for subsequent operation of the mongo db database and management of the persistent entity classes.
Fig. 6b is a schematic diagram of entity correspondence, and fig. 6b shows that in the embodiment of the present disclosure, configuration information may be implanted in a target startup container, where the configuration information may be customized, so that a plurality of data sets of mongo dbs with the same data structure may be established as required, and creation of a corresponding index of the data sets is completed after container initialization. Therefore, when the data sets of the same data structure are operated, only one persistent entity class needs to be created in the project container, so that convenient management of the persistent entity class is realized.
According to the embodiment of the disclosure, the configuration information is implanted into the target starting container, and is used for creating a plurality of data sets of the target type database and/or creating corresponding indexes for the plurality of data sets in the process of loading operation performed by the target starting container, so that the target starting container is controlled to perform the loading operation process, and the configuration information is called in the target stage of the loading operation process, so that the plurality of data sets and/or indexes corresponding to the plurality of data sets are created, the purpose of efficiently creating the data sets in the database and indexes corresponding to the data sets is achieved, the operation flow of initializing the data sets in the database is simplified, the effect of reducing the development cost is achieved, and the technical problems that the operation process of initializing the data sets in the database is complicated and the development cost is high in the related art are solved.
In the technical scheme of the disclosure, the related processes of collecting, storing, using, processing, transmitting, providing, disclosing and the like of the personal information of the user accord with the regulations of related laws and regulations, and the public order colloquial is not violated.
From the description of the above embodiments, it will be clear to a person skilled in the art that the method according to the above embodiments may be implemented by means of software plus the necessary general hardware platform, but of course also by means of hardware, but in many cases the former is a preferred embodiment. Based on such understanding, the technical solution of the present disclosure may be embodied essentially or in a part contributing to the related art in the form of a software product stored in a storage medium, including several instructions for causing a terminal device (which may be a mobile phone, a computer, a server, or a network device, etc.) to perform the method described in the embodiments of the present disclosure.
The disclosure further provides a data processing device, which is used for implementing the foregoing embodiments and preferred embodiments, and is not described in detail. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
Fig. 7 is a block diagram of a data processing apparatus according to one embodiment of the present disclosure, and as shown in fig. 7, a data processing apparatus 700 includes:
a configuration module 701, configured to embed configuration information in the target launch container, where the configuration information is used to create multiple data sets of the target type database and/or create corresponding indexes for the multiple data sets during execution of the loading operation by the target launch container;
the creation module 702 is configured to control the target boot container to execute the loading operation process, and call the configuration information at a target stage of the loading operation process to create a plurality of data sets and/or indexes corresponding to the plurality of data sets.
Optionally, the configuration module 701 is further configured to: configuration information is implanted during the loading operation performed by the target boot container.
Optionally, the configuration module 701 is further configured to: implanting configuration information in the target boot container based on the instance object provided by the target boot container during the loading operation of the target boot container; or implanting configuration information in the target launch container based on a native manner of the target type database during the loading operation of the target launch container, wherein the native manner is used for representing that a native control command of the target type database is adopted to perform a control operation on the target type database.
Optionally, the configuration module 701 is further configured to: initializing a first instance object, wherein the first instance object is provided by a target launch container, and the bottom layer of the first instance object is connected with a target type database; and implanting configuration information through the initialized first instance object to create a plurality of data sets and/or indexes corresponding to the plurality of data sets.
Optionally, the configuration module 701 is further configured to: creating a second instance object through a native control command of the target type database, wherein the second instance object is used for connecting with the target type database; acquiring a third instance object of the target type database through the second instance object; acquiring a target set object of the target type database through a third instance object; configuration information is implanted through the target set object to create a plurality of data sets and indexes corresponding to the plurality of data sets.
Optionally, the creation module 702 is further configured to: the control target starts the container to execute the loading operation process, and the configuration information is called in the last operation step before the loading operation is completed.
Optionally, the plurality of data sets have the same data structure.
It should be noted that each of the above modules may be implemented by software or hardware, and for the latter, it may be implemented by, but not limited to: the modules are all located in the same processor; alternatively, the above modules may be located in different processors in any combination.
According to an embodiment of the present disclosure, there is also provided an electronic device comprising a memory having stored therein computer instructions and at least one processor configured to execute the computer instructions to perform the steps of any of the method embodiments described above.
Optionally, the electronic device may further include a transmission device and an input/output device, where the transmission device is connected to the processor, and the input/output device is connected to the processor.
Optionally, in the present disclosure, the above processor may be configured to perform the following steps by a computer program:
s1, implanting configuration information into a target starting container, wherein the configuration information is used for creating a plurality of data sets of a target type database and/or creating corresponding indexes for the plurality of data sets in the process of loading operation of the target starting container;
s2, controlling the target starting container to execute the loading operation process, and calling configuration information at a target stage of the loading operation process to create a plurality of data sets and/or indexes corresponding to the plurality of data sets.
Alternatively, specific examples in this embodiment may refer to examples described in the foregoing embodiments and optional implementations, and this embodiment is not described herein.
According to an embodiment of the present disclosure, the present disclosure also provides a non-transitory computer readable storage medium having stored therein computer instructions, wherein the computer instructions are configured to perform the steps of any of the method embodiments described above when run.
Alternatively, in the present embodiment, the above-described non-transitory computer-readable storage medium may be configured to store a computer program for performing the steps of:
s1, implanting configuration information into a target starting container, wherein the configuration information is used for creating a plurality of data sets of a target type database and/or creating corresponding indexes for the plurality of data sets in the process of loading operation of the target starting container;
s2, controlling the target starting container to execute the loading operation process, and calling configuration information at a target stage of the loading operation process to create a plurality of data sets and/or indexes corresponding to the plurality of data sets.
Alternatively, in the present embodiment, the non-transitory computer readable storage medium described above may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a readable storage medium would include an electrical connection based on 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.
According to an embodiment of the present disclosure, the present disclosure also provides a computer program product. Program code for carrying out the audio processing methods of the present disclosure may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the foregoing embodiments of the present disclosure, the descriptions of the various embodiments are emphasized, and for a portion of this disclosure that is not described in detail in this embodiment, reference is made to the related descriptions of other embodiments.
In the several embodiments provided in the present disclosure, it should be understood that the disclosed technology content may be implemented in other manners. The above-described embodiments of the apparatus are merely exemplary, and the division of the units, for example, may be a logic function division, and may be implemented in another manner, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some interfaces, units or modules, or may be in electrical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present disclosure may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present disclosure may be essentially or part of the technical solution or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium, including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in the embodiments of the present disclosure. And the aforementioned storage medium includes: a usb disk, a read-only memory (ROM), a random-access memory (RAM), a removable hard disk, a magnetic disk, or an optical disk, etc., which can store program codes.
The foregoing is merely a preferred embodiment of the present disclosure, and it should be noted that modifications and adaptations to those skilled in the art may be made without departing from the principles of the present disclosure, which are intended to be comprehended within the scope of the present disclosure.

Claims (10)

1. A data processing method, comprising:
implanting configuration information in a target launch container, wherein the configuration information is used for creating a plurality of data sets of a target type database and/or creating corresponding indexes for the plurality of data sets in the process of loading operation of the target launch container;
controlling the target starting container to execute the loading operation process, and calling the configuration information in a target stage of the loading operation process to create the multiple data sets and/or indexes corresponding to the multiple data sets;
wherein implanting the configuration information in the target launch container comprises: implanting the configuration information during the execution of the loading operation by the target boot container;
wherein implanting the configuration information during execution of the loading operation by the target boot container comprises: implanting the configuration information in the target boot container based on an instance object provided by the target boot container during execution of the loading operation by the target boot container; or, in the process of executing the loading operation by the target starting container, implanting the configuration information in the target starting container based on a native mode of the target type database, wherein the native mode is used for representing that a native control command of the target type database is adopted to perform a control operation on the target type database;
wherein the plurality of data sets have the same data structure.
2. The method of claim 1, wherein implanting the configuration information in the target launch container based on an instance object provided by the target launch container comprises:
initializing a first instance object, wherein the first instance object is provided by the target launch container, and the bottom layer of the first instance object is connected with the target type database;
and implanting the configuration information through the initialized first instance object to create the multiple data sets and/or indexes corresponding to the multiple data sets.
3. The method of claim 1, wherein implanting the configuration information in the target launch container based on a native manner of the target type database comprises:
creating a second instance object through a native control command of the target type database, wherein the second instance object is used for connecting with the target type database;
acquiring a third instance object of the target type database through the second instance object;
acquiring a target set object of the target type database through the third instance object;
and implanting the configuration information through the target set object to create the plurality of data sets and/or indexes corresponding to the plurality of data sets.
4. The method of claim 1, wherein controlling the target boot container to perform the load operation procedure and invoking the configuration information at the target stage comprises:
and controlling the target starting container to execute the loading operation process, and calling the configuration information in the last operation step before the loading operation is completed.
5. A data processing apparatus comprising:
the configuration module is used for implanting configuration information into the target starting container, wherein the configuration information is used for creating a plurality of data sets of a target type database and/or creating corresponding indexes for the plurality of data sets in the process of loading operation of the target starting container;
the creating module is used for controlling the target starting container to execute the loading operation process and calling the configuration information in a target stage of the loading operation process so as to create the data sets and/or indexes corresponding to the data sets;
wherein the configuration module is further configured to: implanting the configuration information during the execution of the loading operation by the target boot container;
wherein the configuration module is further configured to: implanting the configuration information in the target boot container based on an instance object provided by the target boot container during execution of the loading operation by the target boot container; or, in the process of executing the loading operation by the target starting container, implanting the configuration information in the target starting container based on a native mode of the target type database, wherein the native mode is used for representing that a native control command of the target type database is adopted to perform a control operation on the target type database;
wherein the plurality of data sets have the same data structure.
6. The apparatus of claim 5, wherein the configuration module is further to:
initializing a first instance object, wherein the first instance object is provided by the target launch container, and the bottom layer of the first instance object is connected with the target type database;
and implanting the configuration information through the initialized first instance object to create the multiple data sets and/or indexes corresponding to the multiple data sets.
7. The apparatus of claim 5, wherein the configuration module is further to:
creating a second instance object through a native control command of the target type database, wherein the second instance object is used for connecting with the target type database;
acquiring a third instance object of the target type database through the second instance object;
acquiring a target set object of the target type database through the third instance object;
and implanting the configuration information through the target set object to create the plurality of data sets and/or indexes corresponding to the plurality of data sets.
8. The apparatus of claim 5, wherein the creation module is further to:
and controlling the target starting container to execute the loading operation process, and calling the configuration information in the last operation step before the loading operation is completed.
9. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-4.
10. A non-transitory computer readable storage medium storing computer instructions for causing the computer to perform the method of any one of claims 1-4.
CN202111365228.7A 2021-11-17 2021-11-17 Data processing method, device, electronic equipment and storage medium Active CN114064148B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111365228.7A CN114064148B (en) 2021-11-17 2021-11-17 Data processing method, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111365228.7A CN114064148B (en) 2021-11-17 2021-11-17 Data processing method, device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN114064148A CN114064148A (en) 2022-02-18
CN114064148B true CN114064148B (en) 2023-09-01

Family

ID=80277694

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111365228.7A Active CN114064148B (en) 2021-11-17 2021-11-17 Data processing method, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114064148B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109814881A (en) * 2017-11-21 2019-05-28 北京京东尚科信息技术有限公司 Method and apparatus for disposing data-base cluster
CN110968565A (en) * 2018-09-30 2020-04-07 北京国双科技有限公司 Database creation method and system
CN111651248A (en) * 2020-04-29 2020-09-11 中国平安财产保险股份有限公司 Timed task execution method and device, electronic equipment and storage medium
CN111796838A (en) * 2020-06-30 2020-10-20 中国工商银行股份有限公司 MPP database automatic deployment method and device
CN112783859A (en) * 2021-01-08 2021-05-11 河北志晟信息技术股份有限公司 Lightweight concurrent migration method for database
CN113051266A (en) * 2019-12-27 2021-06-29 浙江大搜车软件技术有限公司 Data processing method, data processing device, computer readable storage medium and computer equipment

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7478112B2 (en) * 2004-12-16 2009-01-13 International Business Machines Corporation Method and apparatus for initializing data propagation execution for large database replication

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109814881A (en) * 2017-11-21 2019-05-28 北京京东尚科信息技术有限公司 Method and apparatus for disposing data-base cluster
CN110968565A (en) * 2018-09-30 2020-04-07 北京国双科技有限公司 Database creation method and system
CN113051266A (en) * 2019-12-27 2021-06-29 浙江大搜车软件技术有限公司 Data processing method, data processing device, computer readable storage medium and computer equipment
CN111651248A (en) * 2020-04-29 2020-09-11 中国平安财产保险股份有限公司 Timed task execution method and device, electronic equipment and storage medium
CN111796838A (en) * 2020-06-30 2020-10-20 中国工商银行股份有限公司 MPP database automatic deployment method and device
CN112783859A (en) * 2021-01-08 2021-05-11 河北志晟信息技术股份有限公司 Lightweight concurrent migration method for database

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李纪伟 ; 段中帅 ; 王顺晔 ; .非结构化数据库MongoDB的数据存储.电脑知识与技术.2018,(27),全文. *

Also Published As

Publication number Publication date
CN114064148A (en) 2022-02-18

Similar Documents

Publication Publication Date Title
US9489189B2 (en) Dynamically generate and execute a context-specific patch installation procedure on a computing system
CN110688096B (en) Method and device for constructing application program containing plug-in, medium and electronic equipment
CN117093286B (en) Plug-in generation method, device, equipment and computer readable storage medium
CN110109983B (en) Method and device for operating Redis database
CN113641700A (en) Data processing method and device based on Spring boot frame
CN111506368A (en) Method, device, equipment and storage medium for transferring asynchronous call to synchronous call
CN111414154A (en) Method and device for front-end development, electronic equipment and storage medium
US20190196794A1 (en) Visual programming method, system and terminal device
JP2021131897A (en) Scheduling method, device, equipment, storage equipment, and program
CN117724803A (en) Cloud service deployment method, device and platform
US10129328B2 (en) Centralized management of webservice resources in an enterprise
CN113760733A (en) Unit testing method and device
CN114064148B (en) Data processing method, device, electronic equipment and storage medium
CN116932147A (en) Streaming job processing method and device, electronic equipment and medium
EP4102361A2 (en) Method and apparatus for managing functions of a query engine
CN113110920B (en) Operation method, device, equipment and storage medium of block chain system
CN113515306B (en) System transplanting method and device
CN115129740A (en) Method and system for updating distributed micro-service database in cloud native environment
CN114489674A (en) Data verification method and device of dynamic data model
CN112181401A (en) Application construction method and application construction platform
CN115563183B (en) Query method, query device and program product
EP4080363A1 (en) Method and apparatus for operating blockchain system, device and storage medium
CN114968200A (en) Software development kit assembly method, related device and computer program product
CN118519728A (en) Transaction control method, system, computer equipment and medium of database
CN117687689A (en) Method, device, equipment and medium for running Java program in Windows environment

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