Business data processing method and device, medium and electronic equipment
By calling pre-customized target class encapsulated arithmetic operation logic in business data processing, the problem of users needing to frequently set arithmetic logic to increase workload is solved, data processing efficiency and quality are improved, and the simplicity and rationality of the code is achieved. .
Patent Information
- Application Number
- CN202411330027.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-24
- Publication Date
- 2024-12-13
AI Technical Summary
In business data processing scenarios, users need to set arithmetic logic for each arithmetic operation, which increases work burden and is difficult to ensure the rationality of the logic, affecting efficiency.
By calling pre-customized target classes, arithmetic operation logic is encapsulated, including data type conversion, custom operations, basic operations, complex operations and statistical analysis logic, reducing the user's need to set logic in the code and improving code simplicity and maintenance. sex.
It improves the efficiency and quality of business data processing, reduces the risk of unreasonable or errors in arithmetic logic, and makes the code more modular and easy to maintain.
Smart Images

Figure CN119127920A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer and data processing technology, and in particular to a business data processing method, device, medium and electronic device. Background Art
[0002] At present, in business data processing scenarios, for example, in data processing scenarios for enterprise management data, product sales management data, supply chain management data, and inventory management data, there are many scenarios that require arithmetic operations on data. In this scenario, users need to set arithmetic operation logic for each arithmetic operation to ensure the normal processing of business data. However, users setting arithmetic operation logic for each arithmetic operation not only increases the user's workload, but also makes it difficult to ensure the rationality of the arithmetic operation logic setting. If the arithmetic operation logic is unreasonable or there are errors, it will greatly affect the efficiency of business data processing. Based on this, how to improve the efficiency of business data processing is a technical problem that needs to be solved urgently. Summary of the invention
[0003] The embodiments of the present application provide a business data processing method, device, computer program product or computer program, computer-readable storage medium and electronic device, which can improve the efficiency of business data processing at least to a certain extent.
[0004] Other features and advantages of the present application will become apparent from the following detailed description, or may be learned in part by the practice of the present application.
[0005] According to one aspect of an embodiment of the present application, a business data processing method is provided, the method comprising: obtaining basic business data to be processed from a target database, the target database comprising any one of an enterprise management database, a product sales management database, a supply chain management database, and an inventory management database; calling at least one pre-defined target class, the target class being used to encapsulate arithmetic operation logic; performing arithmetic operations on the basic business data according to the arithmetic operation logic in the at least one target class to obtain business plan data.
[0006] In some embodiments of the present application, based on the aforementioned scheme, the calling of at least one pre-customized target class includes: determining the at least one target class from a target class library, the target class library including multiple predefined classes, wherein different predefined classes correspond to encapsulating different arithmetic operation logics; calling the at least one target class, wherein in the process of calling the at least one target class, the set parameters and configuration options are passed to execute the arithmetic operation logic encapsulated by each target class.
[0007] In some embodiments of the present application, based on the aforementioned scheme, the multiple predefined classes include at least data type conversion logic, custom operation logic, basic operation logic, complex operation logic, data conversion logic, and statistical analysis logic for the basic business data.
[0008] In some embodiments of the present application, based on the aforementioned scheme, the predefined class also includes filtering logic for basic business data, which is used to preprocess the basic business data before performing arithmetic operations, and the preprocessing includes: screening out basic business data that meets the requirements according to preset conditions; interpolating or deleting null values; detecting and processing abnormal values; and grouping or aggregating the basic business data according to set rules.
[0009] In some embodiments of the present application, based on the aforementioned scheme, the data type conversion logic includes: converting the data type of the basic business data according to the implicit conversion rules to obtain the basic business data after the data type conversion, and the basic business data after the data type conversion is used to perform any one of basic operations, complex operations, data conversion, and statistical analysis.
[0010] In some embodiments of the present application, based on the aforementioned scheme, the custom operation logic includes: defining the sum of a null value and a null value as a null value, defining the sum of a null value and a 0 value as a 0 value; defining the sum of an abnormal value and a null value as an abnormal value, defining the sum of an abnormal value and a 0 value as an abnormal value, and the sum of an abnormal value and an abnormal value as an abnormal value; defining the result value of an illegal operation as an abnormal value.
[0011] In some embodiments of the present application, based on the aforementioned scheme, the method also includes visually displaying the business plan data to facilitate user analysis and decision-making, and the visual display includes: generating a set chart, the set icons include a line chart, a bar chart, a pie chart and a scatter chart; drilling and filtering the business plan data for the user to view detailed data.
[0012] In some embodiments of the present application, based on the aforementioned solution, the method is executed in any one of the C language environment, C++ language environment, Java language environment, and C# language environment.
[0013] According to one aspect of an embodiment of the present application, a business data processing device is provided, the device comprising: an acquisition unit, used to acquire basic business data to be processed from a target database, the target database comprising any one of an enterprise management database, a product sales management database, a supply chain management database, and an inventory management database; a calling unit, used to call at least one pre-defined target class, the target class being used to encapsulate arithmetic operation logic; an operation unit, used to perform arithmetic operations on the basic business data according to the arithmetic operation logic in the at least one target class to obtain business plan data.
[0014] According to one aspect of the embodiments of the present application, a computer program product or a computer program is provided, the computer program product or the computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the method described in the above embodiments.
[0015] According to one aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method described in the above embodiment is implemented.
[0016] According to one aspect of an embodiment of the present application, an electronic device is provided, comprising: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the methods described in the above embodiments.
[0017] Based on the technical solution proposed in this application, by calling at least one pre-defined target class for encapsulating arithmetic operation logic, and performing arithmetic operation on the basic business data to be processed obtained from the target database according to the arithmetic operation logic in the at least one target class, business plan data is obtained, that is, through one or more classes specifically used to process arithmetic operations, the program can call these classes to perform corresponding arithmetic operations when it is running. The advantage is that the logic of arithmetic operations can be separated from the code of other parts, making the code more modular and easy to maintain, without the user having to set the arithmetic operation logic for each arithmetic operation in the code, thereby improving the simplicity of the code, reducing the workload of users, and ensuring the rationality of the arithmetic operation logic setting, thereby reducing the risk of unreasonable or erroneous arithmetic operation logic, and can greatly improve the efficiency and quality of business data processing.
[0018] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] The drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present application, and together with the specification, are used to explain the principles of the present application. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. In the drawings:
[0020] Figure 1 A system architecture diagram showing the technical solution of the embodiment of the present application can be applied;
[0021] Figure 2 A flowchart of a method for processing business data according to an embodiment of the present application is shown;
[0022] Figure 3 A block diagram of a service data processing device according to an embodiment of the present application is shown;
[0023] Figure 4 A schematic diagram of the structure of a computer system suitable for implementing an electronic device of an embodiment of the present application is shown. DETAILED DESCRIPTION
[0024] Example embodiments will now be described more fully with reference to the accompanying drawings. However, example embodiments can be implemented in a variety of forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this application will be more comprehensive and complete and fully convey the concept of the example embodiments to those skilled in the art.
[0025] In addition, described feature, structure or characteristic can be combined in one or more embodiments in any suitable manner. In the following description, many specific details are provided to provide a full understanding of the embodiments of the present application. However, those skilled in the art will appreciate that the technical scheme of the present application can be put into practice without one or more of the specific details, or other methods, components, devices, steps, etc. can be adopted. In other cases, known methods, devices, realizations or operations are not shown or described in detail to avoid blurring the various aspects of the application.
[0026] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0027] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.
[0028] It should be noted that the "multiple" mentioned in this article refers to two or more. "And / or" describes the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are in an "or" relationship.
[0029] Figure 1 A schematic diagram of an exemplary system architecture to which the technical solution of the embodiments of the present application can be applied is shown.
[0030] like Figure 1 As shown, the system architecture may include terminal devices (such as Figure 1 The embodiment of the present invention is a network 104 and a server 105. The network 104 is a medium for providing a communication link between the terminal device and the server 105. The network 104 may include various connection types, such as a wired communication link, a wireless communication link, etc.
[0031] It should be noted that the business data processing method provided in the embodiment of the present application can be executed by a terminal device, and accordingly, the business data processing device is generally arranged in the terminal device.
[0032] It should also be noted that Figure 1 The number of terminal devices, networks and servers in the description is only for illustration. According to the implementation requirements, the server can be an independent physical server, a server cluster or a distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms.
[0033] At present, in business data processing scenarios, for example, in data processing scenarios for enterprise management data, product sales management data, supply chain management data, and inventory management data, there are many scenarios where arithmetic operations need to be performed on the data. In this scenario, the user needs to set the arithmetic operation logic for each arithmetic operation to ensure the normal processing of the business data. However, the user sets the arithmetic operation logic for each arithmetic operation, which not only increases the user's workload, but also makes it difficult to ensure the rationality of the arithmetic operation logic setting. If the arithmetic operation logic is unreasonable or there are errors, it will greatly affect the efficiency of business data processing. In this case, the present application proposes a business data processing solution to improve the efficiency of business data processing.
[0034] The implementation details of the technical solution of the embodiment of the present application are described in detail below:
[0035] Figure 2 A flowchart of a business data processing method according to an embodiment of the present application is shown. The business data processing method can be executed by a device having a computing and processing function, such as Figure 1 Refer to the terminal device shown in Figure 2 As shown, the business data processing method at least includes steps 210 to 230, which are described in detail as follows:
[0036] In step 210, basic business data to be processed is obtained from a target database, wherein the target database includes any one of an enterprise management database, a product sales management database, a supply chain management database, and an inventory management database.
[0037] It should be noted that basic business data refers to the core data generated and used by an enterprise or organization in the daily operation process. These data are usually basic records of business activities and cover all aspects of enterprise operations. Basic business data can provide the necessary basis for the strategic and tactical decisions of an enterprise. For example, sales data can help an enterprise understand market demand and adjust production and inventory strategies. In order to enable those skilled in the art to better understand this application, the data in the product sales management database is used as a specific embodiment for explanation in conjunction with Table 1.
[0038]
[0039] Table 1
[0040] As shown in Table 1, the basic business data may include the revenue amount X of each store in the n-1 year, the cost amount Y of each store in the n-1 year, and the profit growth proportion plan Z of each store. After the basic business data to be processed is obtained from the target database, the basic business data may be stored in a temporary data storage area for subsequent calling and processing.
[0041] It should be noted that the business data in Table 1 above are only provided for the purpose of assisting in explaining the basic business data and do not have any actual business significance.
[0042] Continue to refer to Figure 2 In step 220, at least one pre-defined target class is called, and the target class is used to encapsulate arithmetic operation logic.
[0043] In the present application, at least one predefined target class can be called, the main purpose of which is to encapsulate and manage the logic of arithmetic operations. Specifically, through one or more classes specifically used to process arithmetic operations, these classes can be called to perform corresponding arithmetic operations when the program is running. The advantage is that the logic of arithmetic operations can be separated from the code of other parts, making the code more modular and easy to maintain, without the user having to set the arithmetic operation logic for each arithmetic operation in the code, thereby improving the simplicity of the code, while reducing the user's workload, ensuring the rationality of the arithmetic operation logic setting, thereby reducing the risk of unreasonable or erroneous arithmetic operation logic, and can greatly improve the efficiency and quality of business data processing.
[0044] In the present application, the calling of at least one pre-defined target class is performed according to the following steps 221 to 222:
[0045] Step 221 : determining the at least one target class from a target class library, wherein the target class library includes a plurality of predefined classes, wherein different predefined classes encapsulate different arithmetic operation logics.
[0046] Step 222: calling the at least one target class, wherein, in the process of calling the at least one target class, the set parameters and configuration options are passed to execute the arithmetic operation logic encapsulated by each target class.
[0047] In the present application, multiple predefined classes may be predefined and placed in a target class library, so that at least one target class may be determined from the multiple predefined classes in the target class library according to actual business needs.
[0048] In addition, when calling the target class, some specific parameters and configuration options need to be passed to the target class to execute the arithmetic operation logic encapsulated by each target class (that is, to ensure that it can perform data calculation and processing tasks in the expected manner).
[0049] In the present application, the multiple predefined classes may at least include data type conversion logic, custom operation logic, basic operation logic, complex operation logic, data conversion logic, and statistical analysis logic for the basic business data.
[0050] Specifically, the data type conversion logic may include the following step 2211:
[0051] Step 2211, convert the data type of the basic business data according to the implicit conversion rule to obtain the basic business data after the data type conversion, and the basic business data after the data type conversion is used for any one of basic calculations, complex calculations, data conversion, and statistical analysis.
[0052] It should be noted that in some language environments, it is limited that the data for arithmetic operations must maintain the same data type. However, in actual situations, among the basic business data obtained, the data types of the basic business data involved in a certain arithmetic operation are not the same. Therefore, before performing arithmetic operations on these basic business data, the data types of these basic business data need to be converted to unify the data types. Data type conversion itself is a kind of arithmetic operation.
[0053] In order to enable those skilled in the art to better understand the present application, the implicit conversion rules involved in the technical solution in the present application are introduced below in conjunction with Table 2.
[0054] See Table 2, which shows an implicit conversion rule table according to an embodiment of the present application.
[0055]
[0056]
[0057] Table 2
[0058] As shown in Table 2, the implicit conversion rules may be specifically:
[0059] If you perform an operation on data of the data type "Interger" and data of the data type "Interger", you get an operation result of the data type "Interger";
[0060] If you perform operations on data of the "Long" data type and data of the "Interger" data type, you need to convert the data of the "Interger" data type into data of the "Long" data type before performing the operations to obtain the operation result of the "Long" data type.
[0061] If you perform an operation on data of the "Long" data type and data of the "Long" data type, you get an operation result of the "Long" data type;
[0062] If you perform an operation on data of the "BigInteger" data type and data of the "Interger" data type, you need to convert the data of the "Interger" data type into data of the "BigInteger" data type before performing the operation to obtain the operation result of the "BigInteger" data type.
[0063] If you perform an operation on data of the "BigInteger" data type and data of the "Long" data type, you need to convert the data of the "Long" data type into data of the "BigInteger" data type before performing the operation to obtain the operation result of the "BigInteger" data type.
[0064] If you perform an operation on data of the "BigInteger" data type and data of the "BigInteger" data type, you get an operation result of the "BigInteger" data type;
[0065] If you perform operations on data of the "BigDecimal" data type and data of the "Interger" data type, you need to convert the data of the "Interger" data type into data of the "BigDecimal" data type before performing the operations to obtain the operation result of the "BigDecimal" data type.
[0066] If you perform operations on data of the "BigDecimal" data type and data of the "Long" data type, you need to convert the data of the "Long" data type into data of the "BigDecimal" data type before performing the operations to obtain the operation result of the "BigDecimal" data type.
[0067] If you want to perform operations on data with the BigDecimal data type and data with the BigInteger data type, you need to convert the BigInteger data type to BigDecimal data type before performing the operations to obtain the operation result with the BigDecimal data type.
[0068] If you perform an operation on data of the "BigDecimal" data type and data of the "BigDecimal" data type, you get an operation result of the "BigDecimal" data type;
[0069] If you perform operations on data of the "Double" data type and data of the "Interger" data type, you need to convert the data of the "Interger" data type into data of the "Double" data type before performing the operation to obtain the operation result of the "Double" data type;
[0070] If you perform an operation on data of the "Double" data type and data of the "Long" data type, you need to convert the data of the "Long" data type into data of the "Double" data type before performing the operation to obtain the operation result of the "Double" data type;
[0071] If you perform an operation on data of the "Double" data type and data of the "BigInteger" data type, you need to convert the data of the "BigInteger" data type into data of the "Double" data type before performing the operation to obtain the operation result of the "Double" data type;
[0072] If you perform operations on data of the "Double" data type and data of the "BigDecimal" data type, you need to convert the data of the "BigDecimal" data type into data of the "Double" data type before performing the operation to obtain the operation result of the "Double" data type;
[0073] If you perform an operation on data of the "Double" data type and data of the "Double" data type, you get an operation result of the "Double" data type;
[0074] In the present application, by defining a predefined class for the above-mentioned data type conversion logic, the code of the data type conversion logic is separated from the code of other parts, thereby making the code more modular and easy to maintain, without the user having to set the arithmetic operation logic for each arithmetic operation in the code, thereby improving the simplicity of the code, while reducing the user's workload, ensuring the rationality of the data type conversion logic setting, thereby reducing the risk of unreasonable data type conversion logic caused by arbitrary settings by the user (for example, converting data with a data type of "Interger" and data with a data type of "Interger" for arithmetic operations into data with a data type of "BigInteger", thereby increasing unnecessary computing resource burden and storage resource burden) or errors, which can greatly improve the efficiency and quality of business data processing.
[0075] Specifically, the custom operation logic may include at least the following:
[0076] The first one defines the sum of null value and null value as null value, and the sum of null value and 0 value as 0 value.
[0077] The second method is to define the sum of the outlier value and the null value as the outlier value, the sum of the outlier value and the 0 value as the outlier value, and the sum of the outlier value and the outlier value as the outlier value.
[0078] The third method is to define the result value of an illegal operation as an abnormal value.
[0079] In the present application, by defining a predefined class for the above-mentioned custom operation logic, the code of the custom operation logic is separated from the code of other parts, thereby making the code more modular and easy to maintain, without the user having to set the arithmetic operation logic for each arithmetic operation in the code, thereby improving the simplicity of the code. While reducing the user's workload, the rationality of the custom operation logic setting is ensured, thereby reducing the risk of unreasonable custom operation logic (for example, the result value of an illegal operation (such as division by 0) is not defined as an abnormal value. In this case, when performing an arithmetic operation, an additional abnormal value will not be returned but a prompt will be given to interrupt the calculation) or errors, which can greatly improve the efficiency and quality of business data processing.
[0080] In the present application, the basic operation logic may include at least arithmetic operation logic such as addition, subtraction, multiplication and division; the complex operation logic may include at least arithmetic operation logic such as weighted average, moving average and exponential smoothing; the statistical analysis logic may include at least arithmetic operation logic such as standard deviation, variance and regression analysis; the statistical analysis logic may include at least arithmetic operation logic such as normalization and standardization.
[0081] In order to enable those skilled in the art to better understand the present application, the embodiment of Table 1 above is continued as a reference. Based on the embodiment in Table 1, the basic operation logic is: the planned profit F of store m in the nth year = (the revenue amount X of store m in the n-1th year - the cost amount Y of store m in the n-1th year) × the profit growth proportion plan Z of store m.
[0082] In the present application, the predefined class also includes filtering logic for basic business data, which is used to preprocess the basic business data before performing arithmetic operations. The preprocessing may include at least the following:
[0083] The first one is to filter out basic business data that meets the requirements based on preset conditions.
[0084] The second method is to interpolate or delete null values.
[0085] The third method is to detect and process outliers.
[0086] The fourth method is to group or aggregate basic business data according to set rules.
[0087] Continue to refer to Figure 2 In step 230, an arithmetic operation is performed on the basic business data according to the arithmetic operation logic in the at least one target class to obtain business plan data.
[0088] In the present application, taking the data in the product sales management database as an example, the business plan data may at least include sales forecast data, such as sales volume, sales volume and sales trend in a future period of time.
[0089] In the present application, taking the data in the inventory management database as an example, the business plan data may at least include inventory demand data, such as inventory replenishment plan, inventory turnover rate and safety stock for a period of time in the future.
[0090] In the present application, the method may further include visually displaying the business plan data to facilitate analysis and decision-making by the user, and the visual display may include at least the following:
[0091] The first one is to generate a setting chart, wherein the setting chart includes a line chart, a bar chart, a pie chart and a scatter chart.
[0092] The second method is to drill down and filter the business plan data so that the user can view the detailed data.
[0093] In the present application, the business data processing method can be executed in any one of the C language environment, C++ language environment, Java language environment, and C# language environment.
[0094] The following describes an apparatus embodiment of the present application, which can be used to execute the business data processing method in the above-mentioned embodiment of the present application. For details not disclosed in the apparatus embodiment of the present application, please refer to the above-mentioned embodiment of the business data processing method of the present application.
[0095] Figure 3 A block diagram of a business data processing device according to an embodiment of the present application is shown.
[0096] Reference Figure 3 As shown, a business data processing device 300 according to an embodiment of the present application includes: an acquisition unit 301, a calling unit 302 and a calculation unit 303.
[0097] Among them, the acquisition unit 301 is used to obtain the basic business data to be processed from the target database, and the target database includes any one of an enterprise management database, a product sales management database, a supply chain management database, and an inventory management database; the calling unit 302 is used to call at least one pre-defined target class, and the target class is used to encapsulate arithmetic operation logic; the operation unit 303 is used to perform arithmetic operations on the basic business data according to the arithmetic operation logic in the at least one target class to obtain business plan data.
[0098] In some embodiments of the present application, based on the aforementioned scheme, the calling unit 302 is configured to: determine the at least one target class from the target class library, the target class library including multiple predefined classes, wherein different predefined classes correspond to encapsulate different arithmetic operation logics; call the at least one target class, wherein, in the process of calling the at least one target class, set parameters and configuration options are passed to execute the arithmetic operation logic encapsulated by each target class.
[0099] In some embodiments of the present application, based on the aforementioned scheme, the multiple predefined classes include at least data type conversion logic, custom operation logic, basic operation logic, complex operation logic, data conversion logic, and statistical analysis logic for the basic business data.
[0100] In some embodiments of the present application, based on the aforementioned scheme, the predefined class also includes filtering logic for basic business data, which is used to preprocess the basic business data before performing arithmetic operations, and the preprocessing includes: screening out basic business data that meets the requirements according to preset conditions; interpolating or deleting null values; detecting and processing abnormal values; and grouping or aggregating the basic business data according to set rules.
[0101] In some embodiments of the present application, based on the aforementioned scheme, the data type conversion logic includes: converting the data type of the basic business data according to the implicit conversion rules to obtain the basic business data after the data type conversion, and the basic business data after the data type conversion is used to perform any one of basic operations, complex operations, data conversion, and statistical analysis.
[0102] In some embodiments of the present application, based on the aforementioned scheme, the custom operation logic includes: defining the sum of a null value and a null value as a null value, defining the sum of a null value and a 0 value as a 0 value; defining the sum of an abnormal value and a null value as an abnormal value, defining the sum of an abnormal value and a 0 value as an abnormal value, and the sum of an abnormal value and an abnormal value as an abnormal value; defining the result value of an illegal operation as an abnormal value.
[0103] In some embodiments of the present application, based on the aforementioned scheme, the method also includes visually displaying the business plan data to facilitate user analysis and decision-making, and the visual display includes: generating a set chart, the set icons include a line chart, a bar chart, a pie chart and a scatter chart; drilling and filtering the business plan data for the user to view detailed data.
[0104] In some embodiments of the present application, based on the aforementioned solution, the method is executed in any one of the C language environment, C++ language environment, Java language environment, and C# language environment.
[0105] As another embodiment of the present application, a computer program product or a computer program is also provided, the computer program product or the computer program includes a computer instruction, and the computer instruction is stored in a computer-readable storage medium. The processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the method described in the above embodiment.
[0106] Based on the same inventive concept, the embodiment of the present application also provides an electronic device. Figure 4 , shows a schematic diagram of the structure of an electronic device in an embodiment of the present application, wherein the electronic device includes one or more memories 404, one or more processors 402, and at least one computer program (program code) stored in the memories 404 and executable on the processors 402, and when the processors 402 execute the computer programs, the method described above is implemented.
[0107] Among them, Figure 4 In the embodiment of the present invention, a bus architecture (represented by bus 400) is shown, which may include any number of interconnected buses and bridges, and bus 400 links various circuits including one or more processors represented by processor 402 and memory represented by memory 404. Bus 400 may also link various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. Bus interface 405 provides an interface between bus 400 and receiver 401 and transmitter 403. Receiver 401 and transmitter 403 may be the same element, namely a transceiver, providing a unit for communicating with various other devices over a transmission medium. Processor 402 is responsible for managing bus 400 and general processing, while memory 404 may be used to store data used by processor 402 when performing operations.
[0108] As another embodiment of the present application, a computer-readable storage medium is also provided, which may be included in the electronic device described in the above embodiment; or may exist independently without being assembled into the electronic device. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed by an electronic device, the electronic device implements the method described in the above embodiment.
[0109] The functions described herein may be implemented in hardware, software executed by a processor, firmware, or any combination thereof. If implemented in software executed by a processor, the functions may be stored as one or more instructions or codes on a computer-readable medium or transmitted via a computer-readable medium. Other examples and implementations are within the scope and spirit of the present application and the appended claims. For example, due to the nature of software, the functions described above may be implemented using software executed by a processor, hardware, firmware, hard wiring, or a combination of any of these. In addition, each functional unit may be integrated into a processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit.
[0110] In the several embodiments provided in this 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 schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. 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 is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0111] The units described as separate components may or may not be physically separated, and the components of the control device may or may not be physical units, that is, they may be located in one place or distributed in multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0112] If the 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 this understanding, the technical solution of the present application, 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, and the computer software product is stored in a storage medium, including instructions for making a computer device (which can be a personal computer, server or network device, etc.) perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program codes.
[0113] The above description is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent substitution, improvement, etc. made within the spirit and principle of the present application shall be included in the scope of the claims of the present application.
Claims
1. A business data processing method, characterized in that: The method comprises: Acquire the basic business data to be processed from the target database, wherein the target database includes any one of an enterprise management database, a product sales management database, a supply chain management database, and an inventory management database; Calling at least one pre-defined target class, where the target class is used to encapsulate arithmetic operation logic; According to the arithmetic operation logic in the at least one target class, an arithmetic operation is performed on the basic business data to obtain business plan data.
2. The method according to claim 1, characterized in that The calling of at least one pre-defined target class includes: Determine the at least one target class from a target class library, wherein the target class library includes a plurality of predefined classes, wherein different predefined classes encapsulate different arithmetic operation logics; The at least one target class is called, wherein, in the process of calling the at least one target class, set parameters and configuration options are passed to execute the arithmetic operation logic encapsulated by each target class.
3. The method according to claim 2, characterized in that The multiple predefined classes at least include data type conversion logic, custom operation logic, basic operation logic, complex operation logic, data conversion logic, and statistical analysis logic for the basic business data.
4. The method according to claim 3, characterized in that The predefined class also includes filtering logic for basic business data, which is used to preprocess the basic business data before performing arithmetic operations, and the preprocessing includes: Filter out basic business data that meets the requirements according to preset conditions; Interpolate or delete null values; Detect and handle outliers; Group or aggregate basic business data according to set rules.
5. The method according to claim 3, characterized in that: The data type conversion logic includes: According to the implicit conversion rules, the data type of the basic business data is converted to obtain the basic business data after the data type conversion. The basic business data after the data type conversion is used for any one of basic calculations, complex calculations, data conversion, and statistical analysis.
6. The method according to claim 3, characterized in that The custom operation logic includes: Define the sum of null value and null value as null value, and define the sum of null value and 0 value as 0 value; The sum of the outlier value and the null value is defined as the outlier value, the sum of the outlier value and the 0 value is defined as the outlier value, and the sum of the outlier value and the outlier value is defined as the outlier value; Define the result value of an illegal operation as an abnormal value.
7. The method according to claim 1, characterized in that The method further includes visually displaying the business plan data to facilitate analysis and decision making by a user, wherein the visual display includes: Generate a set chart, wherein the set chart includes a line chart, a bar chart, a pie chart and a scatter chart; The business plan data is drilled and filtered to allow the user to view detailed data.
8. The method according to claim 1, characterized in that The method is executed in any one of the C language environment, the C++ language environment, the Java language environment, and the C# language environment.
9. A business data processing device, characterized in that: The device comprises: An acquisition unit, used for acquiring the basic business data to be processed from a target database, wherein the target database includes any one of an enterprise management database, a product sales management database, a supply chain management database, and an inventory management database; A calling unit, used to call at least one pre-defined target class, where the target class is used to encapsulate arithmetic operation logic; The operation unit is used to perform arithmetic operation on the basic business data according to the arithmetic operation logic in the at least one target class to obtain business plan data.
10. An electronic device, characterized in that: The electronic device includes one or more processors and one or more memories, wherein the one or more memories store at least one program code, and the at least one program code is loaded and executed by the one or more processors to implement the operations performed by the method according to any one of claims 1 to 7.
