Business data processing method and device, electronic equipment and storage medium
By using mapping rules in the extended configuration table in the order system, multiple business logic models are mapped to fewer physical models, the resource waste caused by too many business line fields in the prior art is solved, and data processing performance and utilization of physical fields are improved.
Patent Information
- Application Number
- CN202311543728.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-17
- Publication Date
- 2025-05-20
AI Technical Summary
In the prior art, there are too many fields that need to be set for each business line, resulting in waste of storage layer fields of the order system, affecting data processing performance and causing waste of storage resources.
By receiving service processing instructions, the logical model information of the pending service data is determined, and the corresponding mapping rules are determined in the pre-built extended configuration table. This mapping rule reflects the correspondence between the business logic model and the physical fields in the target physical model. The number of target physical models is smaller than the number of business logic models, allowing different business logic models to share the same physical fields.
Improves the utilization of physical fields and the performance of data processing operations, and avoids waste of resources.
Smart Images

Figure CN120020751A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the technical field of data processing, and in particular, to a method, apparatus, electronic device, and storage medium for processing service data. Background Art
[0002] In the process of building an order system, it involves the process of processing service data corresponding to multiple service lines respectively. In the prior art, for the service data corresponding to each service line, corresponding independent fields are set, and the writing and reading of service data are completed through the fields.
[0003] However, in the process of implementing the present invention, it is found that the prior art has at least the following technical problems: Since there are thousands of fields that need to be set for each service line, setting corresponding independent fields for each service line will cause waste of fields in the storage layer of the order system, affect the data processing performance of the order system, and cause waste of storage resources. Summary of the Invention
[0004] Embodiments of the present invention provide a method, apparatus, electronic device, and storage medium for processing service data to avoid resource waste and achieve the purpose of improving the utilization rate of physical fields and data processing operation performance.
[0005] According to one aspect of the present invention, there is provided a method for processing service data, including:
[0006] Receiving a service processing instruction for processing service data to be processed, and based on the service processing instruction, determining model information of a to-be-processed logic model corresponding to the service data to be processed;
[0007] Based on the model information, determining a to-be-processed mapping rule corresponding to the service data to be processed in a pre-constructed extended configuration table;
[0008] Wherein, the extended configuration table includes at least one mapping rule, and each mapping rule is used to reflect the correspondence between a service logic model corresponding to a service line and physical fields in a target physical model; the number of the target physical models is less than the number of the service logic models;
[0009] Based on the to-be-processed mapping rule, performing a service processing operation on the service data to be processed in corresponding to-be-processed physical fields.
[0010] According to another aspect of the present invention, there is provided a service data processing apparatus, and the apparatus includes:
[0011] A service processing instruction receiving module, configured to receive a service processing instruction for performing data processing on service data to be processed, and determine model information of a to-be-processed logic model corresponding to the service data to be processed based on the service processing instruction;
[0012] A to-be-processed mapping rule determining module, configured to determine a to-be-processed mapping rule corresponding to the service data to be processed in a pre-constructed extended configuration table based on the model information;
[0013] Wherein, the extended configuration table includes at least one mapping rule, and each mapping rule is used to reflect the correspondence between a service logic model corresponding to a service line and physical fields in a target physical model; the number of the target physical models is less than the number of the service logic models;
[0014] A data processing module, configured to perform a service processing operation on the service data to be processed in corresponding to-be-processed physical fields based on the to-be-processed mapping rule.
[0015] According to another aspect of the present invention, there is provided an electronic device, where the electronic device includes:
[0016] At least one processor; and
[0017] A memory communicatively connected to the at least one processor; wherein,
[0018] The memory stores a computer program executable by the at least one processor, and when the computer program is executed by the at least one processor, the at least one processor is enabled to execute the service data processing method according to any embodiment of the present invention.
[0019] According to another aspect of the present invention, there is provided a computer-readable storage medium, where the computer-readable storage medium stores computer instructions, and when the computer instructions are executed by a processor, the service data processing method according to any embodiment of the present invention is implemented.
[0020] In the technical solution of the embodiment of the present invention, a service processing instruction for performing data processing on service data to be processed is received. Through the service processing instruction, model information of a to-be-processed logic model corresponding to the service data to be processed is determined; based on the model information, a to-be-processed mapping rule corresponding to the service data to be processed is determined in a pre-constructed extended configuration table; wherein, the extended configuration table includes at least one mapping rule. Since each mapping rule can reflect the correspondence between the service logic model corresponding to a service line and the physical fields of the target physical model, and the number of target physical models is less than the number of service logic models, it shows that different service logic models can correspond to the same target physical model, and the service data corresponding to different service lines can share the physical fields of the same physical model. Therefore, when performing service processing operations on the service data to be processed in the corresponding to-be-processed physical fields through the to-be-processed mapping rule, the utilization rate of the physical fields and the performance of the data processing operations are improved, and resource waste is avoided.
[0021] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present invention, nor is it used to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. Brief Description of the Drawings
[0022] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0023] Figure 1 is a flowchart of a service data processing method provided according to an embodiment of the present invention;
[0024] Figure 2 is a flowchart of another service data processing method provided according to an embodiment of the present invention;
[0025] Figure 3 is a flowchart of yet another service data processing method provided according to an embodiment of the present invention;
[0026] Figure 4 is a schematic diagram of a new pop-up window for extended fields provided according to an embodiment of the present invention;
[0027] Figure 5 is a schematic diagram of a data writing process provided according to an embodiment of the present invention;
[0028] Figure 6 is a schematic diagram of a data query process provided according to an embodiment of the present invention;
[0029] Figure 7 It is a schematic diagram of field usage statistics provided according to an embodiment of the present invention;
[0030] Figure 8 It is a schematic structural diagram of a service data processing device provided according to an embodiment of the present invention;
[0031] Figure 9 It is a schematic structural diagram of an electronic device for implementing the service data processing method according to an embodiment of the present invention. Detailed implementation manners
[0032] In order to enable those skilled in the art to better understand the solution of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.
[0033] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above drawings are used to distinguish similar objects, and do not necessarily need to describe a specific order or sequence. It should be understood that such data can be interchanged under appropriate circumstances so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including", "etc." and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device including a series of steps or units does not necessarily have to be limited to those steps or units clearly listed, but may include other steps or units not clearly listed or inherent to these processes, methods, products or devices.
[0034] Figure 1 It is a flowchart of a service data processing method provided according to an embodiment of the present invention. This embodiment is applicable to the situation of data processing for service data generated by at least one service line. This method can be executed by a service data processing device, and the service data processing device can be implemented in the form of hardware and / or software.
[0035] As Figure 1 shown, the method of this embodiment may specifically include:
[0036] S110. Receive a service processing instruction for data processing of the service data to be processed, and based on the service processing instruction, determine the model information of the to-be-processed logic model corresponding to the service data to be processed.
[0037] Among them, the business data to be processed is the data to be processed generated by the business lines included in the order system; exemplarily, the business lines may include at least one of shipping orders, return orders, purchase orders, express delivery, freight transportation, large items, and cold chain.
[0038] In this embodiment, the business processing instruction may be a query instruction and / or a write instruction. When the received business processing instruction is a write instruction, a write operation is performed on the business data to be processed in the order system; when the received business processing instruction is a query operation, a query operation is performed on the business data to be processed in the order system.
[0039] It should be noted that a business logic model can be created corresponding to each business line, and the business logic model includes at least one logic field for reflecting the specific attributes in the business line. For example, if the business line is delivery information, the logic fields may include the receiving address attribute, the quantity of items attribute, etc.
[0040] In specific implementation, the model information of the to-be-processed logic model corresponding to the business data to be processed may be included in the business processing instruction. After receiving the business processing instruction, the model information of the to-be-processed logic model can be directly obtained.
[0041] Among them, the model information may include at least one of the business identity, the logic fields included in the to-be-processed logic model, and the to-be-processed logic fields corresponding to the business data to be processed. The business identity may be the name, identifier, etc. of the business line corresponding to the to-be-processed business data; the to-be-processed logic fields are used to reflect the specific attributes of the to-be-processed business data. For example, when the business identity of the business line of the to-be-processed business data is delivery information, the to-be-processed logic fields may be the receiving address attribute, the receiving method attribute, etc.
[0042] S120. Based on the model information, determine the to-be-processed mapping rule corresponding to the business data to be processed in the pre-constructed extended configuration table.
[0043] Among them, the target physical model may include at least one physical field, and the physical field is a description of the actual field for processing business data.
[0044] The extended configuration table includes at least one mapping rule, and each mapping rule is used to reflect the corresponding relationship between the business logic model corresponding to a business line and the physical fields in the target physical model. Further, if the business logic model includes multiple logic fields, corresponding mapping rules can be configured for each logic field, and each mapping rule is used to reflect the corresponding relationship between each logic field in a business logic model and the physical fields in the target physical model. It should be noted that the number of business logic models included in the extended configuration table may be multiple, and the business logic models in the extended configuration table can be set and modified through a rule configuration platform to flexibly construct mapping rules.
[0045] In this embodiment, the number of target physical models is less than the number of business logic models, that is, different business logic models can correspond to the same target physical model, indicating that the business data generated by each business logic model can share the physical fields corresponding to the same target physical model. Exemplarily, the number of target physical models can be 1. By pre-constructing each mapping rule in the extended configuration table, it is set which physical field in the target physical model corresponds to the business data corresponding to each business logic model during data processing, realizing the flexible utilization of physical fields and facilitating the improvement of the utilization rate of physical fields.
[0046] In a specific implementation, when the extended configuration table includes a unique mapping rule, this mapping rule can be determined as the mapping rule to be processed. When the extended configuration table includes mapping rules corresponding to multiple business logic models, determine the mapping rule of the to-be-processed logic model corresponding to the model information, and determine this mapping rule as the mapping rule to be processed.
[0047] It should be noted that the extended configuration table can be pre-constructed through a rule configuration platform. Specifically, the specific implementation method of constructing the extended configuration table can be: based on the rule configuration information input by the business terminal received, set at least one mapping rule, and generate an extended configuration table based on each mapping rule. Among them, the rule configuration information includes the business identity of the business logic model to be configured, the business fields to be configured, and the corresponding physical fields.
[0048] S130. Based on the mapping rule to be processed, perform business processing operations on the to-be-processed business data in the corresponding to-be-processed physical field.
[0049] In a specific implementation, through the mapping rule to be processed, the physical field in the target physical model corresponding to the to-be-processed logic model can be determined, and the determined physical field is used as the to-be-processed physical field, and business processing operations are performed on the to-be-processed business data in the to-be-processed physical field.
[0050] To understand the business processing operation process more clearly and in detail, the following takes the business processing instruction including a write instruction as an example for illustration.
[0051] In a specific implementation, the business processing instruction includes a write instruction, and the to-be-processed business data includes the to-be-written business data; the specific implementation method of performing business processing operations on the to-be-processed business data in the corresponding to-be-processed physical field based on the mapping rule to be processed can be: receive the to-be-written business data; based on the mapping rule to be processed, determine the to-be-processed physical field corresponding to the to-be-written business data, generate an index corresponding to the to-be-written business data based on the to-be-processed physical field, and store the index in a preset search database; write the to-be-written business data into the to-be-processed physical field in a preset storage database.
[0052] Specifically, when the service processing instruction is a write instruction, to complete the write operation of the service data to be written, it is necessary to obtain the service data to be written by receiving the service data sent by the service terminal. The physical field corresponding to the to-be-processed logical model in the to-be-processed mapping rule is determined as the to-be-processed physical field. Based on the field information of the to-be-processed physical field, an index is generated and stored in a preset search database for subsequent query of the data to be written; moreover, the service data to be written is written into the to-be-processed physical field of the preset storage database, thereby completing the write operation of the service data to be written.
[0053] This embodiment proposes a write operation method for service data. Through the determined to-be-processed mapping rule, the to-be-processed physical field corresponding to the service data to be written can be quickly determined, which is beneficial to improving the writing accuracy and effectiveness of the service data to be written.
[0054] In this embodiment, after receiving the service processing instruction for data processing of the to-be-processed service data, it further includes: in the case where the to-be-processed service data corresponding to the service processing instruction is service data with a general attribute, determining the default non-expanded field corresponding to the general attribute; performing a service processing operation on the to-be-processed service data based on the default non-expanded field.
[0055] It should be noted that the attribute of the to-be-processed service data can be determined based on the received service processing instruction, and this attribute includes general attributes and non-general attributes. General attributes are fixed attributes shared by different business lines; for example, general attributes include item numbers, item names, etc. Non-general attributes are the differentiating attributes of each business line, such as the receiving address attribute in the distribution business line and the preservation temperature attribute in the cold chain business line, etc.
[0056] In practical applications, since the data volume range of the service data with general attributes is fixed and the usage frequency of the service data is low, to improve the convenience of the service data processing process, the default non-expanded field can be set for the service data with general attributes in advance. In specific implementation, in the case where the to-be-processed service data is service data with a general attribute, there is no need to obtain the to-be-processed mapping rule, and the default non-expanded field corresponding to the general attribute can be directly determined, and the service data is operated in the default non-expanded field, thereby quickly and efficiently completing the processing of the service data with general attributes.
[0057] Furthermore, in the case where the to-be-processed service data corresponding to the service processing instruction is service data with a non-general attribute, the model information of the corresponding to-be-processed logical model can be determined based on the service processing instruction; the to-be-processed mapping rule corresponding to the to-be-processed service data is determined based on the model information, so as to complete the service data processing operation based on the to-be-processed mapping rule.
[0058] The technical solution of the embodiment of the present invention receives a service processing instruction for processing service data to be processed, and determines the model information of the to-be-processed logical model corresponding to the to-be-processed service data through the service processing instruction; based on the model information, determines the to-be-processed mapping rule corresponding to the to-be-processed service data in the pre-constructed extended configuration table; wherein, the extended configuration table includes at least one mapping rule. Since each mapping rule can reflect the corresponding relationship between the service logical model corresponding to a service line and the physical fields of the target physical model, and the number of target physical models is less than the number of service logical models, it shows that different service logical models can correspond to the same target physical model, and the service data corresponding to different service lines can share the physical fields of the same physical model. Therefore, when performing service processing operations on the to-be-processed service data in the corresponding to-be-processed physical fields through the to-be-processed mapping rule, the utilization rate of the physical fields and the performance of the data processing operations are improved, and resource waste is avoided.
[0059] Figure 2 It is a flowchart of another service data processing method provided according to an embodiment of the present invention. On the basis of the above embodiment, this embodiment further includes: determining the operation information of each physical field in the target physical model; for each physical field, determining the usage situation of the physical field within a preset time period based on the operation information; in the case where the usage situation is not used, feeding back the field information of the unused physical field to the service terminal. The explanations of the same or corresponding terms as those in the above embodiments are not repeated here. As Figure 2 shown, the method includes:
[0060] S210. Receive a service processing instruction for processing service data to be processed, and determine the model information of the to-be-processed logical model corresponding to the to-be-processed service data based on the service processing instruction.
[0061] S220. Based on the model information, determine the to-be-processed mapping rule corresponding to the to-be-processed service data in the pre-constructed extended configuration table.
[0062] S230. Based on the to-be-processed mapping rule, perform a service processing operation on the to-be-processed service data in the corresponding to-be-processed physical field.
[0063] S240. Determine the operation information of each physical field in the target physical model; for each physical field, determine the usage situation of the physical field within a preset time period based on the operation information.
[0064] Among them, the operation information includes at least one of the number of operations, operation time, and operation logical field within a preset time period. The usage situation may include two situations: not used and kept in use. Exemplarily, the preset time period may be the most recent 1 month from the current moment.
[0065] In specific implementation, at least one of the number of operations, operation time, or operation logic field of each physical field in the target physical model can be determined within a preset time period. Through the operation information, it can be determined whether the physical field is still in use within the preset time period.
[0066] Specifically, it can be determined whether the operation time of the last operation of the physical field is within the preset time period; if so, it is determined that the physical field is still in use; if not, it is determined that the physical field is not in use. Alternatively, it can also be determined whether the number of operations of the physical field within the preset time period is greater than a preset threshold. If it is greater, it is determined that the physical field is still in use; if it is less than or equal, it is determined that the physical field is not in use.
[0067] In practical applications, the operation information includes the number of write operations and the number of query operations; to determine the usage of the physical field more detailedly and comprehensively, based on the operation information, the usage of the physical field within the preset time period is determined, including: if the number of write operations is less than the first preset number and the number of query operations is less than the second preset number threshold within the preset time period, it is determined that the usage is not in use.
[0068] For the write operation and the query operation, the first preset number and the second preset number are set respectively. Those skilled in the art can set the specific values of the first preset number and the second preset number according to the actual application situation. Exemplarily, both the first preset number and the second preset number are 1.
[0069] In specific implementation, if the number of write operations is less than the first preset number and the number of query operations is less than the second preset number within the preset time period, it can be determined that the physical field has not performed write operations and query operations within the preset time period, then it can be determined that the usage is not in use. If the number of write operations is greater than or equal to the second preset number, or the number of query operations is greater than or equal to the second preset number within the preset time period, it is determined that the usage of the physical field within the preset time period is in use.
[0070] In this embodiment, both the write operation and the query operation are considered, so as to accurately determine the usage of the physical field within the preset time period, which is convenient for subsequent reuse of the physical field based on the usage.
[0071] S250. In the case where the usage is not in use, the field information of the unused physical field is fed back to the service terminal.
[0072] Among them, the field information includes the field name, field identifier, etc.
[0073] In a specific implementation, when the usage status is unused, it indicates that the resources of the physical field are idle. To improve the utilization rate of the physical field and reduce resource waste, the field information of the unused physical field can be fed back to the business terminal, enabling business personnel to understand the usage situation of the physical field. By combining the usage situation of the physical field and the field information, the rule configuration information input to the rule configuration platform next time can be determined to adjust the corresponding relationship between the business logic model and the physical fields in the target physical model.
[0074] In this embodiment, by feeding back the field information of the physical field with the usage status of unused to the business terminal, the business terminal can timely understand the usage situation of each physical field, facilitating the timely adjustment of the corresponding relationship between the business logic model and the physical fields in the target physical model, so as to improve the utilization rate of each physical field and reduce resource waste.
[0075] Figure 3 It is a flowchart of another business data processing method provided according to an embodiment of the present invention. In this embodiment, the service processing instruction includes a query instruction, the service data to be processed includes the service data to be queried, and the model information includes the business identity and the logical fields to be queried in the service logic model to be processed. The specific implementation manner for determining the mapping rule to be processed is: based on the business identity and the logical fields to be queried, determine the mapping rule to be processed corresponding to the service data to be processed in the pre-constructed extended configuration table. Among them, the explanations of the same or corresponding terms as those in the above embodiments will not be elaborated here. As Figure 3 shown, the method includes:
[0076] S310. Receive a query instruction for processing the service data to be queried, and based on the query instruction, determine the model information of the service logic model to be processed corresponding to the service data to be queried.
[0077] Among them, the model information includes the business identity and the logical fields to be queried in the service logic model to be processed. The service logic model to be processed includes at least one logical field; the query instruction can indicate a query operation on the service data corresponding to one or several logical fields in the service logic model to be processed, and the logical fields indicated in the query instruction that need to perform the query operation can be determined as the logical fields to be queried. For example, the service logic fields can be the receiving address attribute, the receiving method attribute, etc. The business identity can be the name, identifier, etc. of the service line corresponding to the service data to be processed; through the business identity, the service line that needs to perform the query operation and the corresponding service logic model can be determined.
[0078] S320. Based on the business identity and the logical fields to be queried, determine the mapping rule to be processed corresponding to the service data to be processed in the pre-constructed extended configuration table.
[0079] In a specific implementation, a to-be-query logical model corresponding to the to-be-query service data can be determined based on the service identity, and a mapping rule corresponding to the to-be-query logical model can be determined in the extended configuration table; based on the to-be-query logical fields, a to-be-processed mapping rule corresponding to the to-be-query logical fields can be determined from the determined mapping rules. Among them, the to-be-processed mapping rule reflects the correspondence between the to-be-query logical fields and the corresponding physical fields in the target physical model.
[0080] S330. Based on the to-be-processed mapping rule, perform a service processing operation on the to-be-query service data in the corresponding to-be-processed physical fields.
[0081] Specifically, based on the to-be-processed mapping rule, the physical field corresponding to the to-be-query logical field is determined as the to-be-query physical field. By reading the service data in the to-be-query physical field, the query operation on the to-be-query service data is completed.
[0082] In this embodiment, through the to-be-processed mapping rule, the to-be-processed physical field corresponding to the to-be-query service data is quickly determined, and the query operation on the to-be-query service data is performed in a timely manner, improving the efficiency of querying service data.
[0083] In this embodiment, the extended configuration table includes the effective time corresponding to each mapping rule; the method for performing a service processing operation on the to-be-processed service data based on the to-be-processed mapping rule includes: determining the to-be-processed effective time corresponding to the to-be-processed mapping rule; generating a query statement based on the to-be-processed effective time and the to-be-processed mapping rule; sending the query statement to the search database to query the to-be-query service data in the to-be-processed physical fields within the to-be-processed effective time.
[0084] Among them, the effective time includes the effective start time and the effective end time of the mapping rule; through the effective time, the association duration of the correspondence between the logical fields of the business logic model in the mapping rule and the physical fields of the target physical model can be restricted. Exemplarily, the effective time of the mapping rule between the logical field A and the physical field B is [2021, 2024], that is, the mapping rule starts to take effect in 2021, and after 2024, the mapping rule becomes invalid.
[0085] In a specific implementation, when the to-be-processed service data is the to-be-query service data, the to-be-processed effective time corresponding to the to-be-processed mapping rule corresponding to the to-be-query service data can be determined, and a query statement is generated through the to-be-processed effective time and the to-be-processed mapping rule; Exemplarily, the query statement can be a DSL (Domain-Specific Language) statement.
[0086] In specific implementation, a search database can be pre-constructed; for example, the search database can be an ES (ElasticSearch) database. Indexes corresponding to each business data to be queried can be stored in the search database. By sending a query statement to the search database, the index corresponding to the query statement can be determined. Based on the index in the storage database, the business data to be queried in the physical fields to be processed within the effective time to be processed can be queried.
[0087] In this embodiment, the corresponding business data to be queried is queried through the mapping rule to be processed and the effective time, ensuring that the queried data is within the effective time and avoiding the situation of incorrect business data to be queried obtained, improving the accuracy and effectiveness of the data query operation.
[0088] In practical applications, there is a situation where it is necessary to query the business data to be queried corresponding to multiple logical fields at the same time. In this case, the mapping rule to be processed corresponding to the business data to be queried determined in the pre-constructed extended configuration table can be: when the number of logical fields to be queried is greater than the preset number, for each logical field to be queried, the mapping rule to be processed corresponding to the logical field to be queried is determined respectively.
[0089] Exemplarily, the preset number can be 1; those skilled in the art know that the number of logical fields to be queried is greater than or equal to 1. When the number of logical fields to be queried is equal to 1, the only mapping rule can be determined, and the effective time corresponding to the mapping rule can be determined as the effective time to be processed. When the number of logical fields to be queried is greater than 1, for each logical field to be queried, the corresponding mapping rule to be processed can be determined.
[0090] Further, when the number of logical fields to be queried is greater than the preset number, the method for determining the effective time to be processed corresponding to the mapping rule to be processed can be: determining the effective time corresponding to each mapping rule to be processed, determining the intersection time corresponding to each effective time, and determining the intersection time as the effective time to be processed.
[0091] For each determined mapping rule to be processed, the corresponding effective time is determined respectively. To avoid the situation of query failure or incorrect queried data, the intersection of each effective time can be taken to determine the intersection time, and the intersection time is determined as the effective time to be processed. For example, the effective time corresponding to the mapping rule to be processed 1 is [2021, 2024], and the effective time corresponding to the mapping rule to be processed 2 is [2022, 2023], then the intersection time is [2022, 2023], and [2022, 2023] is determined as the effective time to be processed.
[0092] In addition, if there is no intersection between the effective times corresponding to the mapping rules to be processed, it is impossible to determine the physical fields that meet the requirements of the query instruction; it can be determined that the current query operation fails, a failure message is generated, and feedback is sent to the business terminal.
[0093] In this embodiment, when the number of logical fields to be queried is greater than the preset number, the intersection of the effective times is taken to determine the effective time to be processed, so as to ensure that the determined physical fields to be processed meet all the requirements of the query instruction and are valid physical fields, and further ensure that the queried business data is correct business data.
[0094] To perform statistics on the query operation and facilitate subsequent understanding of the query situation of each logical field, after performing the query operation on the business data to be queried, it further includes: sending the business identity and the logical field to be queried to the buried point platform to perform statistics on the query operation corresponding to the query instruction.
[0095] Among them, the buried point platform is used to store the received business identity and the logical field to be queried.
[0096] Specifically, the business identity and the logical field to be queried corresponding to the query instruction generated within the period can be periodically obtained, and the obtained business identity and the logical field to be queried are sent to the buried point platform to facilitate subsequent counting of the number of query operations.
[0097] Furthermore, the occurrence time of the query instruction and the physical field to be queried corresponding to the logical field to be queried can also be stored and sent to the buried point platform to facilitate statistics on the occurrence time of the query operation and the usage situation of each physical field.
[0098] In this embodiment, by performing buried points on the business identity and the logical field to be queried, it is convenient to perform statistics on the query operation in the subsequent process; and the occurrence time and the corresponding physical field can also be sent to the buried point platform to understand the query frequency and other situations of each physical field.
[0099] The above text has described the embodiments corresponding to the business data processing method in detail. To make those skilled in the art further clear the technical solution of this method, specific application scenarios are given below.
[0100] In this embodiment, a rule configuration platform for configuring mapping rules can be provided. Before processing business data, an extended configuration table is constructed through the rule configuration platform to configure each mapping rule. Specifically, the configuration information sent by the input device can be received to complete the construction of the extended configuration table.
[0101] Exemplarily, it is shown on the interface as Figure 4The newly created pop-up window for the extended field shown inputs various information in the newly created pop-up window for the extended field through an input device, and forms rule configuration information to be sent to the rule configuration platform. As Figure 4 shown, the rule configuration information may include information such as a solution code, a solution name, a data model, a logical field, a physical field, a data length, a data type, a start effective time, and an end effective time.
[0102] Among them, the solution code corresponds to the name of a specific business line; for example, the business line names may include sold business, cold chain business, large item business, procurement business, and international business, etc. The data model corresponds to a specific area in the logical model, such as distribution information, goods information, preferential information, etc. The logical field represents a specific value under the logical model, such as the receiving address attribute under distribution information, and there will be a goods quantity attribute under goods information. The physical field represents a specific field in the target physical model. Since the ratio of the number of physical fields to the logical model is 1:N, where N is a positive integer greater than 1. Therefore, once the logical model is confirmed, the corresponding mapping relationship can be determined.
[0103] The extended configuration table may also include search information, including fuzzy search, exact search, or range search, for setting the search method for each physical field. The start effective time and the end effective time can specify the effective time, and the start effective time can be defaulted to the current time.
[0104] Exemplarily, the extended configuration table is shown in Table 1.
[0105] Table 1
[0106] Chinese meaning Example Business identity Sold Domain model Delivery information, goods information Logical field Insured value information, belonging to the delivery domain Physical field Physical field 1, Physical field 2 Whether search support is required Yes, No Search type Exact, range, fuzzy search Start effective moment 2023-01-01 End effective moment Default: 2049-01-01
[0107] Furthermore, the use of physical fields can be adjusted by adjusting the mapping relationship in the extended configuration table. Exemplarily, after the mapping rule fails, the mapping rule can be reset; for example, the mapping rule is the correspondence between logical field A, logical field B, and physical field A. After the mapping rule fails, the resources of physical field A can be released, and physical field A can be associated with other logical fields, thereby improving the utilization rate of physical field A.
[0108] To describe the business data processing process in detail and clearly, the business data processing process will be divided into a writing process and a query process below.
[0109] It should be noted that the business data processing device obtains the extended configuration table by interacting with the rule configuration platform; exemplarily, the business data processing device can be a rule engine.
[0110] Specifically, the data writing process is as Figure 5As shown in the figure. When writing data, the business terminal inputs the business line and business logic model of the business data to be written. The rule engine will obtain the corresponding mapping rule to be written from the rule configuration platform based on the business identity of the business line and the business logic model, so as to complete the conversion from the logical model (LDM) to the target physical model (PDM).
[0111] Furthermore, when writing the business data to be written, it can be determined whether the business data to be written is business data with non - general attributes that have query requirements. If so, an index is generated and stored in the ES database, the ES database is updated, and the business data to be written is written into the storage database, and the storage database is updated. If not, the business data to be written that does not require query is directly written into the storage database, and the storage database is updated. Exemplarily, the storage database can be a mysql database. The business identity, business logic model, and written physical fields can also be sent to the data collection platform for subsequent analysis of users' query demands and identification of fields that are no longer used.
[0112] It should be noted that the physical fields corresponding to the physical model can include extended fields and non - extended fields. For business data with general attributes, it can be stored in non - extended fields; for business data with non - general attributes, it can be stored in extended fields. The physical table of the physical model can include parts such as field name, data type, and attribute remarks. Exemplarily, the field name can be attr1, the data type can be variable - length string, and the attribute remarks can be extended attributes.
[0113] In this embodiment, the data query process is as Figure 6 shown. When querying data, the rule engine will obtain the corresponding mapping rule from the rule configuration platform based on the business identity of the business line and the business logic model, so as to complete the conversion from the logical model (LDM) to the target physical model (PDM).
[0114] Based on the effective time corresponding to each mapping rule, the mapping rule to be written that meets the current query time requirement is determined. Based on this mapping rule to be written and the rule effective time, a query statement is generated and sent to the ES database, thus completing the data query operation; and the business identity, business logic model, and queried physical fields can be sent to the data collection platform for subsequent analysis of users' query demands and identification of fields that are no longer used.
[0115] It should be noted that if the query instruction includes multiple logical fields to be queried, the intersection of the effective times of the mapping rules corresponding to each logical field needs to be taken to determine the effective time to be processed corresponding to the current query operation.
[0116] In a specific implementation, to better understand the usage of each physical field and facilitate the adjustment of the extended configuration table, the usage of physical fields can be statistically analyzed. For example, Figure 7 as shown, the physical fields configured in the data tracking platform can be obtained; for each physical field, the storage database is queried to obtain the latest write time for that physical field. It is determined whether the latest write time is before a preset time period; if it is before the preset time period, it is determined whether the physical field is a physical field corresponding to the business data of a general attribute, that is, whether it is a physical field with a query requirement; if it is a physical field with a query requirement, the data tracking platform is queried to obtain the usage of that physical field, and it is determined whether that physical field has been queried within the preset time period. If it has not been queried, the field information of the unused physical field is fed back to the business terminal. Exemplarily, the preset time period can be 1 month.
[0117] In this embodiment, through the rule configuration platform, mapping rules are configured. And when adding extended fields, only the business logic model needs to be modified and configurations need to be added, without code development in the data layer, which improves the demand response speed and the utilization rate of physical fields, and avoids resource waste; moreover, by obtaining the usage of fields through the data tracking platform, the life cycles of fields and indexes are better controlled.
[0118] Figure 8 FIG. is a schematic structural diagram of a business data processing device according to an embodiment of the present invention. The device is used to execute the business data processing method provided in any of the above embodiments. The device and the business data processing method in the above embodiments belong to the same inventive concept. Details not described in detail in the embodiment of the business data processing device can refer to the embodiments of the above business data processing method. For example, Figure 8 as shown, the device includes:
[0119] A business processing instruction receiving module 10, configured to receive a business processing instruction for performing data processing on to-be-processed business data, and based on the business processing instruction, determine model information of a to-be-processed logic model corresponding to the to-be-processed business data;
[0120] A to-be-processed mapping rule determining module 11, configured to determine a to-be-processed mapping rule corresponding to the to-be-processed business data in a pre-constructed extended configuration table based on the model information;
[0121] Wherein, the extended configuration table includes at least one mapping rule, and each mapping rule is used to reflect the corresponding relationship between the business logic model corresponding to a business line and the physical fields in the target physical model; the number of target physical models is less than the number of business logic models;
[0122] A data processing module 12, configured to perform business processing operations on the to-be-processed service data in the corresponding to-be-processed physical fields based on the to-be-processed mapping rules.
[0123] Based on any optional technical solution in the embodiments of the present invention, optionally, the business processing instruction includes a query instruction, the to-be-processed service data includes to-be-query service data, and the model information includes a business identity and a to-be-query logic field in the to-be-processed logic model; the to-be-processed mapping rule determination module 11 includes:
[0124] A first to-be-processed mapping rule determination unit, configured to determine the to-be-processed mapping rule corresponding to the to-be-query service data in a pre-constructed extended configuration table based on the business identity and the to-be-query logic field.
[0125] Based on any optional technical solution in the embodiments of the present invention, optionally, the extended configuration table includes an effective time corresponding to each mapping rule;
[0126] The data processing module 12 includes:
[0127] A to-be-processed effective time determination unit, configured to determine the to-be-processed effective time corresponding to the to-be-processed mapping rule;
[0128] A query statement generation unit, configured to generate a query statement based on the to-be-processed effective time and the to-be-processed mapping rule;
[0129] A data query unit, configured to send the query statement to a search database to query the to-be-query service data in the to-be-processed physical fields within the to-be-processed effective time.
[0130] Based on any optional technical solution in the embodiments of the present invention, optionally, the to-be-processed mapping rule determination module 11 includes:
[0131] A second to-be-processed mapping rule determination unit, configured to, when the number of to-be-query logic fields is greater than a preset number, respectively determine the to-be-processed mapping rule corresponding to each to-be-query logic field;
[0132] The to-be-processed effective time determination unit includes:
[0133] A to-be-processed effective time determination subunit, configured to determine the effective time corresponding to each to-be-processed mapping rule, determine the intersection time corresponding to each effective time, and determine the intersection time as the to-be-processed effective time.
[0134] Based on any optional technical solution in the embodiments of the present invention, optionally, it further includes:
[0135] A logic field to-be-query module, configured to send a service identity and a logic field to-be-query to a data logging platform for counting a query operation corresponding to a query instruction.
[0136] Based on any optional technical solution in the embodiments of the present invention, optionally, the service processing instruction includes a write instruction, and the service data to-be-processed includes service data to-be-written;
[0137] The data processing module 12 includes:
[0138] A service data to-be-written receiving unit, configured to receive service data to-be-written;
[0139] An index storage unit, configured to determine a physical field to-be-processed corresponding to the service data to-be-written based on a to-be-processed mapping rule, generate an index corresponding to the service data to-be-written based on the physical field to-be-processed, and store the index into a preset search database;
[0140] A data writing unit, configured to write the service data to-be-written into a physical field to-be-processed in a preset storage database.
[0141] Based on any optional technical solution in the embodiments of the present invention, optionally, it further includes:
[0142] An operation information determining module, configured to determine operation information of each physical field in a target physical model;
[0143] A usage determining module, configured to determine, for each physical field, a usage of the physical field within a preset time period based on the operation information;
[0144] A field information feedback module, configured to feedback field information of an unused physical field to a service terminal when the usage is unused.
[0145] Based on any optional technical solution in the embodiments of the present invention, optionally, the operation information includes a write operation count and a query operation count:
[0146] The usage determining module includes:
[0147] A usage determining unit, configured to determine that the usage is unused if the write operation count is less than a first preset count and the query operation count is less than a second preset threshold within the preset time period.
[0148] Based on any optional technical solution in the embodiments of the present invention, optionally, it further includes:
[0149] The default non - extended field determination module is used to determine the default non - extended field corresponding to the general attribute after receiving a service processing instruction for processing service data to be processed, when the service data to be processed corresponding to the service processing instruction is service data with general attributes; and perform service processing operations on the service data to be processed based on the default non - extended field.
[0150] In the technical solution of the embodiment of the present invention, a service processing instruction for processing service data to be processed is received, and through the service processing instruction, the model information of the to - be - processed logic model corresponding to the service data to be processed is determined; based on the model information, the to - be - processed mapping rule corresponding to the service data to be processed is determined in a pre - constructed extended configuration table; wherein, the extended configuration table includes at least one mapping rule. Since each mapping rule can reflect the correspondence between the service logic model corresponding to a service line and the physical fields of the target physical model, and the number of target physical models is less than the number of service logic models, it shows that different service logic models can correspond to the same target physical model, and the service data corresponding to different service lines can share the physical fields of the same physical model. Therefore, when performing service processing operations on the service data to be processed in the corresponding to - be - processed physical fields through the to - be - processed mapping rule, the utilization rate of physical fields and the performance of data processing operations are improved, and resource waste is avoided.
[0151] It should be noted that in the embodiments of the above - mentioned service data processing device, the various units and modules included are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be realized; in addition, the specific names of the functional units are only for the convenience of mutual distinction and do not limit the protection scope of the present invention.
[0152] Figure 9 It is a schematic structural diagram of an electronic device for implementing the service data processing method of the embodiment of the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are only examples and are not intended to limit the implementation of the present invention described herein and / or claimed.
[0153] Such as Figure 9As shown, the electronic device 20 includes at least one processor 21 and a memory communicatively connected to the at least one processor 21, such as a read-only memory (ROM) 22, a random access memory (RAM) 23, etc. The memory stores a computer program executable by the at least one processor. The processor 21 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 22 or the computer program loaded from the storage unit 28 into the random access memory (RAM) 23. In the RAM 23, various programs and data required for the operation of the electronic device 20 can also be stored. The processor 21, the ROM 22, and the RAM 23 are connected to each other via a bus 24. An input / output (I / O) interface 25 is also connected to the bus 24.
[0154] Multiple components in the electronic device 20 are connected to the I / O interface 25, including: an input unit 26, such as a keyboard, a mouse, etc.; an output unit 27, such as various types of displays, speakers, etc.; a storage unit 28, such as a magnetic disk, an optical disc, etc.; and a communication unit 29, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 29 allows the electronic device 20 to exchange information / data with other devices via a computer network such as the Internet and / or various telecommunication networks.
[0155] The processor 21 can be various general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the processor 21 include but are not limited to a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 21 executes the various methods and processes described above, such as the business data processing method.
[0156] In some embodiments, the business data processing method can be implemented as a computer program tangibly embodied in a computer-readable storage medium, such as the storage unit 28. In some embodiments, part or all of the computer program can be loaded and / or installed onto the electronic device 20 via the ROM 22 and / or the communication unit 29. When the computer program is loaded into the RAM 23 and executed by the processor 21, one or more steps of the business data processing method described above can be executed. Alternatively, in other embodiments, the processor 21 can be configured to execute the business data processing method by any other appropriate means (e.g., by means of firmware).
[0157] The various embodiments of the systems and techniques described above in this specification can be implemented in digital electronic circuitry, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on a chip (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include: being implemented in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which may be a special-purpose or general-purpose programmable processor that receives data and instructions from, and transmits data and instructions to, a storage system, at least one input device, and at least one output device.
[0158] The computer program for implementing the methods of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions / operations specified in the flowchart and / or block diagram to be implemented. The computer program can be executed entirely on the machine, partly on the machine, as a stand-alone software package partly on the machine and partly on a remote machine or entirely on the remote machine or server.
[0159] In the context of the present invention, a computer-readable storage medium can be a tangible medium that can contain or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer-readable storage medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, the computer-readable storage medium can be a machine-readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0160] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which the user can provide input to the electronic device. Other kinds of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0161] The systems and techniques described herein can be implemented in a computing system including backend components (e.g., as a data server), or a computing system including middleware components (e.g., an application server), or a computing system including frontend components (e.g., a user computer having a graphical user interface or a web browser through which the user can interact with an implementation of the systems and techniques described herein), or a computing system including any combination of such backend components, middleware components, or frontend components. The components of the system can be interconnected by digital data communication in any form or medium (e.g., a communication network). Examples of communication networks include: local area network (LAN), wide area network (WAN), blockchain network, and the Internet.
[0162] A computing system can include a client and a server. The client and the server are generally far from each other and typically interact through a communication network. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or a cloud host, which is a host product in the cloud computing service system and solves the defects of difficult management and weak business scalability existing in traditional physical hosts and VPS services.
[0163] It should be understood that various forms of the processes shown above can be used, with steps reordered, added, or deleted. For example, the steps recited in the present invention can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of the present invention can be achieved, and no limitation is made herein.
[0164] The above specific embodiments do not constitute a limitation on the protection scope of the present invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. A business data processing method, characterized in that: include: Receiving a business processing instruction for performing data processing on the business data to be processed, and determining model information of a logic model to be processed corresponding to the business data to be processed based on the business processing instruction; Based on the model information, determining a mapping rule to be processed corresponding to the service data to be processed in a pre-built extended configuration table; The extended configuration table includes at least one mapping rule, each of which is used to reflect the correspondence between a business logic model corresponding to a business line and a physical field in a target physical model; the number of the target physical models is less than the number of the business logic models; Based on the mapping rule to be processed, a business processing operation is performed on the business data to be processed in the corresponding physical field to be processed.
2. The method according to claim 1, characterized in that: The business processing instruction includes a query instruction, the business data to be processed includes business data to be queried, and the model information includes a business identity and a logical field to be queried in the logical model to be processed; The determining, based on the model information, in a pre-built extended configuration table, a mapping rule to be processed corresponding to the service data to be processed includes: Based on the service identity and the logical field to be queried, a mapping rule to be processed corresponding to the service data to be queried is determined in a pre-constructed extended configuration table.
3. The method according to claim 2, characterized in that The extended configuration table includes the effective time corresponding to each mapping rule; The performing a business processing operation on the business data to be processed in a corresponding physical field to be processed based on the mapping rule to be processed includes: Determine the pending processing effective time corresponding to the pending mapping rule; Generate a query statement based on the pending effective time and the pending mapping rule; The query statement is sent to a search database to query the business data to be queried in the physical field to be processed within the effective time to be processed.
4. The method according to claim 3, characterized in that: The determining, in the pre-built extended configuration table, a mapping rule to be processed corresponding to the service data to be queried includes: When the number of the to-be-queried logical fields is greater than a preset number, for each of the to-be-queried logical fields, respectively determining a to-be-processed mapping rule corresponding to the to-be-queried logical field; The determining the pending effective time corresponding to the pending mapping rule includes: Determine the effective time corresponding to each of the to-be-processed mapping rules, determine the intersection time corresponding to each of the effective times, and determine the intersection time as the to-be-processed effective time.
5. The method according to claim 2, characterized in that: Also includes: The business identity and the logical field to be queried are sent to the tracking point platform to count the query operations corresponding to the query instructions.
6. The method according to claim 1, characterized in that The business processing instruction includes a write instruction, and the business data to be processed includes business data to be written; The performing a business processing operation on the business data to be processed in a corresponding physical field to be processed based on the mapping rule to be processed includes: Receiving the business data to be written; Based on the mapping rule to be processed, determining the physical field to be processed corresponding to the business data to be written, generating an index corresponding to the business data to be written based on the physical field to be processed, and storing the index in a preset search database; The business data to be written is written into the physical field to be processed in the preset storage database.
7. The method according to claim 1, characterized in that Also includes: Determining operation information of each physical field in the target physical model; For each of the physical fields, determining the usage of the physical field within a preset time period based on the operation information; When the usage status is unused, the field information of the unused physical field is fed back to the service terminal.
8. The method according to claim 7, characterized in that The operation information includes the number of write operations and the number of query operations: The determining, based on the operation information, the usage of the physical field within a preset time period includes: If the number of write operations within the preset time period is less than a first preset number, and the number of query operations is less than a second preset number threshold, it is determined that the usage status is not used.
9. The method according to claim 1, characterized in that: After receiving the service processing instruction for performing data processing on the service data to be processed, the method further includes: In a case where the to-be-processed business data corresponding to the business processing instruction is business data of a general attribute, determining a default non-extended field corresponding to the general attribute; The service processing operation is performed on the service data to be processed based on the default non-extension field.
10. A business data processing device, characterized in that: include: A business processing instruction receiving module, used to receive a business processing instruction for processing the business data to be processed, and determine model information of a logic model to be processed corresponding to the business data to be processed based on the business processing instruction; A mapping rule determination module to be processed, used to determine the mapping rule to be processed corresponding to the business data to be processed in a pre-built extended configuration table based on the model information; The extended configuration table includes at least one mapping rule, each of which is used to reflect the correspondence between a business logic model corresponding to a business line and a physical field in a target physical model; the number of the target physical models is less than the number of the business logic models; The data processing module is used to perform business processing operations on the business data to be processed in the corresponding physical field to be processed based on the mapping rule to be processed.
11. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the business data processing method according to any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the business data processing method according to any one of claims 1 to 9 when executed.
Citation Information
Cited By
Service providing method and device and service request processing method
CN120633609A
Statistical analysis method and system for archive information
CN121255886A