Business data storage method, device, electronic device and storage medium
By establishing dynamic tables and static tables in the business data storage and adopting appropriate storage methods, the problems of redundancy and high maintenance costs in the existing technology are solved, and efficient adaptation to multiple business scenarios is achieved.
Patent Information
- Application Number
- CN202411824759.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-11
- Publication Date
- 2025-04-08
AI Technical Summary
When the prior art realizes the adaptation of multiple business scenarios, it leads to excessive redundancy of business tables and increases maintenance costs.
By establishing dynamic tables and static tables corresponding to the current business scenario, dynamic tables adopt column storage and static tables adopt row storage to achieve adaptation to multiple business scenarios.
Reduces the complexity of business scenario adaptation, reduces the redundant fields of business tables, and reduces maintenance costs.
Smart Images

Figure CN119782311A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a method, device, electronic device and storage medium for storing business data. Background Art
[0002] With the continuous development of computer technology, for a certain business scenario, functions are usually developed for the business scenario, and unique business table fields are set for the business scenario, thereby realizing the functions corresponding to the business scenario.
[0003] However, the existing technical solution is to achieve compatibility with multiple scenarios by maintaining fields for different business scenarios in the same business table, but this will cause too many redundant fields in the business table, thereby increasing maintenance costs. Summary of the invention
[0004] The present invention provides a business data storage method, device, electronic device and storage medium, which achieves adaptation to multiple business scenarios by establishing dynamic tables and static tables corresponding to current business scenarios, thereby reducing the complexity of business scenario adaptation.
[0005] According to one aspect of the present invention, a method for storing business data is provided, comprising:
[0006] In response to a trigger operation corresponding to a target service, determining a service field to be processed corresponding to the target service;
[0007] Classify the service fields to be processed, and determine dynamic fields and static fields in the service fields to be processed;
[0008] Generate a dynamic field table corresponding to the target business based on the dynamic field, and generate a static field table corresponding to the target business based on the static field, wherein the dynamic field table adopts column storage and the static field table adopts row storage;
[0009] The static field table and the dynamic field table are stored in correspondence with the target business.
[0010] According to another aspect of the present invention, there is provided a storage device for business data, comprising:
[0011] A field extraction module, configured to determine a to-be-processed business field corresponding to the target business in response to a trigger operation corresponding to the target business;
[0012] A field classification module, used for classifying the business fields to be processed and determining dynamic fields and static fields in the business fields to be processed;
[0013] A field table generation module, used to generate a dynamic field table corresponding to the target business based on the dynamic field, and to generate a static field table corresponding to the target business based on the static field, wherein the dynamic field table adopts column storage and the static field table adopts row storage;
[0014] The data storage module is used to store the static field table and the dynamic field table in correspondence with the target business.
[0015] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:
[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 that can be executed 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 storage method described in any embodiment of the present invention.
[0019] According to another aspect of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the business data storage method described in any embodiment of the present invention when executed.
[0020] The technical solution of the embodiment of the present invention determines the to-be-processed business fields corresponding to the target business in response to the trigger operation corresponding to the target business, and then classifies the to-be-processed business fields, determines the dynamic fields and static fields in the to-be-processed business fields, and further generates a dynamic field table corresponding to the target business based on the dynamic fields, and generates a static field table corresponding to the target business based on the static fields, wherein the dynamic field table adopts column storage, and the static field table adopts row storage, and finally the static field table and the dynamic field table are stored in correspondence with the target business. Based on the above technical solution, by establishing dynamic tables and static tables corresponding to the current business scenarios, adaptation to multiple business scenarios is achieved, thereby reducing the complexity of business scenario adaptation.
[0021] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended 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 briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0023] Figure 1 is a flowchart of a method for storing business data provided according to an embodiment of the present invention;
[0024] Figure 2 is a flowchart of a method for storing business data provided according to an embodiment of the present invention;
[0025] Figure 3 is a flowchart of a business data query operation provided according to an embodiment of the present invention;
[0026] Figure 4 is a flow chart of a business data modification operation provided according to an embodiment of the present invention;
[0027] Figure 5 is a flowchart of a business data deletion operation provided according to an embodiment of the present invention;
[0028] Figure 6 is a schematic diagram of the structure of a storage device for business data provided according to an embodiment of the present invention;
[0029] Figure 7 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0030] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0031] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, 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" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0032] Embodiment 1
[0033] Figure 1 A flowchart of a method for storing business data provided by an embodiment of the present invention. This embodiment can be applied to determine the business field corresponding to the target business, establish a static field table and a dynamic field table corresponding to the target business, and implement business data storage according to the static field table and the dynamic field table. The method can be executed by a business data storage device, which can be implemented in the form of hardware and / or software, and can be configured in an electronic device. Figure 1 As shown, the method includes:
[0034] S110 . In response to a trigger operation corresponding to a target service, determine a to-be-processed service field corresponding to the target service.
[0035] The target business can be understood as the business that needs to store business data. For example, the user can determine the business to be processed according to the needs and use it as the target business. The trigger operation refers to the operation of starting or activating the data processing flow for a specific target business. The business fields to be processed can be understood as the data fields corresponding to the target business.
[0036] Specifically, when a trigger operation for a target business is received, the corresponding data processing flow will be started immediately. First, the pending business fields corresponding to the target business will be determined based on the type and information of the target business. It should be noted that the target business refers to a specific business that requires data storage and processing. In actual applications, the target business can be diverse, such as order management of e-commerce platforms, financial transaction records, logistics cargo tracking, etc. The pending business fields refer to data fields related to the target business that need to be stored and processed. The pending business fields may include basic business information, transaction data, timestamps, etc. Exemplarily, a business identification identifier corresponding to the target business can be obtained, and the business field table corresponding to the target business can be queried based on the representation, and then the pending business fields corresponding to the target business can be extracted from the business field table.
[0037] S120: Classify the service fields to be processed and determine dynamic fields and static fields in the service fields to be processed.
[0038] Among them, a dynamic field can be a field whose value changes frequently as the business changes. Correspondingly, a static field can be understood as a field whose value changes less frequently.
[0039] Specifically, by traversing all the business fields to be processed, the stability and change frequency of the value of each field are analyzed, and according to the analysis results, the fields are divided into two categories: dynamic fields and static fields. It should be noted that classification processing refers to the process of classifying the business fields to be processed according to their characteristics and storage requirements. The technical solution provided by the embodiment of the present invention can flexibly respond to the changing needs of business fields by distinguishing and storing dynamic fields and static fields. Exemplarily, in the process of field classification, a static field table corresponding to the target business can be obtained, and then the static fields can be identified from the business fields to be processed according to the static field table, and other fields can be used as dynamic fields.
[0040] S130: Generate a dynamic field table corresponding to the target business based on the dynamic field, and generate a static field table corresponding to the target business based on the static field.
[0041] The dynamic field table is data organized according to a specific structure and format based on dynamic fields, and the static field table is a data table organized according to a specific structure and format based on static fields. The dynamic field table uses column storage, and the static field table uses row storage.
[0042] Specifically, for dynamic fields, the corresponding dynamic field table will be designed and generated according to their characteristics and storage requirements. The dynamic field table usually contains basic information such as field name, field type, field value, and other related information, such as timestamp, update frequency, etc.; for static fields, the corresponding static field table will also be designed and generated according to their characteristics and storage requirements. The structure and format of the static field table are similar to those of the dynamic field table, but it focuses more on the ability of long-term preservation and fast access. Exemplarily, the dynamic fields can be stored in columns to form a dynamic field table corresponding to the target business, and the static fields can be stored in rows to form a static field table corresponding to the target business.
[0043] S140: Store the static field table and the dynamic field table in correspondence with the target business.
[0044] Specifically, according to the business identifier of the target business, the static field table and the dynamic field table are stored corresponding to the target business. For example, a mapping relationship table or an index table can be established to record the association between the business identifier and the corresponding field table, and then the field table corresponding to each business can be queried according to the mapping relationship table or the index table.
[0045] The technical solution of the embodiment of the present invention determines the to-be-processed business fields corresponding to the target business in response to the trigger operation corresponding to the target business, and then classifies the to-be-processed business fields, determines the dynamic fields and static fields in the to-be-processed business fields, and further generates a dynamic field table corresponding to the target business based on the dynamic fields, and generates a static field table corresponding to the target business based on the static fields, wherein the dynamic field table adopts column storage, and the static field table adopts row storage, and finally the static field table and the dynamic field table are stored in correspondence with the target business. Based on the above technical solution, by establishing dynamic tables and static tables corresponding to the current business scenarios, adaptation to multiple business scenarios is achieved, thereby reducing the complexity of business scenario adaptation.
[0046] Embodiment 2
[0047] Figure 2 This is a flowchart of a method for storing business data provided by an embodiment of the present invention. This embodiment further refines the technical solution for processing the business data of the target business on the basis of the above technical solution. Figure 2 As shown, after storing the static field table and the dynamic field table in correspondence with the target business, the method includes:
[0048] S210: When a service operation request for the target service is detected, determine a service operation type of the service operation request.
[0049] The business operation request may be a request message sent by triggering a business operation control. The business operation type may be understood as an operation type corresponding to the business operation request, such as creation, modification, deletion, query, and review operations.
[0050] Specifically, when a business operation request for the target business is detected, the business operation type of the request is determined. Business operation types are usually predefined based on business logic and actual needs, and are used to describe different business operation behaviors. For example, they can be implemented through interaction with users through front-end interfaces (such as web pages, mobile applications, etc.). Users may initiate business operation requests by clicking buttons, submitting forms, etc. The front-end will capture these user operations and convert them into corresponding business operation requests, which are then sent to the back-end server for processing. By parsing the parameters in the business operation request, the parameters may contain an identifier for the business operation type. For example, there is a field in the request parameters for specifying the business operation type (such as "operationType" or "action").
[0051] S220: Process the static field table and the dynamic field table of the target business according to the business operation type.
[0052] Specifically, the static field table and dynamic field table of the target business can be processed according to the business operation type. Different business operation types will have different effects on the field table, so it is necessary to design corresponding processing logic for each operation type.
[0053] On the basis of the above technical solution, the static field table and the dynamic field table of the target business are processed according to the business operation type, including: when a business data query operation is detected for the target business, obtaining a business identifier corresponding to the target business; determining a static business table corresponding to the target business according to the business identifier, and determining a business data identifier from the static business table; and performing a business data query operation on the target business based on the business data identifier.
[0054] Specifically, a business data query operation for a target business initiated by a user or the front end is detected, and then a business identifier corresponding to the target business is extracted from the query request. The business identifier may be a business ID, a business name, or other fields that can uniquely identify the business. The extracted business identifier is used to query the corresponding static business table in the mapping relationship table, and the business data identifier that matches the business identifier is queried in the table. The business data identifier is a field that can uniquely identify a specific business data record, such as an order number, user ID, etc.
[0055] On the basis of the above technical solution, the business data query operation on the target business based on the business data identifier includes: obtaining dynamic table business data from the dynamic business table corresponding to the target business according to the business data identifier; combining the static business table with the dynamic table business data to determine the target query data, and returning the target query data.
[0056] Specifically, Figure 3 As shown, the dynamic business table corresponding to the target business is determined according to the business logic or configuration information. The dynamic business table contains field data that changes frequently or is user-defined. Then, the business data identifier (such as order number, user ID, etc.) previously obtained from the static business table is used to perform a query operation in the dynamic business table, retrieve the dynamic data that matches the identifier, and match the data obtained from the static business table with the data obtained from the dynamic business table. After the matching is completed, the static data and the dynamic data are integrated. After integration and processing, a complete query result set containing static and dynamic data is constructed, and finally the target query data is returned to the user or the front-end interface for display.
[0057] On the basis of the above technical solution, the static field table and the dynamic field table of the target business are processed according to the business operation type, including: when a business data modification operation is detected for the target business, obtaining a business field maintenance table corresponding to the target business; determining the business field to be modified corresponding to the target business according to the business field maintenance table, and modifying the dynamic business field table and / or the static business field table corresponding to the target business according to the business field to be modified.
[0058] The business field maintenance table may be a table used to modify business data, including attributes such as field name, type, whether it is required, and whether it can be modified.
[0059] Specifically, Figure 4As shown, after detecting a business data modification operation request for a target business initiated by a user or a front end, the business identifier corresponding to the target business is extracted from the modification request, and the business field maintenance table corresponding to the target business is obtained according to the business identifier or a preset mapping relationship, and the specific content in the modification request is parsed to identify the business field to be modified. According to the business field maintenance table, it is verified whether the field to be modified is legal, that is, whether the field to be modified exists in the business field maintenance table and has a modifiable attribute. According to the business field maintenance table or a preset rule, it is determined whether each field to be modified is stored in a dynamic business field table or a static business field table, or stored in both at the same time. For fields stored in the dynamic business field table, the specific record is located according to the business data identifier (such as the primary key), and the value of the corresponding field is updated. For fields stored in the static business field table, the record is also located according to the business data identifier, and an update operation is performed. It should be noted that the data in the static business field table is usually relatively stable, and the modification operation may be less. If the field is stored in both the dynamic and static business field tables, it is necessary to ensure that the data in the two tables are consistent, that is, a synchronous update operation is performed.
[0060] On the basis of the above technical solution, the static field table and the dynamic field table of the target business are processed according to the business operation type, including: when a business data deletion operation is detected for the target business, obtaining a business identifier corresponding to the target business; determining the static table data corresponding to the target business based on the business identifier, deleting the static table data corresponding to the target business, and determining the static data deletion processing result; and performing a business data deletion operation on the target business based on the static data deletion processing result.
[0061] Specifically, Figure 5 As shown, a business data deletion operation request for a target business initiated by a user or a front end is detected, a business identifier corresponding to the target business is extracted from the deletion request, and based on the business identifier, a data record corresponding to the target business is located in the static field table, a deletion operation is performed on the located static table data, and the result of the deletion operation is captured, it is checked whether the deletion operation is successfully executed, and the static data deletion processing result is determined.
[0062] On the basis of the above technical solution, the business data deletion operation on the target business based on the static data deletion processing result includes: when the static data deletion processing result is a successful deletion, querying the dynamic table data corresponding to the static table data, and deleting the dynamic table data.
[0063] Specifically, Figure 5As shown, check whether the static data deletion processing result is "deletion successful". If the static data is deleted successfully, query the corresponding dynamic table data according to the business identifier of the deleted static table data. This may involve performing a query operation in the dynamic field table to find all records associated with the deleted static data, and performing a delete operation on the queried dynamic table data to ensure that all dynamic data related to the deleted static data is also removed. It should be noted that if the dynamic table data has an association relationship with other business entities or fields, these associated data need to be updated or deleted accordingly to maintain data consistency. Furthermore, after performing the delete operation, it is necessary to verify whether the data in the static table and the dynamic table have been successfully deleted. If the deletion is successful, return the deletion success information to the user or the front-end interface; if the deletion fails, for example, due to foreign key constraints, data does not exist or other reasons, it is necessary to return the corresponding error information, and may prompt the user to re-execute the deletion operation or contact the administrator.
[0064] The technical solution of the embodiment of the present invention determines the to-be-processed business fields corresponding to the target business in response to the trigger operation corresponding to the target business, and then classifies the to-be-processed business fields, determines the dynamic fields and static fields in the to-be-processed business fields, and further generates a dynamic field table corresponding to the target business based on the dynamic fields, and generates a static field table corresponding to the target business based on the static fields, wherein the dynamic field table adopts column storage, and the static field table adopts row storage, and finally the static field table and the dynamic field table are stored in correspondence with the target business. Based on the above technical solution, by establishing dynamic tables and static tables corresponding to the current business scenarios, adaptation to multiple business scenarios is achieved, thereby reducing the complexity of business scenario adaptation.
[0065] Embodiment 3
[0066] Figure 6 A schematic diagram of a storage device for business data provided by an embodiment of the present invention. Figure 6 As shown, the device includes: a field extraction module 610, a field classification module 620, a field table generation module 630 and a data storage module 640; wherein,
[0067] A field extraction module 610, configured to determine a to-be-processed service field corresponding to the target service in response to a trigger operation corresponding to the target service;
[0068] A field classification module 620 is used to classify the business fields to be processed and determine dynamic fields and static fields in the business fields to be processed;
[0069] A field table generating module 630, configured to generate a dynamic field table corresponding to the target business based on the dynamic field, and to generate a static field table corresponding to the target business based on the static field, wherein the dynamic field table adopts column storage and the static field table adopts row storage;
[0070] The data storage module 640 is used to store the static field table and the dynamic field table in correspondence with the target business.
[0071] On the basis of the above technical solution, the device also includes: a business data processing module, which is used to determine the business operation type of the business operation request when a business operation request for the target business is detected after the static field table and the dynamic field table are stored in correspondence with the target business; and process the static field table and the dynamic field table of the target business according to the business operation type.
[0072] On the basis of the above technical solution, the business data processing module is used to obtain a business identifier corresponding to the target business when a business data query operation is detected for the target business; determine a static business table corresponding to the target business according to the business identifier, and determine a business data identifier from the static business table; and perform a business data query operation on the target business based on the business data identifier.
[0073] Based on the above technical solution, the business data processing module is used to obtain dynamic table business data from the dynamic business table corresponding to the target business according to the business data identifier; combine the static business table with the dynamic table business data to determine the target query data, and return the target query data.
[0074] On the basis of the above technical solution, the business data processing module is used to obtain a business field maintenance table corresponding to the target business when a business data modification operation is detected for the target business; determine the business field to be modified corresponding to the target business according to the business field maintenance table, and modify the dynamic business field table and / or static business field table corresponding to the target business according to the business field to be modified.
[0075] On the basis of the above technical solution, the business data processing module is used to obtain the business identifier corresponding to the target business when a business data deletion operation is detected for the target business; determine the static table data corresponding to the target business based on the business identifier, delete the static table data corresponding to the target business, and determine the static data deletion processing result; perform a business data deletion operation on the target business based on the static data deletion processing result.
[0076] On the basis of the above technical solution, the business data processing module is used to query the dynamic table data corresponding to the static table data and delete the dynamic table data when the static data deletion processing result is successful deletion.
[0077] The technical solution of the embodiment of the present invention determines the to-be-processed business fields corresponding to the target business in response to the trigger operation corresponding to the target business, and then classifies the to-be-processed business fields, determines the dynamic fields and static fields in the to-be-processed business fields, and further generates a dynamic field table corresponding to the target business based on the dynamic fields, and generates a static field table corresponding to the target business based on the static fields, wherein the dynamic field table adopts column storage, and the static field table adopts row storage, and finally the static field table and the dynamic field table are stored in correspondence with the target business. Based on the above technical solution, by establishing dynamic tables and static tables corresponding to the current business scenarios, adaptation to multiple business scenarios is achieved, thereby reducing the complexity of business scenario adaptation.
[0078] The storage device for business data provided in the embodiment of the present invention can execute the storage method for business data provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.
[0079] Embodiment 4
[0080] Figure 7 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. 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 processing, 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 merely examples and are not intended to limit the implementation of the present invention described and / or required herein.
[0081] like Figure 7As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.
[0082] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0083] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special 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 11 executes the various methods and processes described above, such as a storage method for business data.
[0084] In some embodiments, the storage method of business data may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the storage method of business data described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the storage method of business data in any other appropriate manner (e.g., by means of firmware).
[0085] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0086] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0087] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0088] To provide interaction with a user, the systems and techniques described herein may 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 trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).
[0089] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.
[0090] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.
[0091] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.
[0092] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for storing business data, characterized in that: include: In response to a trigger operation corresponding to a target service, determining a service field to be processed corresponding to the target service; Classify the service fields to be processed and determine dynamic fields and static fields in the service fields to be processed; Generate a dynamic field table corresponding to the target business based on the dynamic field, and generate a static field table corresponding to the target business based on the static field, wherein the dynamic field table adopts column storage and the static field table adopts row storage; The static field table and the dynamic field table are stored in correspondence with the target business.
2. The method according to claim 1, characterized in that After storing the static field table and the dynamic field table in correspondence with the target business, the method further includes: When a business operation request for the target business is detected, determining a business operation type of the business operation request; The static field table and the dynamic field table of the target business are processed according to the business operation type.
3. The method according to claim 2, characterized in that Processing the static field table and the dynamic field table of the target business according to the business operation type includes: When a business data query operation is detected for the target business, obtaining a business identifier corresponding to the target business; Determine a static service table corresponding to the target service according to the service identifier, and determine a service data identifier from the static service table; A business data query operation is performed on the target business based on the business data identifier.
4. The method according to claim 3, characterized in that The performing a business data query operation on the target business based on the business data identifier includes: Acquire dynamic table service data from a dynamic service table corresponding to the target service according to the service data identifier; The static business table and the dynamic table business data are combined to determine target query data, and the target query data is returned.
5. The method according to claim 2, characterized in that: Processing the static field table and the dynamic field table of the target business according to the business operation type includes: In the case where a business data modification operation is detected for the target business, obtaining a business field maintenance table corresponding to the target business; The business field to be modified corresponding to the target business is determined according to the business field maintenance table, and the dynamic business field table and / or the static business field table corresponding to the target business is modified according to the business field to be modified.
6. The method according to claim 1, characterized in that Processing the static field table and the dynamic field table of the target business according to the business operation type includes: In the case where a business data deletion operation is detected for the target business, obtaining a business identifier corresponding to the target business; Determine the static table data corresponding to the target service based on the service identifier, delete the static table data corresponding to the target service, and determine a static data deletion result; A business data deletion operation is performed on the target business based on the static data deletion processing result.
7. The method according to claim 6, characterized in that The deleting operation of the business data of the target business based on the static data deletion processing result includes: When the static data deletion processing result is that the deletion is successful, the dynamic table data corresponding to the static table data is queried, and the dynamic table data is deleted.
8. A storage device for business data, characterized in that: include: A field extraction module, configured to determine a to-be-processed business field corresponding to the target business in response to a trigger operation corresponding to the target business; A field classification module, used for classifying the business fields to be processed and determining dynamic fields and static fields in the business fields to be processed; A field table generation module, used to generate a dynamic field table corresponding to the target business based on the dynamic field, and to generate a static field table corresponding to the target business based on the static field, wherein the dynamic field table adopts column storage and the static field table adopts row storage; The data storage module is used to store the static field table and the dynamic field table in correspondence with the target business.
9. 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 storage method according to any one of claims 1 to 7.
10. 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 storage method according to any one of claims 1 to 7 when executed.