Data processing method and device, storage medium and electronic equipment
By constructing a target data model that includes extended attribute information, the problem of low processing efficiency caused by incomplete data models is solved, and efficient data processing and personalized configuration are achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-16
- Publication Date
- 2026-03-27
AI Technical Summary
In existing technologies, if the data model does not include the attribute information of the target data, it is necessary to customize the data model corresponding to the target data, resulting in low processing efficiency.
By acquiring the processing requirements of the target data, a target data model containing extended attribute information is constructed, thereby directly extracting and analyzing the target data from the database and avoiding customized development.
It enables the provision of personalized attribute configurations while ensuring standardized design, thereby improving data processing efficiency and reducing development costs.
Smart Images

Figure CN116450749B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of data processing, in particular to a data processing method and device, a storage medium and an electronic device. BACKGROUND
[0002] An intelligent application scenario involves a large number of basic data and business rules. As a standard intelligent application SAAS (software as a service) product, the product is expected to be more general and standard, to meet the maximum needs of customers, and to provide flexible expansion to support customer-defined scenarios. However, the design of a data model is a difficult problem because the data model needs to be determined to the field level, and in an intelligent application, only key attributes can be defined, and many important attributes related to customer industry segmentation and scenarios cannot be predefined. In the prior art, when the current data model does not include attribute information of target data, the corresponding data model needs to be customized and developed for the target data, which seriously affects the processing efficiency of the data.
[0003] In related technologies, when target data needs to be analyzed and processed, if the current data model does not include attribute information of the target data, the corresponding data model of the target data needs to be customized and developed, which leads to a relatively low processing efficiency of the target data. So far, no effective solution has been proposed. SUMMARY
[0004] Embodiments of the present application provide a data processing method and device, a storage medium and an electronic device to at least solve the technical problem that when target data needs to be analyzed and processed, if the current data model does not include attribute information of the target data, the corresponding data model of the target data needs to be customized and developed, which leads to a relatively low processing efficiency of the target data.
[0005] According to an aspect of an embodiment of the present application, a data processing method is provided, including: obtaining a data processing request of a target object, wherein the data processing request at least includes a field name corresponding to target data to be processed and a processing requirement of the target object on the target data; constructing a target data model corresponding to the processing requirement of the target data, wherein the target data model includes extension attribute information set according to the processing requirement of the target data, and the extension attribute information is used to extract the target data from a database; obtaining the target data according to the field name corresponding to the target data and the extension attribute information in the target data model, and analyzing and processing the target data to obtain a data processing result.
[0006] Further, the constructing the target data model corresponding to the processing requirement of the target data comprises: acquiring a general data model corresponding to the processing requirement of the target data, wherein the data is extracted from the database according to attribute information in the general data model; acquiring extended attribute information, wherein the extended attribute information at least comprises a field name corresponding to an extended attribute and representation information of the extended attribute; and adding the extended attribute information to the general data model to obtain the target data model.
[0007] Further, the adding the extended attribute information to the general data model to obtain the target data model comprises: identifying an attribute type of the extended attribute information, wherein the attribute type is one of a discrete attribute and a numerical attribute; and adding the extended attribute information to a target position of the general data model according to the attribute type to obtain the target data model.
[0008] Further, the acquiring the extended attribute information comprises: after detecting an adding request of the target object for adding the extended attribute information, displaying an adding page in response to the adding request; and acquiring the extended attribute information and an attribute type of the extended attribute information through the adding page.
[0009] Further, the acquiring the general data model corresponding to the processing requirement of the target data comprises: determining a primary key according to the processing requirement of the target data and a granularity, wherein the granularity represents a detail level of a business represented in a data model, and the primary key is a unique identifier of the data model; determining target attribute information according to the primary key and the granularity; and assembling the general data model through the primary key and the target attribute information.
[0010] Further, the target data model at least comprises an entity data model, an entity relationship model and an event model, and the acquiring the target data according to the field name of the target data and the extended attribute information in the target data model comprises: acquiring initial data from the database according to the entity data model, the entity relationship model and the event model; and supplementing the initial data according to the entity relationship model to obtain the target data.
[0011] Further, if the processing requirement of the target data is to perform sales analysis on the target commodity, constructing the target data model corresponding to the processing requirement of the target data comprises: constructing the target data model corresponding to the processing requirement of the target data, wherein the target data model comprises at least: an entity data model corresponding to the target commodity and an entity relationship data model of the target commodity and the target commodity, an entity data model corresponding to the target object and an entity relationship data model of the target object and the target commodity, and an event data model of the target object selling the target commodity; and the obtaining the target data according to the field name corresponding to the target data and the extension attribute information in the target data model comprises: obtaining historical sales data of the target commodity according to the entity data model corresponding to the target commodity and the entity relationship data model of the target commodity and the target commodity, the entity data model corresponding to the target object and the entity relationship data model of the target object and the target commodity, and the event data model of the target object selling the target commodity; and the performing analysis and processing on the target data to obtain a data processing result comprises: performing chart drawing according to the historical sales data of the target commodity to obtain sales information of the target commodity.
[0012] According to another aspect of the embodiments of the present application, a data processing method is also provided, comprising: obtaining a data processing request of a target object sent by a client, wherein the data processing request comprises at least a field name corresponding to target data to be processed and a processing requirement of the target object on the target data; constructing a target data model corresponding to the processing requirement of the target data in a cloud server, wherein the target data model comprises extension attribute information set according to the processing requirement of the target data, the extension attribute information is used to extract the target data from a database, obtain the target data according to the field name corresponding to the target data and the extension attribute information in the target data model, and perform analysis and processing on the target data to obtain a data processing result; and returning the data processing result to the client.
[0013] According to another aspect of the embodiments of the present application, a data processing apparatus is further provided, comprising: a first obtaining unit, configured to obtain a data processing request of a target object, wherein the data processing request comprises at least a field name corresponding to target data to be processed and a processing requirement of the target object on the target data; a second obtaining unit, configured to construct a target data model corresponding to the processing requirement of the target data; wherein the target data model comprises extension attribute information set according to the processing requirement of the target data, and the extension attribute information is used to extract the target data from a database; and a processing unit, configured to obtain the target data according to the field name corresponding to the target data and the extension attribute information in the target data model, and perform analysis processing on the target data to obtain a data processing result.
[0014] Further, the second obtaining unit comprises: a first obtaining module, configured to obtain a general data model corresponding to the processing requirement of the target data; a receiving module, configured to obtain extension attribute information, wherein the extension attribute information comprises at least a field name corresponding to an extension attribute and expression information of the extension attribute; and an adding module, configured to add the extension attribute information to the general data model to obtain the target data model.
[0015] Further, the adding module comprises: an identifying submodule, configured to identify an attribute type of the extension attribute information, wherein the attribute type is one of a discrete attribute and a numerical attribute; and an adding submodule, configured to add the extension attribute information to a target position of the general data model according to the attribute type to obtain the target data model.
[0016] Further, the receiving module comprises: a responding submodule, configured to, after detecting an adding request of the target object for adding extension attribute information, respond to the adding request and display an adding page; and a receiving submodule, configured to obtain the extension attribute information and an attribute type of the extension attribute information through the adding page.
[0017] Further, the second obtaining unit comprises: a first determining module, configured to determine a primary key according to the processing requirement of the target data and a granularity, wherein the granularity represents a detail level of a business represented in a data model, and the primary key is a unique identifier of the data model; a second determining module, configured to determine target attribute information according to the primary key and the granularity; and a third determining module, configured to construct the general data model through the primary key and the target attribute information.
[0018] Further, the processing unit comprises: a second obtaining module, configured to obtain initial data from the database according to the entity data model, the entity relationship model and the event model; and a supplement module, configured to supplement the initial data according to the entity relationship model to obtain the target data.
[0019] Further, if the processing requirement for the target data is to perform sales analysis on a target commodity, the second obtaining unit comprises: a third obtaining module, configured to construct a target data model corresponding to the processing requirement for the target data, wherein the target data model comprises at least: an entity data model corresponding to the target commodity, an entity relationship data model of the target commodity and the target commodity, an entity data model corresponding to a target object, an entity relationship data model of the target object and the target commodity, and an event data model of the target object selling the target commodity; and the processing unit comprises: a fourth obtaining module, configured to obtain historical sales data of the target commodity according to the entity data model corresponding to the target commodity, the entity relationship data model of the target commodity and the target commodity, the entity data model corresponding to the target object, the entity relationship data model of the target object and the target commodity, and the event data model of the target object selling the target commodity; and the processing unit further comprises: a drawing module, configured to perform chart drawing according to the historical sales data of the target commodity to obtain sales information of the target commodity.
[0020] According to another aspect of the embodiments of the present application, a computer readable storage medium is provided, the storage medium storing a program, wherein the program, when executed, controls a device where the storage medium is located to perform the data processing method according to any one of the preceding embodiments.
[0021] According to another aspect of the embodiments of the present application, an electronic device is provided, characterized by comprising: a memory storing an executable program; and a processor configured to execute the program, wherein the program, when executed, performs the data processing method according to any one of the preceding embodiments.
[0022] In the embodiment of the present application, the data processing request of the target object is acquired, wherein the data processing request at least includes the field name corresponding to the target data to be processed and the processing requirement of the target object to the target data; the target data model corresponding to the processing requirement of the target data is constructed, wherein the target data model includes the extension attribute information set according to the processing requirement of the target data, and the extension attribute information is used to extract the target data from the database; the target data is acquired according to the field name corresponding to the target data and the extension attribute information in the target data model, and the target data is analyzed and processed to obtain the data processing result. The technical problem that the processing efficiency of the target data is relatively low due to the need of customized development of the data model corresponding to the target data when the target data needs to be analyzed and processed and the attribute information of the target data is not included in the current data model is solved. In the present scheme, when the processing request of the target object to the target data is detected, the target data model with the extension attribute information set according to the processing requirement of the target data is directly acquired, so that the target data in the database can be directly acquired according to the target data model, avoiding the customized development of the data model corresponding to the target data. The design standardization, processing standardization and application standardization based on the general attribute are ensured, the extension attribute configuration is opened, the personalized processing attribute is acquired, the balance between the generalization and customization is achieved, and the processing efficiency of the target data is improved.
[0023] It is easily noticed that the general description above and the detailed description below are merely examples and explanations of the present application, and do not constitute limitations of the present application. BRIEF DESCRIPTION OF DRAWINGS
[0024] The drawings described herein are used to provide further understanding of the present application, and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application, and do not constitute improper limitations of the present application. In the drawings:
[0025] Figure 1 is a schematic diagram of a computer terminal provided according to the first embodiment of the present application;
[0026] Figure 2 is a flowchart of a data processing method provided according to the first embodiment of the present application;
[0027] Figure 3 is a flowchart of a data processing method provided according to the second embodiment of the present application;
[0028] Figure 4 is a schematic diagram of a data processing device provided according to the third embodiment of the present application;
[0029] Figure 5 is a schematic diagram of a computer terminal provided according to the fourth embodiment of the present application. DETAILED DESCRIPTION
[0030] In order to better understand the present application, the following will be a clear and complete description of the technical solutions in the embodiments of the present application in conjunction with the accompanying drawings of the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, not all. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor should be within the scope of protection of the present application.
[0031] It should be noted that the terms "first", "second" and the like in the specification and claims of the present application and the above-described drawings are used to distinguish similar objects, and do not necessarily indicate a specific order or a chronological sequence. It should be understood that the data thus used can be interchanged under appropriate circumstances, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein. In addition, the terms "include" and "have" and any variations thereof are intended to cover non-exclusive inclusion, for example, a process, method, system, product or device that includes a series of steps or units does not have to be limited to those steps or units clearly listed, but can include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0032] Embodiment 1
[0033] According to the embodiments of the present application, a data processing method is provided. 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 herein can be executed in an order different from that shown herein.
[0034] The method provided by the embodiment of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Figure 1 A hardware structure block diagram of a computer terminal (or mobile device) for implementing the data processing method is shown. As shown in Figure 1 The computer terminal 10 (or mobile device) can include one or more Figure 1The computer terminal 10 can include a processor 102 (which can include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it can also include a display, an input / output interface (I / O interface), a Universal Serial Bus (USB) port (which can be included as one of the ports of the BUS bus), a network interface, a power supply and / or a camera. Those skilled in the art can understand that Figure 1 The structure shown is only schematic and does not limit the structure of the above-mentioned electronic device. For example, the computer terminal 10 can also include more or fewer components than those shown in the figure, or have a different configuration from that shown in the figure. Figure 1 The structure shown is only schematic and does not limit the structure of the above-mentioned electronic device. For example, the computer terminal 10 can also include more or fewer components than those shown in the figure, or have a different configuration from that shown in the figure. Figure 1 The structure shown is only schematic and does not limit the structure of the above-mentioned electronic device. For example, the computer terminal 10 can also include more or fewer components than those shown in the figure, or have a different configuration from that shown in the figure.
[0035] It should be noted that the above-mentioned one or more processors 102 and / or other data processing circuits can be referred to herein as "data processing circuits" in general. The data processing circuit can be embodied in whole or in part as software, hardware, firmware or any other combination. In addition, the data processing circuit can be a single independent processing module, or any one of the other elements combined into the computer terminal 10 (or mobile device) in whole or in part. As referred to in the embodiments of the present application, the data processing circuit serves as a processor to control (for example, selection of a variable resistance terminal path connected to an interface).
[0036] The memory 104 can be used to store software programs and modules of application software, such as program instructions / data storage means corresponding to the data processing 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 data processing method. The memory 104 can include a high-speed random access memory, and can also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memories. In some examples, the memory 104 can further include a memory remotely arranged with respect to the processor 102, which 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 intranet, a local area network, a mobile communication network, and combinations thereof.
[0037] The transmission device 106 is configured to receive or send data via a network. The network can include a wireless network provided by a communication provider of the computer terminal 10. In an example, the transmission device 106 includes a network interface controller (NIC) that can be connected to other network devices through a base station to communicate with the Internet. In an example, the transmission device 106 can be a radio frequency (RF) module configured to communicate with the Internet wirelessly.
[0038] The display can be a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer terminal 10 (or a mobile device).
[0039] In the above operating environment, the present application provides a data processing method as shown in Figure 2 Figure 2 is a flowchart of the data processing method according to an embodiment of the present application. The data processing method includes the following steps:
[0040] In step S201, a data processing request of a target object is obtained, wherein the data processing request includes at least a field name corresponding to target data to be processed and a processing requirement of the target object on the target data.
[0041] Specifically, a data processing request of a user (i.e., the target object) on target data is obtained. The data processing request includes but is not limited to a field name corresponding to the target data to be processed and a processing requirement on the target data, i.e., a specific business scenario of the user. For example, the sales of some goods need to be analyzed, and the corresponding target data is the historical sales data of the goods. The corresponding processing requirement is to analyze the historical sales data of the goods to obtain the sales trend of the goods and other data. The user often needs to analyze the data of the database to formulate corresponding business plans and business rules. For example, for the sales data of a certain good, the user wants to know the sales distribution in the past year, and the corresponding user needs to initiate a data processing request on the sales data of the certain good. The corresponding data processing request needs to include the field name corresponding to the good and the field name corresponding to the order of the good, etc.
[0042] In step S202, a target data model corresponding to the processing requirement of the target data is constructed, wherein the target data model includes extended attribute information set according to the processing requirement of the target data, and the extended attribute information is used to extract the target data from the database.
[0043] Specifically, since the corresponding data needs to be called from the database when data analysis is performed, the required data needs to be called from the database by relying on the data model, and then the data is analyzed. In actual applications, a corresponding general data model is often developed according to the actual business scenarios of users. For example, a general data model of a certain commodity includes some key attribute information set according to the actual business scenarios of users, such as commodity code / name, parent commodity code / name, commodity status, and the like. However, with the expansion of business scenarios, the key attribute information in the general data model cannot meet the needs of users. For example, it is necessary to further analyze the sales information of commodities of a certain brand or to distinguish the sales information of sugar-containing and sugar-free products. In the prior art, the general data model needs to be redeveloped, which leads to high development cost and low data processing efficiency.
[0044] However, in the embodiments of the present application, after obtaining the data processing request of the target object, the corresponding target data model is directly obtained according to the processing requirement of the target data. The target data model includes the extension attribute information set according to the processing requirement of the target data. The extension attribute information can extract the target data directly from the database, and then analyze and process the target data information.
[0045] In step S203, the target data is obtained according to the field name corresponding to the target data and the extension attribute information in the target data model, and the target data is analyzed and processed to obtain a data processing result.
[0046] Specifically, after obtaining the target data model through step S202, the target data is extracted and processed from the database according to the target data model and the field name corresponding to the target data, and then the target data is analyzed and processed to obtain a data processing result.
[0047] In summary, when the processing request of the target object for the target data is detected, the target data model with the extension attribute information set according to the processing requirement of the target data is directly obtained, so that the target data in the database can be directly obtained according to the target data model, avoiding the customized development of the data model corresponding to the target data, improving the processing efficiency of the target data, and reducing the development cost.
[0048] It is crucial to obtain a target data model corresponding to a processing requirement of target data, therefore, in the data processing method provided in Embodiment One of the present application, constructing a target data model corresponding to a processing requirement of target data comprises: obtaining a general data model corresponding to a processing requirement of target data; obtaining extension attribute information, wherein the extension attribute information at least comprises a field name corresponding to an extension attribute and representation information of the extension attribute; and adding the extension attribute information to the general data model to obtain the target data model.
[0049] Specifically, the general data model corresponding to the processing requirement of the target data is obtained, wherein data is extracted from a database according to attribute information in the general data model, for example, the general data model of attributes of a certain commodity is shown in Table 1:
[0050] Table 1
[0051]
[0052] In Table 1, key attribute information of the commodity data model is included, for example, commodity code / name, parent commodity code / name, and commodity status. Discrete attributes and numerical attributes are also included in Table 1, and the positions corresponding to the discrete attributes and numerical attributes are empty in the absence of configuration.
[0053] After obtaining the general data model, the extension attribute information of the processing requirement of the target data input by the user is received, for example, the extension attribute information can be the following attribute information: brand, brand group, weight, and specification, etc. The extension attribute information can be set according to the actual business scenario of the user, for example, it is necessary to analyze the sales information of a product with sugar and without sugar, and then the extension attribute information of whether it contains sugar can be added.
[0054] Finally, the extension attribute information of the processing requirement of the target data input by the user is added to the general data model to obtain the target data model.
[0055] In order to be able to normally process data subsequently, in the data processing method provided in Embodiment One of the present application, adding the extension attribute information to the general data model to obtain the target data model comprises: identifying the attribute type of the extension attribute information, wherein the attribute type is one of the following: discrete attribute and numerical attribute; and adding the extension attribute information to a target position of the general data model according to the attribute type to obtain the target data model.
[0056] Specifically, in order to add the extended attribute information into the general data model, the attribute type of the extended attribute information needs to be identified and determined. The attribute type generally includes discrete attribute and numerical attribute, and different attribute types correspond to different data processing methods. For example, the numerical attribute can perform numerical calculation on the value corresponding to the attribute, but the value corresponding to the discrete attribute cannot be subjected to numerical calculation. Therefore, the attribute type of the extended attribute information is identified, and then the extended attribute information is added to the target position of the general data model according to the attribute type, so as to obtain the target data model.
[0057] It should be noted that the identified attribute type of the extended attribute information also needs to be stored in the extended attribute configuration model, so that the attribute type of the corresponding attribute information can be accurately obtained through the extended attribute configuration model during subsequent data processing.
[0058] In an optional embodiment, after adding the extended attribute information such as brand, brand group, weight and specification in the general data model of the attribute of a certain commodity, the obtained target data model is shown in Table 2:
[0059] Table 2
[0060]
[0061]
[0062] In the data processing method provided in the embodiment of the present application, the extended attribute information is obtained by the following method: after detecting that the target object adds an addition request of the extended attribute information, the addition page is displayed in response to the addition request; and the extended attribute information and the attribute type of the extended attribute information are obtained through the addition page.
[0063] Specifically, in order to improve the user experience, the extended attribute information that the user wants to add can be received at the front end. The user triggers an addition request of adding the extended attribute information on the front-end page, and after receiving the addition request of the user, the front-end page responds to the addition request and jumps to the addition page of the extended attribute information. The user adds the extended attribute information and the attribute type of the extended attribute information and other information on the addition page.
[0064] For example, as shown in Table 3, the attribute information of the general data model of the commodity is added, as shown in Table 3,
[0065] Table 3
[0066]
[0067]
[0068] Specifically, after the specific extended attribute configuration of Table 3, the extended attribute configuration model of the backend can be as shown in Table 4:
[0069] Table 4
[0070]
[0071] Through the above steps, the addition of the custom attribute configuration is specified by the user to specify the column name, description, type and other data, which realizes the technical effect of quickly obtaining the data model, and adapts to the personalized data use scene of the user, reduces the cost of customized development, and improves the data processing efficiency.
[0072] It is crucial to propose a general data model. In the data processing method provided in Embodiment One of the present application, obtaining a general data model corresponding to a processing requirement for target data includes: determining a primary key according to the processing requirement for the target data and granularity, wherein the granularity represents the detail level of the business represented in the data model, and the primary key is a unique identifier of the data model; determining target attribute information according to the primary key and the granularity; and assembling the general data model through the primary key and the target attribute information.
[0073] Specifically, when developing a general data model, the unique identifier of the data model, that is, the primary key, is determined according to the current business requirement of the user (i.e., the above-mentioned processing requirement for the target data) and the detail level of the business represented in the data model set by the user (i.e., the above-mentioned granularity). It should be noted that the granularity can represent not only the detail level of the business, but also the dimension or combination of dimension attribute values for an aggregate data model. For example, when predicting the expected sales of a certain beverage at a certain reseller in the next 12 months, reseller information, beverage product information, and historical monthly sales data of the reseller-beverage product are required. In these general data models, the primary key of the reseller information is the reseller code (which uniquely identifies a reseller object), the primary key of the beverage product is the SKU code (which uniquely identifies a minimum saleable product unit), and the primary key of the sales data is the reseller-beverage product-month (reseller_code*sku_code*date). Then, according to the primary key and the granularity, other key attribute information (target attribute information) is determined, for example, the state information of the reseller needs to be focused on, such as the state of the reseller cooperation, suspension, etc., and the reseller state needs to be included as the key attribute information of the reseller base model. Finally, the primary key and the target attribute information are assembled into a general data model.
[0074] Further, in the data processing method provided by the first embodiment of the present application, the target data model at least includes an entity data model, an entity relationship model and an event model, and the target data is obtained according to the field name corresponding to the target data and the extended attribute information in the target data model, including: obtaining initial data from the database according to the entity data model, the entity relationship model and the event model; supplementing the initial data according to the entity relationship model to obtain the target data.
[0075] Specifically, when extracting target data from the database, three types of data models need to be used, that is, the target data model at least includes an entity data model, an entity relationship model and an event model. For example, the commodity data model, the distribution channel data model and the warehouse data model are entity data models. The entity relationship model is a data model that describes the relationship between some entities, for example, an entity relationship model that describes the relationship between a commodity and a commodity distributor, and an entity relationship model between new and old products. The event model often refers to a data model with a time mark, for example, a distribution channel order data model and a warehouse order data model.
[0076] By obtaining initial data from the database according to the entity data model, the entity relationship model and the event model, the initial data can be supplemented by the entity relationship model to obtain the target data.
[0077] In an optional embodiment, when obtaining data information of a distributor selling a product, the distributor's agency right for the product is from January to December, but the distributor only distributes the product from January to May, and does not distribute it from June to December. When obtaining initial data from the database, only data information from January to May is obtained. In order to analyze the sales of the distributor by subsequent sales prediction algorithms, the corresponding data from June to December needs to be supplemented according to the entity relationship model between the distributor and the commodity, and then the target data is obtained.
[0078] In an optional embodiment, the sales of product B from January 2022 to December 2022 need to be analyzed. According to the entity relationship model between product B and product A, it can be obtained that product B is an iterative product of product A. Therefore, when obtaining data information of product B, data information of product A is also obtained, and a comprehensive analysis of the sales of product B from January 2022 to December 2022 is realized.
[0079] In the data processing method provided in Embodiment One of the present application, if the processing requirement for the target data is to perform sales analysis on the target commodity, constructing a target data model corresponding to the processing requirement for the target data comprises: constructing a target data model corresponding to the processing requirement for the target data, wherein the target data model at least includes: an entity data model corresponding to the target commodity and an entity relationship data model of the target commodity and the target commodity, an entity data model corresponding to the target object and an entity relationship data model of the target object and the target commodity, and an event data model of the target object selling the target commodity; obtaining the target data according to the field name corresponding to the target data and the extended attribute information in the target data model comprises: obtaining the historical sales data of the target commodity according to the entity data model corresponding to the target commodity and the entity relationship data model of the target commodity and the target commodity, the entity data model corresponding to the target object and the entity relationship data model of the target object and the target commodity, and the event data model of the target object selling the target commodity; and performing analysis and processing on the target data to obtain a data processing result comprises: performing chart drawing according to the historical sales data of the target commodity to obtain sales information of the target commodity.
[0080] In an optional embodiment, if the target commodity is analyzed for sales, the corresponding steps include: obtaining a target data model of the business scenario of analyzing the target commodity for sales, which needs to include: an entity data model corresponding to the target commodity, an entity relationship data model of the target commodity and the target commodity, an entity relationship model corresponding to the target object, an entity relationship data model corresponding to the target object and the target commodity, and an event data model of the target object selling the target commodity. The historical sales data of the target commodity is obtained from the database through the above data models, and then the historical sales data of the target commodity is drawn into a chart, and the sales information of the target commodity is obtained.
[0081] In an optional embodiment, if the target object is a supply and marketing merchant, the corresponding target data model needs to include: an entity data model corresponding to the target commodity, an entity relationship data model of the target commodity and the target commodity, an entity relationship model corresponding to the distributor, an entity relationship data model corresponding to the distributor and the target commodity, and an event data model of the distributor selling the target commodity (such as distributor order information, etc.). The historical sales data of the target commodity corresponding to the supply and marketing merchant is obtained through the above data models, and the analysis of the historical sales data of the target commodity is realized.
[0082] In an optional embodiment, the historical sales data of the target commodity can also be used to predict the sales volume of the target commodity, for example, using these sales data as sample data to train a prediction model, and then using the prediction model to predict the future sales volume of the target commodity.
[0083] In the data processing method provided in the first embodiment of the present application, the data processing request of the target object is obtained, wherein the data processing request at least includes the field name corresponding to the target data to be processed and the processing requirement of the target object on the target data; the target data model corresponding to the processing requirement of the target data is constructed, wherein the target data model includes the extension attribute information set according to the processing requirement of the target data, and the extension attribute information is used to extract the target data from the database; the target data is obtained according to the field name corresponding to the target data and the extension attribute information in the target data model, and the target data is analyzed and processed to obtain the data processing result. When the target data needs to be analyzed and processed, if the attribute information of the target data is not included in the current data model, the data model corresponding to the target data needs to be customized and developed, which leads to a low processing efficiency of the target data. In the present scheme, when the processing request of the target object on the target data is detected, the target data model with the extension attribute information set according to the processing requirement of the target data is directly obtained, so that the target data in the database can be directly obtained according to the target data model. The customized development of the data model corresponding to the target data is avoided, the design standardization, processing standardization and application standardization based on the general attribute are ensured, the extension attribute configuration is opened, the personalized processing attribute is obtained, the balance between generalization and customization is achieved, and the processing efficiency of the target data is improved.
[0084] It should be noted that the user information (including but not limited to user equipment information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) involved in the present application are all information and data authorized by the user or authorized by all parties, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards of relevant countries and regions, and provide corresponding operation portal for user to choose authorization or refusal.
[0085] It should be noted that, for the foregoing method embodiments, in order to simply describe, they are all expressed as a series of action combinations, but those skilled in the art should know that the present application is not limited to the action order described, because according to the present application, certain steps can be performed in other order or simultaneously. Secondly, those skilled in the art should know that the embodiments described in the specification all belong to preferred embodiments, and the actions and modules involved are not necessarily necessary for the present application.
[0086] Those skilled in the art can clearly understand that the method according to the above-mentioned embodiments can be realized by means of software and necessary general hardware platforms, and of course can also be realized by hardware based on the above description of the embodiments. Based on such understanding, the technical solutions of the present application can be embodied in the form of a software product, which is stored in a storage medium (such as a ROM / RAM, a magnetic disk, or an optical disk) and includes a plurality of instructions for causing a terminal device (which can be a mobile phone, a computer, a server, or a network device) to execute the methods of the various embodiments of the present application.
[0087] Embodiment 2
[0088] According to the embodiments of the present application, a data processing method as shown in the accompanying drawings is also provided. Figure 3 Figure 3 is a flowchart of the data processing method according to Embodiment 2 of the present application. The above-mentioned data processing method includes:
[0089] In step S301, a data processing request of a target object sent by a client is acquired, wherein the data processing request at least includes a field name corresponding to target data to be processed and a processing requirement of the target object to the target data;
[0090] In step S302, a target data model corresponding to the processing requirement of the target data is constructed in a cloud server, wherein the target data model includes extension attribute information set according to the processing requirement of the target data, the extension attribute information is used to extract the target data from a database, the target data is acquired according to the field name corresponding to the target data and the extension attribute information in the target data model, and the target data is analyzed and processed to obtain a data processing result;
[0091] In step S303, the data processing result is returned to the client.
[0092] In the cloud server, the specific method of processing data is the same as that in Embodiment 1, which will not be described here.
[0093] It should be noted that, for the above-mentioned method embodiments, in order to simply describe, they are all expressed as a series of action combinations, but those skilled in the art should know that the present application is not limited by the action sequence described, because according to the present application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should know that the embodiments described in the specification all belong to preferred embodiments, and the actions and modules involved are not necessarily necessary for the present application.
[0094] Those skilled in the art can clearly understand, through the description of the above embodiments, that the method according to the above embodiments can be realized by means of software and a necessary general hardware platform, and of course can also be realized by hardware, but in many cases the former is a better embodiment. Based on such understanding, the technical solutions of the present application or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as a ROM / RAM, a magnetic disk, or an optical disk) and includes a plurality of instructions for causing a terminal device (which can be a mobile phone, a computer, a server, or a network device) to execute the method of each embodiment of the present application.
[0095] Embodiment 3
[0096] According to the embodiments of the present application, a processing device for implementing the above-mentioned data processing method is also provided, as shown in Figure 4 The device includes a first acquisition unit 401, a second acquisition unit 402, and a processing unit 403.
[0097] The first acquisition unit 401 is configured to acquire a data processing request of a target object, wherein the data processing request at least includes a field name corresponding to target data to be processed and a processing requirement of the target object on the target data.
[0098] The second acquisition unit 402 is configured to construct a target data model corresponding to the processing requirement of the target data, wherein the target data model includes extension attribute information set according to the processing requirement of the target data, and the extension attribute information is used to extract the target data from a database.
[0099] The processing unit 403 is configured to acquire the target data according to the field name corresponding to the target data and the extension attribute information in the target data model, and to analyze and process the target data to obtain a data processing result.
[0100] In the data processing apparatus provided in the third embodiment of the present application, the first obtaining unit 401 obtains a data processing request of a target object, wherein the data processing request at least includes a field name corresponding to target data to be processed and a processing requirement of the target object on the target data; the second obtaining unit 402 constructs a target data model corresponding to the processing requirement of the target data, wherein the target data model includes extension attribute information set according to the processing requirement of the target data, and the extension attribute information is used to extract the target data from a database; and the processing unit 403 obtains the target data according to the field name corresponding to the target data and the extension attribute information in the target data model, and analyzes and processes the target data to obtain a data processing result. Thus, when the target data needs to be analyzed and processed, if the attribute information of the target data is not included in the current data model, the target data model corresponding to the target data needs to be customized and developed, which leads to a relatively low processing efficiency of the target data. In the present solution, when the processing request of the target object on the target data is detected, the target data model with the extension attribute information set according to the processing requirement of the target data is directly obtained, so that the target data can be directly extracted from the database according to the target data model, avoiding the customization and development of the target data model corresponding to the target data. While ensuring the design standardization, processing standardization and application standardization based on general attributes, the extension attribute configuration is opened to obtain personalized processing attributes, achieving a balance between generalization and customization, and further achieving the effect of improving the processing efficiency of the target data.
[0101] In the data processing apparatus provided in the third embodiment of the present application, the second obtaining unit includes: a first obtaining module, configured to obtain a general data model corresponding to a processing requirement of target data, wherein the data is extracted from a database according to attribute information in the general data model; a receiving module, configured to obtain extension attribute information, wherein the extension attribute information at least includes a field name corresponding to an extension attribute and representation information of the extension attribute; and an adding module, configured to add the extension attribute information to the general data model to obtain a target data model.
[0102] In the data processing apparatus provided in the third embodiment of the present application, the adding module includes: an identifying submodule, configured to identify an attribute type of the extension attribute information, wherein the attribute type is one of the following: a discrete attribute and a numerical attribute; and an adding submodule, configured to add the extension attribute information to a target position of the general data model according to the attribute type to obtain the target data model.
[0103] In the data processing apparatus provided in the third embodiment of the present application, the receiving module includes: a responding submodule, configured to display an adding page in response to an adding request of the target object for adding the extension attribute information after detecting the adding request; and a receiving submodule, configured to obtain the extension attribute information and the attribute type of the extension attribute information through the adding page.
[0104] In the data processing apparatus provided in the third embodiment of the present application, the second obtaining unit comprises: a first determining module, configured to determine a primary key according to the processing requirement and granularity for the target data, wherein the granularity represents a detail level of a business represented in the data model, and the primary key is a unique identifier of the data model; a second determining module, configured to determine target attribute information according to the primary key and the granularity; and a third determining module, configured to assemble a general data model by using the primary key and the target attribute information.
[0105] In the data processing apparatus provided in the third embodiment of the present application, the processing unit comprises: a second obtaining module, configured to obtain initial data from a database according to the entity data model, the entity relationship model and the event model; and a supplement module, configured to supplement the initial data according to the entity relationship model to obtain the target data.
[0106] In the data processing apparatus provided in the third embodiment of the present application, if the processing requirement for the target data is to perform sales analysis on the target commodity, the second obtaining unit comprises: a third obtaining module, configured to construct a target data model corresponding to the processing requirement for the target data, wherein the target data model comprises at least: an entity data model corresponding to the target commodity and an entity relationship data model of the target commodity and the target commodity, an entity data model corresponding to the target object and an entity relationship data model of the target object and the target commodity, and an event data model of the target object selling the target commodity; and the processing unit comprises: a fourth obtaining module, configured to obtain historical sales data of the target commodity according to the entity data model corresponding to the target commodity and the entity relationship data model of the target commodity and the target commodity, the entity data model corresponding to the target object and the entity relationship data model of the target object and the target commodity, and the event data model of the target object selling the target commodity; and the processing unit further comprises: a drawing module, configured to perform chart drawing according to the historical sales data of the target commodity to obtain sales information of the target commodity.
[0107] It should be noted that the first obtaining unit 401, the second obtaining unit 402 and the processing unit 403 correspond to steps S201 to S203 in the first embodiment, and the two modules have the same instances and application scenarios as the corresponding steps, but are not limited to the content disclosed in the above-mentioned first embodiment. It should be noted that the above-mentioned modules or units can be hardware components or software components stored in a memory (for example, the memory 104) and processed by one or more processors (for example, the processors 102a, 102b, …, 102n), and the above-mentioned modules can also be a part of the apparatus and can run in the computer terminal 10 provided in the first embodiment.
[0108] It should be noted that the preferred embodiments involved in the above embodiments of the present application have the same scheme, application scenario and implementation process as provided in Embodiment 1, but are not limited to the scheme provided in Embodiment 1.
[0109] Embodiment 4
[0110] The embodiments of the present application can provide a computer terminal, which can be any computer terminal device in a computer terminal group. Alternatively, in the embodiments, the computer terminal can be replaced by a mobile terminal or other terminal device.
[0111] Alternatively, in the embodiments, the computer terminal can be located in at least one network device of a plurality of network devices of a computer network.
[0112] In the embodiments, the computer terminal can execute program codes of the following steps in the data processing method: obtaining a data processing request of a target object, wherein the data processing request at least includes a field name corresponding to target data to be processed and a processing requirement of the target object on the target data; constructing a target data model corresponding to the processing requirement of the target data, wherein the target data model includes extension attribute information set according to the processing requirement of the target data, and the extension attribute information is used to extract the target data from a database; obtaining the target data according to the field name corresponding to the target data and the extension attribute information in the target data model, and analyzing and processing the target data to obtain a data processing result.
[0113] The computer terminal can execute program codes of the following steps in the data processing method: constructing a target data model corresponding to the processing requirement of the target data includes: obtaining a general data model corresponding to the processing requirement of the target data, wherein data is extracted from a database according to attribute information in the general data model; obtaining extension attribute information, wherein the extension attribute information at least includes a field name corresponding to an extension attribute and representation information of the extension attribute; and adding the extension attribute information to the general data model to obtain the target data model.
[0114] The computer terminal can execute program codes of the following steps in the data processing method: adding the extension attribute information to the general data model to obtain the target data model includes: identifying an attribute type of the extension attribute information, wherein the attribute type is one of the following: discrete attribute and numerical attribute; and adding the extension attribute information to a target position of the general data model according to the attribute type to obtain the target data model.
[0115] The computer terminal can execute program codes of the following steps in the data processing method: obtaining the extended attribute information comprises: after detecting an adding request of the target object for adding the extended attribute information, displaying an adding page in response to the adding request; and obtaining the extended attribute information and an attribute type of the extended attribute information through the adding page.
[0116] The computer terminal can execute program codes of the following steps in the data processing method: obtaining the general data model corresponding to the processing requirement of the target data comprises: determining a primary key according to the processing requirement and granularity of the target data, wherein the granularity represents a detail level of a business represented in the data model, and the primary key is a unique identifier of the data model; determining target attribute information according to the primary key and the granularity; and assembling the general data model through the primary key and the target attribute information.
[0117] The computer terminal can execute program codes of the following steps in the data processing method: the target data model at least comprises: an entity data model, an entity relationship model and an event model, and obtaining the target data according to the field name corresponding to the target data and the extended attribute information in the target data model comprises: obtaining initial data from a database according to the entity data model, the entity relationship model and the event model; and supplementing the initial data according to the entity relationship model to obtain the target data.
[0118] The computer terminal can execute program codes of the following steps in the data processing method: if the processing requirement of the target data is to perform sales analysis on the target commodity, constructing the target data model corresponding to the processing requirement of the target data comprises: constructing the target data model corresponding to the processing requirement of the target data, wherein the target data model at least comprises: an entity data model corresponding to the target commodity and an entity relationship data model of the target commodity and the target commodity, an entity data model corresponding to the target object and an entity relationship data model of the target object and the target commodity, and an event data model of the target object selling the target commodity; and obtaining the target data according to the field name corresponding to the target data and the extended attribute information in the target data model comprises: obtaining historical sales data of the target commodity according to the entity data model corresponding to the target commodity and the entity relationship data model of the target commodity and the target commodity, the entity data model corresponding to the target object and the entity relationship data model of the target object and the target commodity, and the event data model of the target object selling the target commodity; and performing analysis and processing on the target data to obtain a data processing result comprises: performing chart drawing according to the historical sales data of the target commodity to obtain sales information of the target commodity.
[0119] Optionally, Figure 5 is a structural block diagram of a computer terminal according to an embodiment of the present application. As shown in Figure 5As shown, the computer terminal 10 may include: one or more ( Figure 5 (Only one is shown) processor 102, memory 104, memory controller, and peripheral interface, wherein the peripheral interface is connected to the radio frequency module, audio module and display.
[0120] The memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the data processing methods and apparatus in this embodiment. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, thereby realizing the aforementioned data processing methods. The memory may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include memory remotely located relative to the processor, and these remote memories can be connected to the computer terminal 10 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0121] The processor can invoke information and applications stored in memory via a transmission device to perform the following steps: constructing a target data model corresponding to the processing requirements of the target data includes: obtaining a general data model corresponding to the processing requirements of the target data, wherein data is extracted from the database based on the attribute information in the general data model; obtaining extended attribute information, wherein the extended attribute information includes at least the field name corresponding to the extended attribute and the description information of the extended attribute; adding the extended attribute information to the general data model to obtain the target data model.
[0122] Optionally, the processor may also execute program code that performs the following steps: adding extended attribute information to a general data model to obtain a target data model, including: identifying the attribute type of the extended attribute information, wherein the attribute type is one of the following: discrete attribute and numerical attribute; adding the extended attribute information to the target position of the general data model according to the attribute type to obtain the target data model.
[0123] Optionally, the processor may also execute program code that performs the following steps: obtaining extended attribute information includes: responding to the add request and displaying the add page after detecting the add request for the target object's extended attribute information; obtaining the extended attribute information and the attribute type of the extended attribute information through the add page.
[0124] Optionally, the processor can further execute program codes of the following steps: obtaining the general data model corresponding to the processing requirement of the target data comprises: determining the primary key according to the processing requirement and granularity of the target data, wherein the granularity represents the detail level of the business represented in the data model, and the primary key is the unique identifier of the data model; determining the target attribute information according to the primary key and the granularity; and assembling the general data model through the primary key and the target attribute information.
[0125] Optionally, the processor can further execute program codes of the following steps: the target data model at least comprises: an entity data model, an entity relationship model and an event model; and obtaining the target data according to the field name corresponding to the target data and the extension attribute information in the target data model comprises: obtaining initial data from the database according to the entity data model, the entity relationship model and the event model; and supplementing the initial data according to the entity relationship model to obtain the target data.
[0126] Optionally, the processor can further execute program codes of the following steps: if the processing requirement of the target data is to perform sales analysis on the target commodity, constructing the target data model corresponding to the processing requirement of the target data comprises: constructing the target data model corresponding to the processing requirement of the target data, wherein the target data model at least comprises: an entity data model corresponding to the target commodity and an entity relationship data model of the target commodity and the target commodity, an entity data model corresponding to the target object and an entity relationship data model of the target object and the target commodity, and an event data model of the target object selling the target commodity; and obtaining the target data according to the field name corresponding to the target data and the extension attribute information in the target data model comprises: obtaining the historical sales data of the target commodity according to the entity data model corresponding to the target commodity and the entity relationship data model of the target commodity and the target commodity, the entity data model corresponding to the target object and the entity relationship data model of the target object and the target commodity, and the event data model of the target object selling the target commodity; and performing analysis and processing on the target data to obtain the data processing result comprises: performing chart drawing according to the historical sales data of the target commodity to obtain the sales information of the target commodity.
[0127] Those skilled in the art can understand that, Figure 5 The structure shown is only schematic, and the computer terminal can also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a palm computer, a Mobile Internet Device (MID), a PAD, and the like. Figure 5 It does not limit the structure of the above-mentioned electronic device. For example, the computer terminal 10 can further include more or fewer components (such as a network interface, a display device, etc.) than those shown in the figure, or have a structure different from that shown in the figure. Figure 5 It does not limit the structure of the above-mentioned electronic device. For example, the computer terminal 10 can further include more or fewer components (such as a network interface, a display device, etc.) than those shown in the figure, or have a structure different from that shown in the figure.Figure 5 different configurations.
[0128] Those skilled in the art can understand that all or part of the steps in the above-mentioned embodiments can be completed by instructing the terminal device related hardware through a program, and the program can be stored in a computer readable storage medium, which can include a flash disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0129] Embodiment 5
[0130] The embodiments of the present application also provide a computer readable storage medium. Optionally, in the embodiment, the above-mentioned storage medium can be used to save the program code executed by the data processing method provided in the embodiment 1.
[0131] Optionally, in the embodiment, the above-mentioned 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.
[0132] Optionally, in the embodiment, the storage medium is configured to store program code for performing the following steps: constructing a target data model corresponding to the processing requirement of the target data includes: obtaining a general data model corresponding to the processing requirement of the target data, wherein the data is extracted from the database according to the attribute information in the general data model; obtaining extended attribute information, wherein the extended attribute information at least includes the field name corresponding to the extended attribute and the representation information of the extended attribute; adding the extended attribute information to the general data model to obtain the target data model.
[0133] The above-mentioned storage medium is configured to store program code for performing the following steps: adding the extended attribute information to the general data model to obtain the target data model includes: identifying the attribute type of the extended attribute information, wherein the attribute type is one of the following: discrete attribute and numerical attribute; adding the extended attribute information to the target position of the general data model according to the attribute type to obtain the target data model.
[0134] The above-mentioned storage medium is configured to store program code for performing the following steps: obtaining the extended attribute information includes: after detecting the adding request of the target object for adding the extended attribute information, responding to the adding request, displaying an adding page; obtaining the extended attribute information and the attribute type of the extended attribute information through the adding page.
[0135] The storage medium is configured to store program code for performing the following steps: obtaining the general data model corresponding to the processing requirement of the target data includes: determining the primary key according to the processing requirement and granularity of the target data, wherein the granularity represents the detail level of the business represented in the data model, and the primary key is the unique identifier of the data model; determining the target attribute information according to the primary key and the granularity; and assembling the general data model through the primary key and the target attribute information.
[0136] The storage medium is configured to store program code for performing the following steps: the target data model at least includes: an entity data model, an entity relationship model and an event model, and obtaining the target data according to the field name corresponding to the target data and the extension attribute information in the target data model includes: obtaining initial data from the database according to the entity data model, the entity relationship model and the event model; and supplementing the initial data according to the entity relationship model to obtain the target data.
[0137] The storage medium is configured to store program code for performing the following steps: if the processing requirement of the target data is to perform sales analysis on the target commodity, constructing the target data model corresponding to the processing requirement of the target data includes: constructing the target data model corresponding to the processing requirement of the target data, wherein the target data model corresponds to the target data model, and the target data model at least includes: the entity data model corresponding to the target commodity and the entity relationship data model of the target commodity and the target commodity, the entity data model corresponding to the target object and the entity relationship data model of the target object and the target commodity, and the event data model of the target object selling the target commodity; and obtaining the target data according to the field name corresponding to the target data and the extension attribute information in the target data model includes: obtaining the historical sales data of the target commodity according to the entity data model corresponding to the target commodity and the entity relationship data model of the target commodity and the target commodity, the entity data model corresponding to the target object and the entity relationship data model of the target object and the target commodity, and the event data model of the target object selling the target commodity; and performing analysis and processing on the target data to obtain the data processing result includes: performing chart drawing according to the historical sales data of the target commodity to obtain the sales information of the target commodity.
[0138] The sequence numbers of the embodiments of the present application are only for description, and do not represent the advantages and disadvantages of the embodiments.
[0139] In the above embodiments of the present application, the description of each embodiment has its own emphasis, and the parts not described in detail in a certain embodiment can be referred to the related description of other embodiments.
[0140] In several embodiments provided in the present application, it should be understood that the disclosed technology can be implemented by other ways. Among them, the above-described device embodiments are only schematic, for example, the division of the units is only a logical function division, and actual implementation can have another division manner, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the coupling or direct coupling or communication connection between the displayed or discussed units can be indirect coupling or communication connection through some interfaces, units or modules, and can be electrical or other forms.
[0141] The units described as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, i.e., can be located in one place or can be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the embodiment.
[0142] In addition, the functional units in each embodiment of the present application can be integrated in one processing unit, or each unit can be physically present separately, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit.
[0143] The integrated unit, if realized in the form of a software functional unit and sold or used as an independent product, can be stored in a computer readable storage medium. Based on this understanding, the technical solutions of the present application essentially or the part that contributes to the prior art or the whole or part of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium, including a plurality of 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 method described in each embodiment of the present application. The foregoing storage medium includes: a U disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a mobile hard disk, a magnetic disk or an optical disk, and various media that can store program codes.
[0144] The above is only the preferred embodiment of the present application, and it should be pointed out that for ordinary skilled in the art, without departing from the principles of the present application, a number of improvements and refinements can be made, and these improvements and refinements should be considered as the protection scope of the present application.
Claims
1. A data processing method, characterized in that, include: Obtain the data processing request of the target object, wherein the data processing request includes at least the field name corresponding to the target data to be processed and the processing requirements of the target object for the target data; Construct a target data model corresponding to the processing requirements of the target data, wherein the target data model includes extended attribute information set according to the processing requirements of the target data, and the extended attribute information is used to extract the target data from the database; The target data is obtained based on the field names corresponding to the target data and the extended attribute information in the target data model, and the target data is analyzed and processed to obtain the data processing results; The construction of the target data model corresponding to the processing requirements of the target data includes: Based on the processing requirements and granularity of the target data, a primary key is determined, wherein the granularity represents the level of detail of the business represented in the data model, and the primary key is a unique identifier of the data model; The target attribute information is determined based on the primary key and the granularity. A general data model is constructed using the primary key and the target attribute information; Obtain extended attribute information, wherein the extended attribute information includes at least the field name corresponding to the extended attribute and the description information of the extended attribute; The extended attribute information is added to the general data model to obtain the target data model.
2. The data processing method according to claim 1, characterized in that, Adding the extended attribute information to the general data model to obtain the target data model includes: Identify the attribute type of the extended attribute information, wherein the attribute type is one of the following: discrete attribute and numerical attribute; The extended attribute information is added to the target location of the general data model according to the attribute type to obtain the target data model.
3. The data processing method according to claim 1, characterized in that, Retrieving extended attribute information includes: Upon detecting a request to add extended attribute information for the target object, the system responds to the request and displays the add page. The extended attribute information and the attribute type of the extended attribute information are obtained through the added page.
4. The data processing method according to claim 1, characterized in that, The target data model includes at least: an entity data model, an entity relationship model, and an event model. Obtaining the target data based on the field names corresponding to the target data and the extended attribute information in the target data model includes: Initial data is obtained from the database based on the entity data model, the entity relationship model, and the event model; The initial data is supplemented based on the entity relationship model to obtain the target data.
5. The data processing method according to claim 1, characterized in that, If the processing requirement for the target data is: to perform sales analysis on the target product. Constructing a target data model corresponding to the processing requirements of the target data includes: Construct a target data model corresponding to the processing requirements of the target data, wherein the target data model includes at least: an entity data model corresponding to the target product and an entity relationship data model between the target product and the target product, an entity data model corresponding to the target object and an entity relationship data model between the target object and the target product, and an event data model of the target object selling the target product; Obtaining the target data based on the field names corresponding to the target data and the extended attribute information in the target data model includes: Based on the entity data model corresponding to the target product and the entity relationship data model between the target products, the entity data model corresponding to the target object and the entity relationship data model between the target object and the target product, and the event data model of the target object selling the target product, the historical sales data of the target product is obtained; The target data is analyzed and processed to obtain the following data processing results: Charts are drawn based on the historical sales data of the target product to obtain sales information of the target product.
6. A data processing method, characterized in that, include: Obtain the data processing request for the target object sent by the client, wherein the data processing request includes at least the field name corresponding to the target data to be processed and the processing requirements of the target object for the target data; A target data model corresponding to the processing requirements of the target data is constructed in a cloud server. The target data model includes extended attribute information set according to the processing requirements of the target data. The extended attribute information is used to extract the target data from the database, obtain the target data according to the field name corresponding to the target data and the extended attribute information in the target data model, and analyze and process the target data to obtain the data processing result. The data processing result is returned to the client. The construction of the target data model corresponding to the processing requirements of the target data includes: Based on the processing requirements and granularity of the target data, a primary key is determined, wherein the granularity represents the level of detail of the business represented in the data model, and the primary key is a unique identifier of the data model; The target attribute information is determined based on the primary key and the granularity. A general data model is constructed using the primary key and the target attribute information; Obtain extended attribute information, wherein the extended attribute information includes at least the field name corresponding to the extended attribute and the description information of the extended attribute; The extended attribute information is added to the general data model to obtain the target data model.
7. A data processing apparatus, characterized in that, include: The first acquisition unit is used to acquire the data processing request of the target object, wherein the data processing request includes at least the field name corresponding to the target data to be processed and the processing requirements of the target object for the target data; The second acquisition unit is used to construct a target data model corresponding to the processing requirements of the target data, wherein the target data model includes extended attribute information set according to the processing requirements of the target data, and the extended attribute information is used to extract the target data from the database; The processing unit is used to obtain the target data based on the field name corresponding to the target data and the extended attribute information in the target data model, and to analyze and process the target data to obtain the data processing result; The second acquisition unit is further configured to: determine a primary key based on the processing requirements and granularity of the target data, wherein the granularity represents the level of detail of the business represented in the data model, and the primary key is a unique identifier of the data model; determine target attribute information based on the primary key and the granularity; construct a general data model using the primary key and the target attribute information; acquire extended attribute information, wherein the extended attribute information includes at least the field name corresponding to the extended attribute and the description information of the extended attribute; and add the extended attribute information to the general data model to obtain the target data model.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored executable program, wherein, when the executable program is executed, it controls the device on which the storage medium is located to perform the data processing method according to any one of claims 1 to 6.
9. An electronic device, characterized in that, include: Memory, which stores executable programs; A processor for running the program, wherein the program, when running, performs the data processing method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Data extension method and device, storage medium and electronic device
CN112162731A
Dynamic modeling method and system for business object
CN115543960A