Object-based data conversion method and apparatus, and program product
By adopting object-based data conversion methods in the database of financial institutions, the problem of low efficiency in storing performance data in traditional relational databases is solved, and more efficient data storage and retrieval is achieved, which improves the business system performance of financial institutions.
Patent Information
- Application Number
- CN202510219719.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-26
- Publication Date
- 2025-06-17
AI Technical Summary
When traditional relational databases store performance data, due to the large amount of data, complex data structures and rich data types, financial institutions are less efficient in processing data.
An object-based data conversion method is adopted to realize data conversion by determining the performance data to be converted in the source data table, identifying independent entities, determining the target relationship between objects, and mapping object properties into two-dimensional data tables.
By managing data in an object-oriented manner, it can better process variable-length data, unstructured data and rich data types, improve the speed of data storage and retrieval, improve data query response time, and enhance the overall performance of financial institutions' business systems.
Smart Images

Figure CN120162374A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of fintech, and more particularly, to an object-based data conversion method, apparatus, and program product. Background Art
[0002] With the orderly development of the Xinchuang transformation project, the data volume of the database and the scale of machines have doubled. To ensure the high-quality level of data in the financial industry, the granularity and retention period of performance data during database operation need to be improved. To ensure the availability of performance data, the management of performance data becomes increasingly important.
[0003] Due to reasons such as large data volume, complex data structure, and rich data types in performance data, the requirements for storing and managing performance data are relatively high. For example, performance data contains variable-length data, unstructured strings, images, sounds, and other information. Storing such information in a relational database has great drawbacks and cannot be described and processed in the database. Traditional relational databases cannot meet the requirements. Moreover, the development of pure object-oriented databases is not yet sound, does not support the SQL language, and cannot be well integrated with the developed performance systems.
[0004] In view of the problem that in the related art, when storing performance data through a traditional relational database, due to large data volume, complex data structure, and rich data types, the processing efficiency of financial institutions is relatively low, no effective solution has been proposed yet. Summary of the Invention
[0005] The main purpose of this application is to provide an object-based data conversion method, apparatus, and program product to solve the problem that in the related art, when storing performance data through a traditional relational database, due to large data volume, complex data structure, and rich data types, the processing efficiency of financial institutions is relatively low.
[0006] To achieve the above objective, according to one aspect of this application, an object-based data conversion method is provided. The method includes: determining performance data to be converted in a source data table, and determining independent entities in the performance data to obtain multiple objects; determining target relationships between the multiple objects, and determining attributes of each object in the multiple objects according to the target relationships between the multiple objects; mapping the attributes of each object in the multiple objects to a two-dimensional data table to obtain a target data table corresponding to each object; and performing data conversion on the performance data in the source data table according to the target data table corresponding to each object to obtain multiple target data tables corresponding to the performance data.
[0007] Further, the multiple objects at least include: a first object and a second object, and the target relationships at least include one of the following: a first relationship, a second relationship, a third relationship, and a fourth relationship; the first relationship indicates that the second object reuses the attributes of the first object, the second relationship indicates that the attributes of the first object include multiple second objects, the third relationship indicates that multiple second objects form the attributes of the first object, and the fourth relationship indicates that there is an association relationship between the first object and the second object other than the first relationship, the second relationship, and the third relationship.
[0008] Further, when the target relationship is the first relationship, mapping the attributes of each object in the multiple objects to a two-dimensional data table to obtain a target data table corresponding to each object, including: constructing a first data table according to the attributes of the first object, and constructing a second data table according to the attributes of the second object; or, constructing a second data table according to the attributes of the second object, and constructing a first data table according to the second data table; or, constructing a first data table according to the attributes of the first object, and constructing a second data table according to the first data table; determining the object identification information of the first object, and adding the object identification information of the first object to the first data table and the second data table respectively, wherein the second data table contains the attributes of the first object and the attribute values of the attributes of the first object; determining the target data table corresponding to each object in the multiple objects according to the first data table corresponding to the first object and the second data table corresponding to the second object.
[0009] Further, when the target relationship is the second relationship, mapping the attributes of each object in the multiple objects to a two-dimensional data table to obtain a target data table corresponding to each object, including: constructing a first data table according to the attributes of the first object, and when the second object belongs to an independent entity, constructing a second data table according to the attributes of the second object, and adding the object identification information of the first object to the second data table; determining the corresponding relationship between the first object and the second object, and respectively updating the first data table and the second data table according to the corresponding relationship; determining the target data table corresponding to each object in the multiple objects according to the first data table corresponding to the first object and the second data table corresponding to the second object; or, constructing a first data table according to the attributes of the first object and the attributes of the second object; determining the target data table corresponding to each object in the multiple objects according to the first data table corresponding to the first object.
[0010] Further, when the target relationship is the third relationship, mapping the attributes of each object in the multiple objects to a two-dimensional data table to obtain a target data table corresponding to each object includes: constructing a first data table according to the attributes of the first object, and constructing a second data table according to the attributes of the second object, where the first data table at least includes the object identification information of the first object; determining the corresponding relationship between the first object and the second object, and updating the first data table according to the corresponding relationship; determining the target data table corresponding to each object in the multiple objects according to the first data table including the first object and the second object.
[0011] Further, when the target relationship is the fourth relationship, mapping the attributes of each object in the multiple objects to a two-dimensional data table to obtain a target data table corresponding to each object includes: constructing a first data table according to the attributes of the first object, where the first data table at least includes the object identification information of the first object; constructing a second data table according to the attributes of the second object, and when the second object belongs to an independent entity, adding the object identification information of the first object to the second data table, where the second data table at least includes the object identification information of the second object; determining the corresponding relationship between the first object and the second object, and updating the first data table and the second data table respectively according to the corresponding relationship; determining the target data table corresponding to each object in the multiple objects according to the first data table corresponding to the first object and the second data table corresponding to the second object.
[0012] Further, updating the first data table and the second data table respectively according to the corresponding relationship, and determining the target data table corresponding to each object in the multiple objects according to the first data table corresponding to the first object and the second data table corresponding to the second object includes: when the corresponding relationship belongs to the fifth relationship, adding the object identification information of the first object to the second data table, where the fifth relationship indicates that the first object has a corresponding relationship with at least one of the second objects; when the corresponding relationship belongs to the sixth relationship, creating a third data table according to the first data table, the object identification information of the first object, the second data table, and the object identification information of the second object, where the sixth relationship indicates that multiple first objects and multiple second objects have a corresponding relationship; determining the target data table corresponding to each object in the multiple objects according to the first data table corresponding to the first object, the second data table corresponding to the second object, and the third data table.
[0013] Further, after performing data conversion on the performance data in the source data table according to the target data tables corresponding to each object to obtain multiple target data tables corresponding to the performance data, the method further includes: receiving a query request for the performance data; determining a query condition according to the query request; querying in the multiple target data tables according to the query condition to obtain a query result; and responding to the query request according to the query result.
[0014] To achieve the above object, according to another aspect of the present application, there is provided a data conversion device based on objects, the device includes: a first determination unit, configured to determine performance data to be converted in a source data table and determine independent entities in the performance data to obtain multiple objects; a second determination unit, configured to determine a target relationship between the multiple objects and determine attributes of each object in the multiple objects according to the target relationship between the multiple objects; a mapping unit, configured to map the attributes of each object in the multiple objects into a two-dimensional data table to obtain a target data table corresponding to each object; a conversion unit, configured to perform data conversion on the performance data in the source data table according to the target data tables corresponding to each object to obtain multiple target data tables corresponding to the performance data.
[0015] Further, the multiple objects at least include: a first object and a second object, and the target relationship at least includes one of the following: a first relationship, a second relationship, a third relationship, and a fourth relationship; the first relationship indicates that the second object reuses the attributes of the first object, the second relationship indicates that the attributes of the first object include multiple second objects, the third relationship indicates that multiple second objects form the attributes of the first object, and the fourth relationship indicates that there is an association relationship between the first object and the second object other than the first relationship, the second relationship, and the third relationship.
[0016] Further, when the target relationship is the first relationship, the mapping unit includes: a first construction subunit, configured to construct a first data table according to the attributes of the first object and construct a second data table according to the attributes of the second object; or construct a second data table according to the attributes of the second object and construct a first data table according to the second data table; or construct a first data table according to the attributes of the first object and construct a second data table according to the first data table; a first determination subunit, configured to determine the object identification information of the first object and add the object identification information of the first object to the first data table and the second data table respectively, where the second data table includes the attributes of the first object and the attribute values of the attributes of the first object; a second determination subunit, configured to determine the target data table corresponding to each object in the multiple objects according to the first data table corresponding to the first object and the second data table corresponding to the second object.
[0017] Further, the target relationship is the second relationship, and the mapping unit includes: a second construction subunit, configured to construct a first data table according to the attributes of the first object, and in the case where the second object belongs to an independent entity, construct a second data table according to the attributes of the second object, and add the object identification information of the first object to the second data table; a second determination subunit, configured to determine the correspondence between the first object and the second object, and update the first data table and the second data table respectively according to the correspondence; a third determination subunit, configured to determine the target data table corresponding to each object among the multiple objects according to the first data table corresponding to the first object and the second data table corresponding to the second object; or, a third construction subunit, configured to construct a first data table according to the attributes of the first object and the attributes of the second object; a fourth determination subunit, configured to determine the target data table corresponding to each object among the multiple objects according to the first data table corresponding to the first object.
[0018] Further, the target relationship is the third relationship, and the mapping unit includes: a fourth construction subunit, configured to construct a first data table according to the attributes of the first object and construct a second data table according to the attributes of the second object, wherein the first data table at least includes the object identification information of the first object; a first update subunit, configured to determine the correspondence between the first object and the second object, and update the first data table according to the correspondence; a fifth determination subunit, configured to determine the target data table corresponding to each object among the multiple objects according to the first data table including the first object and the second object.
[0019] Further, the target relationship is the fourth relationship, and the mapping unit includes: a fifth construction subunit, configured to construct a first data table according to the attributes of the first object, wherein the first data table at least includes the object identification information of the first object; a sixth construction subunit, configured to construct a second data table according to the attributes of the second object, and in the case where the second object belongs to an independent entity, add the object identification information of the first object to the second data table, wherein the second data table at least includes the object identification information of the second object; a second update subunit, configured to determine the correspondence between the first object and the second object, and update the first data table and the second data table respectively according to the correspondence; a sixth determination subunit, configured to determine the target data table corresponding to each object among the multiple objects according to the first data table corresponding to the first object and the second data table corresponding to the second object.
[0020] Further, the second update subunit includes: an adding module, configured to add the object identification information of the first object to the second data table when the corresponding relationship belongs to the fifth relationship, where the fifth relationship indicates that there is a corresponding relationship between the first object and at least one second object; a creating module, configured to create a third data table according to the first data table, the object identification information of the first object, the second data table, and the object identification information of the second object when the corresponding relationship belongs to the sixth relationship, where the sixth relationship indicates that there is a corresponding relationship between multiple first objects and multiple second objects; the sixth determination subunit includes: a determining module, configured to determine the target data table corresponding to each object in the multiple objects according to the first data table corresponding to the first object, the second data table corresponding to the second object, and the third data table.
[0021] Further, the apparatus further includes: a receiving unit, configured to receive a query request for the performance data after data conversion of the performance data in the source data table according to the target data table corresponding to each object to obtain multiple target data tables corresponding to the performance data; a third determination unit, configured to determine a query condition according to the query request; a query unit, configured to perform a query according to the query condition in the multiple target data tables to obtain a query result; a response unit, configured to respond to the query request according to the query result.
[0022] To achieve the above object, according to one aspect of the present application, there is provided a computer program product, including a computer program, where when the computer program is executed by a processor, it implements the above-mentioned object-based data conversion method, and when the computer program is executed by a processor, it implements the steps of the object-based data conversion method in various embodiments of the present application.
[0023] To achieve the above object, according to one aspect of the present application, there is provided a computer-readable storage medium, where the computer-readable storage medium includes stored computer instructions, and when the computer instructions are executed by a processor, the above-mentioned object-based data conversion method is implemented.
[0024] To achieve the above object, according to one aspect of the present application, there is provided an electronic device, including one or more processors and a memory, where the memory is used to store one or more programs, and when the one or more programs are executed by the one or more processors, the one or more processors implement the above-mentioned object-based data conversion method.
[0025] In the embodiments of the present application, by determining the performance data to be converted in the source data table and determining the independent entities in the performance data, a plurality of objects are obtained; the target relationships between the plurality of objects are determined, and the attributes of each object in the plurality of objects are determined according to the target relationships between the plurality of objects; the attributes of each object in the plurality of objects are mapped to a two-dimensional data table to obtain a target data table corresponding to each object; and the performance data in the source data table is data-converted according to the target data table corresponding to each object, so as to obtain a plurality of target data tables corresponding to the performance data, thereby solving the technical problem that when storing performance data through a traditional relational database, due to the large amount of data, complex data structure and rich data types, the processing efficiency of financial institutions for data is relatively low.
[0026] By identifying the independent entities in the performance data as a plurality of objects and determining the target relationships (such as inheritance, aggregation, composition, association) between them, it is allowed to manage data in an object-oriented manner. Using the object-oriented database method can better process variable-length data, unstructured data and rich data types, thereby effectively improving the speed of data storage and retrieval, making the storage and query of performance data more flexible. At the same time, by mapping object attributes to a two-dimensional data table, the inter-table connection during query can be reduced, and when querying performance data, the relevant objects can be located more quickly, significantly improving the query response time during large-scale data processing, achieving the effect of improving the overall performance of the business system of financial institutions. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] The drawings constituting a part of the present application are used to provide a further understanding of the present application. The schematic embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation to the present application. In the drawings:
[0028] Figure 1 is a hardware structure block diagram of a computer terminal (or mobile device) for implementing an object-based data conversion method according to Embodiment 1 of the present application;
[0029] Figure 2 is a flowchart of an optional object-based data conversion method according to Embodiment 1 of the present application;
[0030] Figure 3 is a schematic diagram of the data structure of an optional "performance data type" object according to Embodiment 1 of the present application;
[0031] Figure 4 is a schematic diagram of a nested structure of an optional "performance data type" according to Embodiment 1 of the present application;
[0032] Figure 5It is a schematic diagram of an object-based data conversion device provided in Embodiment 2 of the present application;
[0033] Figure 6 It is a schematic diagram of an object-based data conversion electronic device provided in Embodiment 5 of the present application. Detailed implementation manners
[0034] It should be noted that, without conflict, the embodiments in the present application and the features in the embodiments may be combined with each other. The present application will be described in detail below with reference to the drawings and in combination with the embodiments.
[0035] It should be noted that the processing methods, devices, storage media, and the methods and devices for determining electronic devices in the present application documents can be used in the fintech field. After converting the storage structure of performance data, the efficiency of financial institutions in processing data is improved. It can also be used in any field other than the fintech field. The application fields of the processing methods, devices, storage media, and the methods and devices of the electronic devices in the present application documents are not limited.
[0036] It should be noted that the information collected in the present application (including but not limited to user device information, user personal information, collected data, used data, generated data, processed data, etc.) and data (including but not limited to data for analysis, stored data, displayed data, collected information, used information, generated information, processed information, etc.) are all information and data authorized by users or fully authorized by all parties. And the collection, storage, use, processing, transmission, provision, disclosure, and application of relevant data and other processing all comply with the relevant laws, regulations, and standards of relevant countries and regions, take necessary confidentiality measures, do not violate public order and good customs, and provide corresponding operation entrances for users to choose to authorize or refuse. For example, an interface is set between the present system and relevant users or institutions to provide corresponding operation entrances for users to choose to agree or refuse the automated decision-making results; if the user chooses to refuse, the expert decision-making process will be entered.
[0037] Embodiment 1
[0038] According to an embodiment of the present application, there is also provided a method embodiment for object-based data conversion. It should be noted that the steps shown in the flowchart of the drawings can be executed in a computer system such as a set of computer-executable instructions. And although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.
[0039] The method embodiment provided in Embodiment 1 of the present application can be executed on a mobile terminal, a computer terminal, or a similar computing device. Figure 1The figure shows a hardware block diagram of a computer terminal (or mobile device) for implementing an object-based data conversion method. As Figure 1 shown, the computer terminal 10 (or mobile device) may include one or more processors 102 (illustrated as 102a, 102 for object-based data conversion,..., 102n in the figure) (the processor 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it may further include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the USB bus for data conversion), a network interface, a power supply, and / or a camera. Those of ordinary skill in the art can understand that Figure 1 the structure shown is only illustrative and does not limit the structure of the above-mentioned electronic device. For example, the computer terminal 10 may further include more or fewer components than those Figure 1 shown in the figure, or have a different configuration from that Figure 1 shown.
[0040] It should be noted that the above one or more processors 102 and / or other data processing circuits are generally referred to as "data processing circuits" herein. The data processing circuit may be embodied in whole or in part as software, hardware, firmware, or any combination thereof. In addition, the data processing circuit may be a single independent processing module, or be incorporated in whole or in part into any one of the other elements in the computer terminal 10 (or mobile device). As involved in the embodiments of the present application, the data processing circuit is used for processor control (such as the selection of a variable resistor terminal path connected to an interface).
[0041] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the object-based data conversion method in the embodiments of the present application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, implements the above-mentioned object-based data conversion method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some instances, the memory 104 may further include a memory remotely set relative to the processor 102, and these remote memories can be connected to the computer terminal 10 through a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof.
[0042] The transmission device 106 is used to receive or send data via a network. Specific examples of the above network may include a wireless network provided by the communication provider of the computer terminal 10. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a Radio Frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0043] The display can be, for example, a touch-screen liquid crystal display (LCD), which enables the user to interact with the user interface of the computer terminal 10 (or mobile device).
[0044] Under the above operating environment, the present application provides a Figure 2 data conversion method based on objects as shown. Figure 2 It is a flowchart of the data conversion method based on objects according to Embodiment 1 of the present application.
[0045] Step S201, determine the performance data to be converted in the source data table, and determine the independent entities in the performance data to obtain multiple objects.
[0046] In the first embodiment, it is necessary to identify the performance-related index data to be converted in the existing source data table, that is, the above performance data. The performance data may include, but is not limited to: specific index data such as operating system performance, database performance, storage performance, CPU usage rate, memory usage, disk I / O speed, network latency, etc. Then, identify the parts that can be regarded as independent entities from the performance data to obtain multiple objects. For example, the "operating system performance data" can be further divided into two independent entities, namely "CPU performance data" and "memory performance data", and each entity has its own attributes, such as the type and number of cores of the CPU and the type and capacity of the memory.
[0047] Through this series of steps, the performance data originally stored in the relational database can be converted into a structure in the object-oriented database, making it easier to manage and analyze, while reducing data redundancy and improving data reusability.
[0048] Step S202, determine the target relationships between the multiple objects, and determine the attributes of each object among the multiple objects according to the target relationships between the multiple objects.
[0049] In the first embodiment, it is necessary to clarify the target relationships between various objects. For example, inheritance, aggregation, association, or composition, etc. For example, there is an is-part-of (i.e., composition) relationship between "operating system performance data" and "CPU performance data", "memory performance data", which means that CPU and memory data are part of the operating system performance data; while there is an is-associate-of (i.e., association) relationship between "performance data" and "performance data type", indicating that "performance data" references an independent "performance data type" object.
[0050] Then, according to the target relationships between multiple objects, construct the attribute information included in each object, and reflect the relationships between objects through the attributes. For example, Figure 3 is a schematic diagram of the data structure of the "performance data type" object. The "operating system performance data" object may include attributes such as "CPU performance data" and "memory performance data". If there is a composition relationship between "operating system performance data" and "CPU performance data", then in the "operating system performance data" object, "CPU performance data" will be directly included without additional reference; if there is an association relationship between "operating system performance data" and "memory performance data", then the object identifier information of the "operating system performance data" object will be included in the "memory performance data" object. In addition, the "CPU performance data" object will also include other attribute information related to "CPU performance data".
[0051] Through this process, the attributes of the objects not only accurately describe the data structure, but also clearly represent the connections between the data, thereby improving the consistency, integrity, and query efficiency of the data, and reducing redundancy and unnecessary association operations in complex data structures.
[0052] Step S203: Map the attributes of each object in multiple objects into a two-dimensional data table to obtain a target data table corresponding to each object.
[0053] In the first embodiment, each defined object is mapped to a two-dimensional database table, that is, the target data table corresponding to each object described above. Exemplarily, the name of the target data table usually corresponds to the class name of the object, and each column (field) in the table corresponds to the attribute of the object. The name of the attribute becomes the name of the column, and the data type of the attribute corresponds to the data type of the table column. For example, the "performance data type" object is mapped to a table named "performance data type"; the "operating system performance" object is mapped to a table named "operating system performance", and the "operating system version" attribute in the "operating system performance" object is mapped to the "OS_VERSION" column in the table; the "performance data type ID" attribute in the "performance data type" object is mapped to the "PERFORMLX_ID" column in the table.
[0054] By converting the attributes of each object into a specific two-dimensional data table, the target data table can not only reflect the relationships between objects but also conform to the storage mode of traditional relational databases, thus constructing an object model that can maintain the encapsulation and association of object-oriented features.
[0055] Step S204: Perform data conversion on the performance data in the source data table according to the target data tables corresponding to each object to obtain multiple target data tables corresponding to the performance data.
[0056] In the first embodiment, the fields in the source data table need to be converted into a format that matches the target data table. For example, the field value of "CPU usage rate" in the source data table needs to be converted into the attribute value corresponding to the "CPU usage rate" attribute in the target data table corresponding to "CPU performance data" and stored in the target data table corresponding to the "CPU performance data" object.
[0057] It should be noted that during the data conversion process, special attention is paid to the target relationships between objects. For example, if there is a target relationship between the "operating system performance data" object and the "CPU performance data" object, then during data conversion, the "operating system performance data" object and the "CPU performance data" object can be constructed independently, stored in their respective tables of "CPU performance data" and "operating system performance data" respectively, and the foreign key of the target data table of "CPU performance data" and / or the foreign key of the target data table of "operating system performance data" are associated to reflect the target relationship between the "operating system performance data" object and the "CPU performance data" object through the associated foreign key information.
[0058] Through this series of steps, the original performance data can be converted from the traditional data table structure into multiple target data tables that conform to the object-relational database model. This can not only effectively utilize the characteristics of the object-relational database to improve the efficiency of data processing, storage, and retrieval but also help to achieve more advanced data management and analysis functions.
[0059] Optionally, in the object-based data conversion method provided in the first embodiment of this application, the multiple objects at least include: a first object and a second object, and the target relationships at least include one of the following: a first relationship, a second relationship, a third relationship, and a fourth relationship; the first relationship represents that the second object reuses the attributes of the first object, the second relationship represents that the attributes of the first object contain multiple second objects, the third relationship represents that multiple second objects form the attributes of the first object, and the fourth relationship represents that there is an association relationship between the first object and the second object other than the first relationship, the second relationship, and the third relationship.
[0060] In the first embodiment, the first relationship is an inheritance relationship, which means that the second object (subclass) extends or reuses the attributes and behaviors of the first object (superclass), and at the same time can define new attributes of the second object. For example, the "operating system performance data" class inherits from the "performance data type" class, indicating that the "operating system performance data" object shares and extends the attributes of the "performance data type" object.
[0061] The second relationship is an aggregation relationship, which means that the attributes of the first object contain multiple second objects. Aggregation means that one object (the first object) contains multiple other objects (the second objects) as its attributes, but these second objects can exist independently, and the life cycle of the second objects does not completely depend on the first object. For example, "server information" (the first object) may contain multiple "application information" (the second objects), and there will be a foreign key in the "server information" table pointing to the "application information" table (or there will be a foreign key in the "application information" table pointing to the "server information" table), indicating multiple applications deployed on the server.
[0062] The third relationship is a composition relationship, which means that multiple second objects (partial objects) constitute the attributes of the first object (the whole object). Among them, the second objects cannot exist independently, and their life cycles and states completely depend on the first object. In the composition relationship, the data of the second objects can be directly stored in the data table of the first object, or associated through a foreign key in the target data table corresponding to the first object. When the first object is deleted, the second objects will also be deleted.
[0063] The fourth relationship is an association relationship, that is, there is a simple association between the first object and the second object. This association describes the connection between two objects, but they maintain independent life cycles and states and do not depend on each other.
[0064] Through the definition and design of the above relationships, the object-relational database can flexibly represent and manage the relationships between various complex data structures and entities, improve the efficiency of data storage and retrieval, ensure the accuracy of the object-oriented database model and the coherence of data, and at the same time provide more flexible and efficient support for data query and analysis, achieving the effect of improving the efficiency of data query and data processing.
[0065] Optionally, in the object-based data conversion method provided in Embodiment 1 of this application, when the target relationship is the first relationship, mapping the attributes of each object among multiple objects to a two-dimensional data table to obtain a target data table corresponding to each object includes: constructing a first data table according to the attributes of the first object and constructing a second data table according to the attributes of the second object; or, constructing a second data table according to the attributes of the second object and constructing a first data table according to the second data table; or, constructing a first data table according to the attributes of the first object and constructing a second data table according to the first data table; determining the object identification information of the first object and adding the object identification information of the first object to the first data table and the second data table respectively, where the second data table contains the attributes of the first object and the attribute values of the attributes of the first object; determining the target data table corresponding to each object among multiple objects according to the first data table corresponding to the first object and the second data table corresponding to the second object.
[0066] In Embodiment 1, when the target relationship belongs to the inheritance relationship, when constructing the first data table and the second data table, a first data table can be constructed according to the attributes of the first object (parent class), and a second data table can be constructed according to the attributes of the second object (subclass), and then the object identification information of the first object is added to the first data table and the second data table respectively, so that the second object (subclass) can reference the attributes of the first object (parent class). Or, a second data table is constructed according to the attributes of the second object (subclass), and the first object (parent class) directly references the second object, that is, the parent class table is not defined, and the data table of the subclass has the attributes of the parent class. Or, a second data table is constructed according to the attributes of the second object (subclass), and the first object (parent class) directly references the second object, that is, the data table of the parent class is not defined, and the subclass table has the attributes of the parent class. Or, a first data table is constructed according to the first object (parent class), and the attributes of the second object (subclass) directly inherit the first object, that is, the data table of the subclass is not defined and the data table of the parent class has all the attributes of the subclass.
[0067] It should be noted that the attributes of the second object include the attributes inherited from the first object and the attributes that the second object itself has, and are defined as the columns of the second data table. For example, if "operating system performance" (second object) inherits the attributes of "performance data type" (first object), then when constructing the "operating system performance" table (second data table), it will include attributes such as "performance data type ID" and "performance data type name" inherited from "performance data type" (first object), and also include attributes such as "operating system memory usage rate" that the second object itself has.
[0068] Then, clarify the corresponding relationship between the first object and the second object. Update the first data table and the second data table according to the corresponding relationship between the first object and the second object. The corresponding relationship can include many-to-many, one-to-many or one-to-one.
[0069] Through the above construction process, objects with inheritance relationships can be stored and managed. At the physical level, these objects are represented as multiple interconnected two-dimensional data tables, retaining the object-oriented encapsulation and inheritance, and ensuring the effective storage and query efficiency of data in the relational database. For example, by storing the OID of "operating system performance" in the "performance data type" table, all performance data related to a specific operating system performance type can be quickly queried without performing complex inter-table join operations, thus improving the speed of data access and analysis.
[0070] Optionally, in the object-based data conversion method provided in the first embodiment of the present application, when the target relationship is the second relationship, mapping the attributes of each object in multiple objects to a two-dimensional data table to obtain a target data table corresponding to each object includes: constructing a first data table according to the attributes of the first object, and when the second object belongs to an independent entity, constructing a second data table according to the attributes of the second object, and adding the object identification information of the first object to the second data table; determining the corresponding relationship between the first object and the second object, and respectively updating the first data table and the second data table according to the corresponding relationship; determining the target data table corresponding to each object in multiple objects according to the first data table corresponding to the first object and the second data table corresponding to the second object; or, constructing a first data table according to the attributes of the first object and the attributes of the second object; determining the target data table corresponding to each object in multiple objects according to the first data table corresponding to the first object.
[0071] In the first embodiment, when the target relationship is the second relationship, that is, the aggregation relationship, it means that a whole object (the first object) can have multiple partial objects (the second object), and these partial objects can be independent entities.
[0072] Exemplarily, there are two ways to construct the first data table corresponding to the first object and the second data table corresponding to the second object with an aggregation relationship.
[0073] In an alternative embodiment, the first data table of the first object and the second data table of the second object can be established separately, and the corresponding relationship between the first object and the second object is represented by adding a foreign key code to the second data table. For example, constructing a first data table according to the attributes of "server information" (the first object), constructing a second data table according to the attributes of "application information" (the second object), adding the identification information of the first data table to the second data table, or adding the identification information of the second data table to the first data table.
[0074] In an alternative embodiment, the attributes of the second object can be merged into the first object, and a data table is used to represent the structure of the first object, that is, the first data table is constructed based on the attributes of the first object and the attributes of the second object as described above; the target data table corresponding to each object among the multiple objects is determined based on the first data table corresponding to the first object. For example, if the attributes of "server information" (the first object) include multiple "application information" (the second object), and the second object "application information" belongs to an independent entity, the attributes of the multiple "application information" are integrated into the first data table.
[0075] Then, clarify the correspondence between the first object and the second object. Update the first data table and the second data table according to the correspondence between the first object and the second object. The correspondence can include many-to-many, one-to-many, or one-to-one.
[0076] Through the above steps, the object-oriented database can effectively manage and represent objects with an aggregation relationship, ensure that the connection between the whole and the parts is reflected in the database design, and at the same time maintain data coherence and query efficiency, enabling the database to better support data storage, retrieval, and analysis, and improving database performance.
[0077] Optionally, in the object-based data conversion method provided in the first embodiment of this application, the target relationship is the third relationship, and the attributes of each object among the multiple objects are mapped to a two-dimensional data table to obtain the target data table corresponding to each object, including: constructing a first data table based on the attributes of the first object, and constructing a second data table based on the attributes of the second object, where the first data table at least includes the object identification information of the first object; determining the correspondence between the first object and the second object, and updating the first data table according to the correspondence; determining the target data table corresponding to each object among the multiple objects based on the first data table including the first object and the second object.
[0078] In the first embodiment, when the target relationship is the third relationship, that is, the composition relationship, it represents the attributes in which multiple second objects (partial objects) jointly constitute the first object (the whole object), where the second objects cannot exist independently, and their life cycles and states completely depend on the first object.
[0079] In an alternative embodiment, a first data table can be constructed based on the attributes of the first object. For example, for "operating system performance data" (the first object), a table is constructed to store all information related to the operating system performance, such as the operating system version, type, etc. A second data table is constructed based on the attributes of the second object. For example, a "CPU performance data" table is created to store CPU-related performance data, including the CPU type, number of cores, etc.
[0080] Then, according to the composition relationship between the second object and the first object, add a column in the second data table to store the object identification information (OID) of the first object, so as to ensure the connection and attribution relationship between the second object (part) and the first object (whole). For example, add an "OS_PERFORM_OID" column in the "CPU performance data" table to store the OID of the "operating system performance data" object.
[0081] Secondly, clarify the correspondence between the first object and the second object. Update the first data table and the second data table according to the correspondence between the first object and the second object. The correspondence can include many-to-many, one-to-many or one-to-one.
[0082] Through the processing of the composition relationship, the object relational database can effectively manage and store those objects with complex composition structures, ensure the close relationship between the whole and the part and the data consistency, and improve the efficiency of data storage and retrieval.
[0083] Optionally, in the object-based data conversion method provided in the first embodiment of this application, when the target relationship is the fourth relationship, mapping the attributes of each object in multiple objects into a two-dimensional data table to obtain the target data table corresponding to each object, including: constructing a first data table according to the attributes of the first object, where the first data table at least includes the object identification information of the first object; constructing a second data table according to the attributes of the second object, and when the second object belongs to an independent entity, adding the object identification information of the first object to the second data table, where the second data table at least includes the object identification information of the second object; determining the correspondence between the first object and the second object, and updating the first data table and the second data table respectively according to the correspondence; determining the target data table corresponding to each object in multiple objects according to the first data table corresponding to the first object and the second data table corresponding to the second object.
[0084] In the first embodiment, when the target relationship is the fourth relationship, that is, the association relationship, it represents a simple connection or reference relationship between the first object and the second object, but does not involve relationships such as part-whole, inheritance or composition.
[0085] In an alternative embodiment, a first data table can be constructed according to the attributes of the first object. This table should at least contain the object identification information (OID) of the first object to uniquely identify each object instance. Construct a second data table according to the attributes of the second object, and if the second object belongs to an independent entity, add the OID of the first object to the table as a foreign key. This ensures that each record in the second data table can be clearly associated with a certain record in the first data table. If the second object does not belong to an independent entity, directly add the attribute information of the first object to the first data table.
[0086] Then, clarify the correspondence relationship between the first object and the second object. The correspondence relationship can include many-to-many, one-to-many, or one-to-one. For example, one "server information" object may be associated with multiple "application performance data" objects, which means that a server can run multiple applications, and each application can have multiple performance data records. Update the first data table and the second data table according to the correspondence relationship between the first object and the second object.
[0087] Through the above steps, the target data tables of multiple objects constructed can represent the target relationship and correspondence relationship between the objects, thereby ensuring the coherence of the data and the query efficiency, achieving the effect of improving data query and data processing.
[0088] Optionally, in the object-based data conversion method provided in the first embodiment of this application, update the first data table and the second data table respectively according to the correspondence relationship, and determine the target data table corresponding to each object among the multiple objects according to the first data table corresponding to the first object and the second data table corresponding to the second object, including: in the case where the correspondence relationship belongs to the fifth relationship, add the object identification information of the first object to the second data table, where the fifth relationship represents that there is a correspondence relationship between the first object and at least one second object; in the case where the correspondence relationship belongs to the sixth relationship, create a third data table according to the first data table, the object identification information of the first object, the second data table, and the object identification information of the second object, where the sixth relationship represents that there is a correspondence relationship between multiple first objects and multiple second objects; determine the target data table corresponding to each object among the multiple objects according to the first data table corresponding to the first object, the second data table corresponding to the second object, and the third data table.
[0089] In the first embodiment, in addition to the aggregation, association, composition, and aggregation relationships between objects, there are also one-to-one, one-to-many, and many-to-many correspondence relationships.
[0090] The one-to-one correspondence relationship means that one first object is only associated with one second object, and vice versa. When designing the first data table and the second data table, this one-to-one association relationship can be represented by adding the OID of another object as a foreign key in the data table of any object. For example, if there is a one-to-one relationship between "user information" (the first object) and "user detailed address" (the second object), then a foreign key "USER_OID" can be added to the "user detailed address" table, or a foreign key "ADDRESS_OID" can be added to the "user information" table to store the OID of the associated object, thereby realizing the link between objects.
[0091] A one-to-many correspondence means that a first object can be associated with multiple second objects, but each second object is only associated with that first object. In database design, usually an OID of the first object is added as a foreign key in the data table of the second object. For example, if there is a one-to-many relationship between "server information" (the first object) and "application performance data" (the second object), then the "application performance data" table will contain a foreign key "SERVER_OID" to store the OID of the associated server object.
[0092] A many-to-many correspondence means that any instance of a first object can be associated with multiple instances of a second object, and at the same time, any instance of the second object can also be associated with multiple instances of the first object. When dealing with a many-to-many relationship, an additional third data table needs to be created to store the association relationship between the two objects. This third data table usually contains two foreign keys, corresponding to the OIDs of the first object and the second object respectively, to represent the association between these two objects. For example, if there is a many-to-many relationship between "users" (the first object) and "roles" (the second object), then a "user role association" table (the third data table) will be created, containing two foreign keys "USER_OID" and "ROLE_OID" to store the association information between users and roles.
[0093] After establishing the above correspondences, for each object, its target data table can be determined through its corresponding data table (the first data table or the second data table) and possibly the third data table. For example, for the "user information" object, its target data table is the "user information" table; for the "application performance data" object, its target data table is the "application performance data" table; while the target data table of the "user role association" object is the independently created "user role association" table. This design ensures that the association relationships between objects are accurately represented at the database level, and at the same time, it is convenient for complex queries and data analysis, improving the efficiency and flexibility of data management.
[0094] By involving the processing rules of the above fifth and sixth relationships, object-oriented database design can effectively manage and represent objects and data with various association relationships, ensuring the integrity of the data model and the optimization of query performance, thus being able to better support the storage, retrieval, and analysis requirements of data, achieving the effect of improving the efficiency of data processing and data query.
[0095] Optionally, in the object-based data conversion method provided in the first embodiment of the present application, after performing data conversion on the performance data in the source data table according to the target data tables corresponding to each object to obtain multiple target data tables corresponding to the performance data, the above method further includes: receiving a query request for the performance data; determining a query condition according to the query request; querying according to the query condition in the multiple target data tables to obtain a query result; and responding to the query request according to the query result.
[0096] In the first embodiment, after obtaining multiple target data tables corresponding to the performance data, query requests from users can be received. These requests usually contain specific query conditions for the performance data. For example, querying the CPU performance data of all servers within a certain time period, or querying the performance metrics of a specific application, etc.
[0097] Then, analyze the received query request and extract the specific conditions for filtering data from it. The query conditions can be set based on time, object attributes (such as server IP, application name), performance metric values, etc. to meet the user's query requirements. Query according to the query condition in the multiple target data tables to obtain a query result. For example, if the query request is to obtain all performance data associated with a specific server, the OID of the server can be found in the "server information" table, and then filtered in the "performance data" table through the foreign key "SERVER OID". It may also involve the "performance data type" table to further filter the data type.
[0098] Finally, after the query process is completed, all performance data records that meet the query conditions can be collected, organized into a query result, and the requested data can be returned to the user. The query result may include detailed information of the performance data, such as timestamp, performance value, OID of the related object, etc.
[0099] By processing the query request through the above steps, the query speed and data accuracy can be significantly improved. At the same time, the scalability and flexibility of the system are also enhanced, meeting the high requirements for performance data management in the financial industry and other industries, and achieving the effect of improving the overall performance of the business systems of financial institutions.
[0100] Figure 4 It is a schematic diagram of a nested structure of "performance data type". Among them, the performance data type, as the top-level abstract concept, includes subclasses such as operating system performance data, database performance data, and storage performance data. These subclasses are further refined into more specific performance parameters. For example, under the operating system performance data, CPU performance data and memory performance data are divided. This nested structure optimizes the construction and understanding of the data model through class inheritance rather than chart display, making data management more intuitive and efficient.
[0101] Figure 4 Details the inheritance relationship of the operating system performance data class, which includes attributes such as operating system performance ID, operating system version, CPU, memory, etc. The establishment of this relationship diagram enables complex data structures to be managed in an object-oriented manner, improving the efficiency and accuracy of data processing. When the processor executes the data management program, it will identify Figure 4 the classes and their attributes in it and implement the following steps: The processor first creates the operating system performance data class and defines its basic attributes such as the operating system performance ID to ensure that each performance data object has a unique identifier; through the inheritance mechanism, the processor creates the operating system version class so that the attributes and operations of the operating system version can be used by the operating system performance data class, avoiding duplicate code writing; creates the CPU and memory classes, which contain specific attributes such as CPU type, memory type, number of CPU cores, and memory capacity to describe the hardware configuration of the server in detail; converts the Figure 4 class relationship in it into a database table structure, and uses the is-associate-of method to define the attributes and relationships between complex objects to ensure that the object model can be effectively converted into a two-dimensional table and the relationship between tables in physical storage; when storing and querying data, according to the Figure 4 inheritance relationship and association definition in it, execute specific SQL statement variants to improve the compatibility and efficiency of database operations.
[0102] It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.
[0103] In summary, the object-based data conversion method provided by the embodiments of the present application determines the performance data to be converted in the source data table and determines the independent entities in the performance data to obtain multiple objects; determines the target relationships between the multiple objects and determines the attributes of each object in the multiple objects according to the target relationships between the multiple objects; maps the attributes of each object in the multiple objects to a two-dimensional data table to obtain the target data table corresponding to each object; performs data conversion on the performance data in the source data table according to the target data table corresponding to each object to obtain multiple target data tables corresponding to the performance data, solving the problem that when storing performance data through a traditional relational database in the related art, due to the large amount of data, complex data structure, and rich data types, the processing efficiency of financial institutions for data is relatively low.
[0104] By identifying independent entities in performance data as multiple objects and determining the target relationships (such as inheritance, aggregation, composition, association) between them, it allows for the management of data in an object-oriented manner. Using the object-oriented database method can better handle variable-length data, unstructured data, and rich data types, thereby effectively improving the speed of data storage and retrieval, making the storage and query of performance data more flexible. At the same time, by mapping object attributes to two-dimensional data tables, the inter-table joins during query can be reduced, and relevant objects can be located more quickly when querying performance data, significantly improving the query response time during large-scale data processing, achieving the effect of improving the overall performance of the business system of financial institutions.
[0105] Embodiment 2
[0106] The embodiment of the present application also provides an object-based data conversion device. It should be noted that the object-based data conversion device of the embodiment of the present application can be used to execute the object-based data conversion method provided by the embodiment of the present application. The following introduces the object-based data conversion device provided by the embodiment of the present application.
[0107] According to the embodiment of the present application, there is also provided a device for implementing the above object-based data conversion method, as Figure 5 shown, the device includes:
[0108] Specifically, a first determination unit 501 is configured to determine the performance data to be converted in the source data table and determine the independent entities in the performance data to obtain multiple objects.
[0109] A second determination unit 502 is configured to determine the target relationships between the multiple objects and determine the attributes of each object among the multiple objects according to the target relationships between the multiple objects.
[0110] A mapping unit 503 is configured to map the attributes of each object among the multiple objects to a two-dimensional data table to obtain a target data table corresponding to each object.
[0111] A conversion unit 504 is configured to perform data conversion on the performance data in the source data table according to the target data table corresponding to each object to obtain multiple target data tables corresponding to the performance data.
[0112] The object-based data conversion device provided by the embodiment of the present application determines the performance data to be converted in the source data table through the first determination unit 501, determines the independent entities in the performance data, and obtains multiple objects; the second determination unit 502 determines the target relationships between the multiple objects, and determines the attributes of each object among the multiple objects according to the target relationships between the multiple objects; the mapping unit 503 maps the attributes of each object among the multiple objects into a two-dimensional data table to obtain the target data table corresponding to each object; the conversion unit 504 performs data conversion on the performance data in the source data table according to the target data table corresponding to each object to obtain multiple target data tables corresponding to the performance data, solving the problem that in the related art, when storing performance data through a traditional relational database, due to the large amount of data, complex data structure, and rich data types, the processing efficiency of financial institutions for data is relatively low.
[0113] By identifying the independent entities in the performance data as multiple objects and determining the target relationships between them (such as inheritance, aggregation, composition, association), it allows for the management of data in an object-oriented manner. Using the object-oriented database method can better handle variable-length data, unstructured data, and rich data types, thereby effectively improving the speed of data storage and retrieval, making the storage and query of performance data more flexible. At the same time, by mapping object attributes into a two-dimensional data table, the inter-table connection during query can be reduced, and when querying performance data, the relevant objects can be located more quickly, significantly improving the query response time during large-scale data processing, achieving the effect of improving the overall performance of the business system of financial institutions.
[0114] Optionally, in the object-based data conversion device provided by the second embodiment of the present application, the above-mentioned multiple objects at least include: a first object and a second object, and the target relationships at least include one of the following: a first relationship, a second relationship, a third relationship, and a fourth relationship; the first relationship indicates that the second object reuses the attributes of the first object, the second relationship indicates that the attributes of the first object contain multiple second objects, the third relationship indicates that multiple second objects form the attributes of the first object, and the fourth relationship indicates that there is an association relationship between the first object and the second object other than the first relationship, the second relationship, and the third relationship.
[0115] Optionally, in the object-based data conversion device provided in the second embodiment of the present application, the above-mentioned target relationship is a first relationship, and the mapping unit 503 includes: a first construction subunit, configured to construct a first data table according to the attributes of the first object and construct a second data table according to the attributes of the second object; or, construct a second data table according to the attributes of the second object and construct a first data table according to the second data table; or, construct a first data table according to the attributes of the first object and construct a second data table according to the first data table; a first determination subunit, configured to determine the object identification information of the first object and add the object identification information of the first object to the first data table and the second data table respectively, where the second data table contains the attributes of the first object and the attribute values of the attributes of the first object; a second determination subunit, configured to determine the target data table corresponding to each object among the multiple objects according to the first data table corresponding to the first object and the second data table corresponding to the second object.
[0116] Optionally, in the object-based data conversion device provided in the second embodiment of the present application, the above-mentioned target relationship is a second relationship, and the mapping unit 503 includes: a second construction subunit, configured to construct a first data table according to the attributes of the first object, and when the second object belongs to an independent entity, construct a second data table according to the attributes of the second object and add the object identification information of the first object to the second data table; a second determination subunit, configured to determine the correspondence between the first object and the second object and update the first data table and the second data table respectively according to the correspondence; a third determination subunit, configured to determine the target data table corresponding to each object among the multiple objects according to the first data table corresponding to the first object and the second data table corresponding to the second object; or, a third construction subunit, configured to construct a first data table according to the attributes of the first object and the attributes of the second object; a fourth determination subunit, configured to determine the target data table corresponding to each object among the multiple objects according to the first data table corresponding to the first object.
[0117] Optionally, in the object-based data conversion device provided in the second embodiment of the present application, the above-mentioned target relationship is a third relationship, and the mapping unit 503 includes: a fourth construction subunit, configured to construct a first data table according to the attributes of the first object and construct a second data table according to the attributes of the second object, where the first data table at least includes the object identification information of the first object; a first update subunit, configured to determine the correspondence between the first object and the second object and update the first data table according to the correspondence; a fifth determination subunit, configured to determine the target data table corresponding to each object among the multiple objects according to the first data table including the first object and the second object.
[0118] Optionally, in the object-based data conversion device provided in the second embodiment of the present application, the above target relationship is the fourth relationship, and the mapping unit 503 includes: a fifth construction subunit for constructing a first data table according to the attributes of the first object, where the first data table at least includes the object identification information of the first object; a sixth construction subunit for constructing a second data table according to the attributes of the second object, and adding the object identification information of the first object to the second data table when the second object belongs to an independent entity, where the second data table at least includes the object identification information of the second object; a second update subunit for determining the correspondence between the first object and the second object, and respectively updating the first data table and the second data table according to the correspondence; a sixth determination subunit for determining the target data table corresponding to each object among the multiple objects according to the first data table corresponding to the first object and the second data table corresponding to the second object.
[0119] Optionally, in the object-based data conversion device provided in the second embodiment of the present application, the above second update subunit includes: an adding module for adding the object identification information of the first object to the second data table when the correspondence belongs to the fifth relationship, where the fifth relationship represents that there is a correspondence between the first object and at least one second object; a creating module for creating a third data table according to the first data table, the object identification information of the first object, the second data table, and the object identification information of the second object when the correspondence belongs to the sixth relationship, where the sixth relationship represents that there is a correspondence between multiple first objects and multiple second objects; the sixth determination subunit includes: a determining module for determining the target data table corresponding to each object among the multiple objects according to the first data table corresponding to the first object, the second data table corresponding to the second object, and the third data table.
[0120] Optionally, in the object-based data conversion device provided in the second embodiment of the present application, the above device further includes: a receiving unit for receiving a query request for the performance data after performing data conversion on the performance data in the source data table according to the target data table corresponding to each object to obtain multiple target data tables corresponding to the performance data; a third determination unit for determining a query condition according to the query request; a query unit for querying according to the query condition among the multiple target data tables to obtain a query result; a response unit for responding to the query request according to the query result.
[0121] It should be noted here that the above first determination unit 501, second determination unit 502, mapping unit 503, and conversion unit 504 correspond to steps S201 to S204 in Embodiment 1. The functions and application scenarios implemented by the two modules and the corresponding steps are the same, but are not limited to the content disclosed in the above Embodiment 1. It should be noted that the above modules or units may be hardware components or software components stored in a memory (for example, memory 104) and processed by one or more processors (for example, processors 102a, 102 based on object data conversion,..., 102n). The above modules may also be part of a device and can run on the computer terminal 10 provided in Embodiment 1.
[0122] Embodiment 3
[0123] An embodiment of the present application may provide an electronic device. Figure 6 It is a structural block diagram of an electronic device according to an embodiment of the present application. As Figure 6 shown, the electronic device may include: one or more ( Figure 6 only one is shown in the figure) processors 602, a memory 604, a storage controller, and a peripheral interface. Among them, the peripheral interface is connected to a radio frequency module, an audio module, and a display.
[0124] Among them, the memory can be used to store software programs and modules, such as program instructions / modules corresponding to the methods and devices in the embodiments of the present application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, implements the above methods. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some instances, the memory may further include a memory remotely set relative to the processor, and these remote memories can be connected to the terminal through a network. Examples of the above network include but are not limited to the Internet, enterprise intranets, local area networks, mobile communication networks, and their combinations.
[0125] The processor can call the information and application programs stored in the memory through a transmission device to perform the following steps: determine the performance data to be converted in the source data table, and determine the independent entities in the performance data to obtain multiple objects; determine the target relationships between the multiple objects, and determine the attributes of each object in the multiple objects according to the target relationships between the multiple objects; map the attributes of each object in the multiple objects into a two-dimensional data table to obtain a target data table corresponding to each object; perform data conversion on the performance data in the source data table according to the target data table corresponding to each object to obtain multiple target data tables corresponding to the performance data.
[0126] The processor can call the information and application programs stored in the memory through the transmission device to perform the following steps: The multiple objects at least include: a first object and a second object. The target relationships at least include one of the following: a first relationship, a second relationship, a third relationship, and a fourth relationship. The first relationship represents that the second object reuses the attributes of the first object. The second relationship represents that the attributes of the first object contain multiple second objects. The third relationship represents that multiple second objects form the attributes of the first object. The fourth relationship represents that there is an association relationship between the first object and the second object other than the first, second, and third relationships.
[0127] The processor can call the information and application programs stored in the memory through the transmission device to perform the following steps: When the target relationship is the first relationship, map the attributes of each object among the multiple objects into two-dimensional data tables to obtain the target data table corresponding to each object, including: constructing a first data table according to the attributes of the first object and constructing a second data table according to the attributes of the second object; or, constructing a second data table according to the attributes of the second object and constructing a first data table according to the second data table; or, constructing a first data table according to the attributes of the first object and constructing a second data table according to the first data table; determine the object identification information of the first object, and add the object identification information of the first object to the first data table and the second data table respectively, where the second data table contains the attributes of the first object and the attribute values of the attributes of the first object; determine the target data table corresponding to each object among the multiple objects according to the first data table corresponding to the first object and the second data table corresponding to the second object.
[0128] The processor can call the information and application programs stored in the memory through the transmission device to perform the following steps: When the target relationship is the second relationship, map the attributes of each object among the multiple objects into two-dimensional data tables to obtain the target data table corresponding to each object, including: constructing a first data table according to the attributes of the first object, and when the second object belongs to an independent entity, constructing a second data table according to the attributes of the second object and adding the object identification information of the first object to the second data table; determine the corresponding relationship between the first object and the second object, and update the first data table and the second data table respectively according to the corresponding relationship; determine the target data table corresponding to each object among the multiple objects according to the first data table corresponding to the first object and the second data table corresponding to the second object; or, construct a first data table according to the attributes of the first object and the attributes of the second object; determine the target data table corresponding to each object among the multiple objects according to the first data table corresponding to the first object.
[0129] The processor can call the information and application programs stored in the memory through the transmission device to execute the following steps: The target relationship is the third relationship. Map the attributes of each object among multiple objects into a two-dimensional data table to obtain the target data table corresponding to each object, including: constructing a first data table based on the attributes of the first object, and constructing a second data table based on the attributes of the second object, where the first data table at least includes the object identification information of the first object; determining the corresponding relationship between the first object and the second object, and updating the first data table according to the corresponding relationship; determining the target data table corresponding to each object among multiple objects based on the first data table including the first object and the second object.
[0130] The processor can call the information and application programs stored in the memory through the transmission device to execute the following steps: The target relationship is the fourth relationship. Map the attributes of each object among multiple objects into a two-dimensional data table to obtain the target data table corresponding to each object, including: constructing a first data table based on the attributes of the first object, where the first data table at least includes the object identification information of the first object; constructing a second data table based on the attributes of the second object, and when the second object belongs to an independent entity, adding the object identification information of the first object to the second data table, where the second data table at least includes the object identification information of the second object; determining the corresponding relationship between the first object and the second object, and updating the first data table and the second data table respectively according to the corresponding relationship; determining the target data table corresponding to each object among multiple objects based on the first data table corresponding to the first object and the second data table corresponding to the second object.
[0131] The processor can call the information and application programs stored in the memory through the transmission device to execute the following steps: Update the first data table and the second data table respectively according to the corresponding relationship, and determine the target data table corresponding to each object among multiple objects based on the first data table corresponding to the first object and the second data table corresponding to the second object, including: when the corresponding relationship belongs to the fifth relationship, adding the object identification information of the first object to the second data table, where the fifth relationship represents that the first object has a corresponding relationship with at least one second object; when the corresponding relationship belongs to the sixth relationship, creating a third data table based on the first data table, the object identification information of the first object, the second data table, and the object identification information of the second object, where the sixth relationship represents that multiple first objects and multiple second objects have a corresponding relationship; determining the target data table corresponding to each object among multiple objects based on the first data table corresponding to the first object, the second data table corresponding to the second object, and the third data table.
[0132] The processor can call the information and application programs stored in the memory through the transmission device to execute the following steps: After performing data conversion on the performance data in the source data table according to the target data tables corresponding to each object to obtain multiple target data tables corresponding to the performance data, the above method further includes: receiving a query request for the performance data; determining a query condition according to the query request; querying according to the query condition in the multiple target data tables to obtain a query result; and responding to the query request according to the query result.
[0133] By adopting the embodiment of the present application, a data conversion method based on objects is provided. By determining the performance data to be converted in the source data table and determining the independent entities in the performance data to obtain multiple objects; determining the target relationships between the multiple objects, and determining the attributes of each object in the multiple objects according to the target relationships between the multiple objects; mapping the attributes of each object in the multiple objects into two-dimensional data tables to obtain the target data tables corresponding to each object; and performing data conversion on the performance data in the source data table according to the target data tables corresponding to each object to obtain multiple target data tables corresponding to the performance data, the technical problem that when storing performance data through a traditional relational database, due to the large amount of data, complex data structure and rich data types, the processing efficiency of financial institutions is relatively low is solved.
[0134] By identifying the independent entities in the performance data as multiple objects and determining the target relationships between them (such as inheritance, aggregation, composition, association), it is allowed to manage data in an object-oriented manner. Using object-oriented database methods can better handle variable-length data, unstructured data and rich data types, thereby effectively improving the speed of data storage and retrieval, making the storage and query of performance data more flexible. At the same time, by mapping object attributes into two-dimensional data tables, the inter-table connection during query can be reduced, and when querying performance data, the relevant objects can be located faster, significantly improving the query response time during large-scale data processing, achieving the effect of improving the overall performance of the business system of financial institutions.
[0135] Those of ordinary skill in the art can understand that Figure 6 The structure shown is only for illustration, and the electronic device can also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a handheld computer, and mobile Internet devices (Mobile Internet Devices, MID), PAD and other terminal devices. Figure 6 It does not limit the structure of the above electronic device. For example, the electronic device may further include more or fewer components (such as a network interface, a display device, etc.) than those shown Figure 6 in the figure, or have a different configuration from that shown Figure 6 in the figure.
[0136] Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium. The storage medium can include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, an optical disc, etc.
[0137] Embodiment 4
[0138] An embodiment of the present application also provides a storage medium. Optionally, in this embodiment, the above storage medium can be used to store the program code executed by the object-based data conversion method provided in the first embodiment above.
[0139] Optionally, in this embodiment, the above storage medium can be located in any one of the computer terminals in the computer terminal group in the computer network, or in any one of the mobile terminals in the mobile terminal group.
[0140] The present application also provides a computer program product, which is suitable for executing a program of the steps of the object-based data conversion method when executed on a data processing device.
[0141] The serial numbers of the above embodiments of the present application are only for description and do not represent the advantages and disadvantages of the embodiments.
[0142] In the above embodiments of the present application, the descriptions of the various embodiments have their own emphases. For the parts not detailed in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0143] In the several embodiments provided by the present application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point, the displayed or discussed coupling or direct coupling or communication connection between each other can be through some interfaces, and the indirect coupling or communication connection of the units or modules can be in an electrical or other form.
[0144] The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they can be located in one place, or they can be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0145] In addition, in each embodiment of the present application, the functional units can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
[0146] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in each embodiment of the present application. The foregoing storage medium includes: various media such as USB flash drives, read-only memories (ROMs), random access memories (RAMs), mobile hard disks, magnetic disks, or optical discs that can store program codes.
[0147] The above are only the preferred embodiments of the present application. It should be noted that for those of ordinary skill in the art, without departing from the principle of the present application, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of the present application.
Claims
1. An object-based data conversion method, characterized in that: include: Determine the performance data to be converted in the source data table, and determine the independent entities in the performance data to obtain a plurality of objects; Determining a target relationship between the multiple objects, and determining an attribute of each of the multiple objects according to the target relationship between the multiple objects; Mapping the attributes of each object in the plurality of objects into a two-dimensional data table to obtain a target data table corresponding to each object; The performance data in the source data table is converted according to the target data table corresponding to each object to obtain multiple target data tables corresponding to the performance data.
2. The method according to claim 1, characterized in that The multiple objects include at least: a first object and a second object, and the target relationship includes at least one of the following: a first relationship, a second relationship, a third relationship and a fourth relationship; the first relationship represents that the second object reuses the attributes of the first object, the second relationship represents that the attributes of the first object contain multiple second objects, the third relationship represents that multiple second objects constitute the attributes of the first object, and the fourth relationship represents that there is an association relationship between the first object and the second object other than the first relationship, the second relationship and the third relationship.
3. The method according to claim 2, characterized in that The target relationship is the first relationship, and the attribute of each object in the multiple objects is mapped into a two-dimensional data table to obtain a target data table corresponding to each object, including: A first data table is constructed according to the attributes of the first object, and a second data table is constructed according to the attributes of the second object; or, a second data table is constructed according to the attributes of the second object, and a first data table is constructed according to the second data table; or, a first data table is constructed according to the attributes of the first object, and a second data table is constructed according to the first data table; Determine object identification information of the first object, and add the object identification information of the first object to the first data table and the second data table respectively, wherein the second data table contains attributes of the first object and attribute values of the attributes of the first object; A target data table corresponding to each of the plurality of objects is determined according to a first data table corresponding to the first object and a second data table corresponding to the second object.
4. The method according to claim 2, characterized in that: The target relationship is the second relationship, and the attribute of each object in the multiple objects is mapped into a two-dimensional data table to obtain a target data table corresponding to each object, including: Constructing a first data table according to the attributes of the first object, and in the case where the second object belongs to an independent entity, constructing a second data table according to the attributes of the second object, and adding the object identification information of the first object to the second data table; determining the correspondence between the first object and the second object, and updating the first data table and the second data table respectively according to the correspondence; determining a target data table corresponding to each of the multiple objects according to the first data table corresponding to the first object and the second data table corresponding to the second object; or, A first data table is constructed according to the attributes of the first object and the attributes of the second object; and a target data table corresponding to each of the multiple objects is determined according to the first data table corresponding to the first object.
5. The method according to claim 2, characterized in that: The target relationship is the third relationship, and the attribute of each object in the multiple objects is mapped into a two-dimensional data table to obtain a target data table corresponding to each object, including: Constructing a first data table according to the attributes of the first object, and constructing a second data table according to the attributes of the second object, wherein the first data table at least includes object identification information of the first object; Determine a correspondence between the first object and the second object, and update the first data table according to the correspondence; A target data table corresponding to each object in the plurality of objects is determined according to a first data table including the first object and the second object.
6. The method according to claim 2, characterized in that The target relationship is the fourth relationship, and the attribute of each object in the multiple objects is mapped into a two-dimensional data table to obtain a target data table corresponding to each object, including: Constructing a first data table according to the attributes of the first object, wherein the first data table at least includes object identification information of the first object; constructing a second data table according to the attributes of the second object, and adding the object identification information of the first object to the second data table when the second object belongs to an independent entity, wherein the second data table at least includes the object identification information of the second object; Determine a correspondence between the first object and the second object, and update the first data table and the second data table respectively according to the correspondence; A target data table corresponding to each of the plurality of objects is determined according to a first data table corresponding to the first object and a second data table corresponding to the second object.
7. The method according to claim 6, characterized in that The first data table and the second data table are respectively updated according to the corresponding relationship, and a target data table corresponding to each of the multiple objects is determined according to the first data table corresponding to the first object and the second data table corresponding to the second object, including: In the case where the corresponding relationship belongs to the fifth relationship, adding the object identification information of the first object in the second data table, wherein the fifth relationship indicates that there is a corresponding relationship between the first object and at least one of the second objects; In the case where the corresponding relationship belongs to the sixth relationship, creating a third data table according to the first data table, the object identification information of the first object, the second data table and the object identification information of the second object, wherein the sixth relationship represents that a corresponding relationship exists between a plurality of the first objects and a plurality of the second objects; A target data table corresponding to each of the plurality of objects is determined according to a first data table corresponding to the first object, a second data table corresponding to the second object, and the third data table.
8. The method according to claim 1, characterized in that After performing data conversion on the performance data in the source data table according to the target data table corresponding to each object to obtain multiple target data tables corresponding to the performance data, the method further includes: receiving a query request for the performance data; Determining query conditions according to the query request; Performing a query in the plurality of target data tables according to the query condition to obtain a query result; The query request is responded to according to the query result.
9. An object-based data conversion device, characterized in that: include: A first determining unit is used to determine the performance data to be converted in the source data table, and determine the independent entities in the performance data to obtain a plurality of objects; a second determining unit, configured to determine a target relationship between the plurality of objects, and determine a property of each of the plurality of objects according to the target relationship between the plurality of objects; A mapping unit, used to map the attribute of each object in the plurality of objects into a two-dimensional data table to obtain a target data table corresponding to each object; The conversion unit is used to perform data conversion on the performance data in the source data table according to the target data table corresponding to each object, so as to obtain multiple target data tables corresponding to the performance data.
10. A computer program product comprising computer instructions, characterized in that: When the computer instructions are executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.