Data recording method and device, equipment and storage medium
By establishing mapping rules and data recording models in the data processing system and automatically recording data operation history, the problems of low data recording efficiency and high operation and maintenance pressure in the existing technology are solved, and efficient data recording and system security are achieved.
Patent Information
- Application Number
- CN202510053488.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-13
- Publication Date
- 2025-05-13
AI Technical Summary
The prior art is difficult to effectively record and manage complex data operation history, resulting in low data recording efficiency, high operation and maintenance pressure, and difficulty in traceability and monitoring system operations.
By establishing mapping rules between the terminal device and the server, the call request is mapped into a data recording model, the operation data information is collected, the event object is generated, and the operations performed by the call request are automatically recorded.
It realizes automated recording of data operations, reduces development and maintenance costs, improves data recording efficiency and system security, and simplifies operation and maintenance processes.
Smart Images

Figure CN119988164A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of data processing technology, and in particular to technical fields such as cloud computing and intelligent recording. Background Art
[0002] As the business develops, the platform that directly undertakes business functions continues to iterate, and the operations that can be supported are becoming more frequent and complex, so the demand for data records is becoming increasingly prominent. Data records can be used to record the operation history of the database to facilitate the maintenance of platform functions. Summary of the invention
[0003] The present disclosure provides a data recording method, device, equipment and storage medium.
[0004] According to one aspect of the present disclosure, there is provided a data recording method, comprising:
[0005] In response to a call request of a terminal device to a target interface, mapping the call request to a data record model based on a mapping rule;
[0006] Based on the data recording model, collecting operation data information associated with the call request;
[0007] Based on the operation data information, generate an event object;
[0008] Based on the event object, an operation performed on the call request is recorded.
[0009] According to another aspect of the present disclosure, there is provided a data recording device, comprising:
[0010] A mapping module, configured to respond to a call request of a terminal device to a target interface and map the call request to a data record model based on a mapping rule;
[0011] A collection module, used for collecting operation data information associated with the call request based on the data recording model;
[0012] A generating module, used for generating an event object based on the operation data information;
[0013] The recording module is used to record the operation performed by the call request based on the event object.
[0014] According to another aspect of the present disclosure, there is provided an electronic device, comprising:
[0015] at least one processor; and
[0016] a memory communicatively connected to the at least one processor; wherein,
[0017] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute any method in the embodiments of the present disclosure.
[0018] According to another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute any method according to the embodiments of the present disclosure.
[0019] According to another aspect of the present disclosure, a computer program product is provided, including a computer program, which implements any method according to the embodiments of the present disclosure when executed by a processor.
[0020] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.
[0022] Figure 1 is a schematic diagram of a data recording method according to a first embodiment of the present disclosure;
[0023] Figure 2 is a flow chart of a data recording method according to a second embodiment of the present disclosure;
[0024] Figure 3 is a flow chart of a data recording method according to a third embodiment of the present disclosure;
[0025] Figure 4 is a flowchart of a data recording method according to a fourth embodiment of the present disclosure;
[0026] Figure 5 is a schematic diagram of a data recording method according to a fifth embodiment of the present disclosure;
[0027] Figure 6 is a schematic structural diagram of a data recording device according to a sixth embodiment of the present disclosure;
[0028] Figure 7 is a block diagram of an electronic device for implementing the data recording method according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0029] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope of the present disclosure. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0030] In the embodiment of the present disclosure, a data recording method is proposed. The scenario architecture diagram of the method is as follows: Figure 1 As shown, it includes a server 11 and a terminal device 12. The terminal device 12 and the server 11 are connected via a wireless or wired network, and the terminal device 12 includes but is not limited to electronic devices such as desktop computers, mobile phones, mobile computers, tablet computers, media players, smart wearable devices, and smart TVs. The server 11 can be a single server, a server cluster consisting of several servers, or a cloud computing center. The server 11 can be an independent physical server, or a server cluster or distributed system consisting of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms.
[0031] In the embodiment of the present disclosure, the target object can perform operations in the interface displayed by the terminal device 12, and the terminal device 12 calls the relevant target interface for processing based on the operation. The server 11 receives the call request of the terminal device 12 to the target interface, and triggers the relevant operation of automatically recording data accordingly. In the method provided in the embodiment of the present disclosure, a data recording model is provided. When developing new business functions, it is only necessary to specify which data recording model to use to realize data recording of the newly added business functions. Without the need to develop data recording program code separately, the development and maintenance costs of data operation and maintenance can be reduced.
[0032] A data recording method proposed in the embodiment of the present disclosure is applicable to the aforementioned server 11. Figure 2 As shown, the method includes the following contents:
[0033] S201, in response to a call request of a terminal device to a target interface, mapping the call request to a data record model based on a mapping rule.
[0034] In the disclosed embodiment, the operation on the database mainly includes limited operation modes, such as adding data, deleting data, modifying data and querying data. Personalized operations can be customized and developed.
[0035] No matter what kind of operation, there is a corresponding record model. Because the operations on the database are limited, the record model is also limited. However, the business scenario can be changed according to demand. For example, online store retail and live streaming sales are different business scenarios, and both operate the data in the database. For example, modify prices, modify inventory, etc. No matter how flexibly the business scenario changes, the underlying operations on the database are limited. Therefore, no matter what kind of business scenario, it can be abstracted into the corresponding data record model through mapping rules.
[0036] The data recording model, as the name implies, is a model used to record the history of related operations on the database. The data recording operation based on the data recording model is triggered by calling the target interface. The data recording model defines what data needs to be recorded, the data format, etc. During implementation, the specific content of the data recording model can be defined according to actual needs.
[0037] S202: Based on the data recording model, collect operation data information associated with the call request.
[0038] The operational data information may include general data and business data. General data usually includes some static information that is not related to the operation of the database, and examples include: target object identification (Industrial Design, ID), timestamp, Internet Protocol (Internet Protocol, IP), geographic location, etc. General data is usually irrelevant to the business and is mostly used to identify the source and scenario of the operation. Business data is used to represent the operation of the database content, and examples include "queried the inventory of XX product", "reduced the inventory of XX product from 500 to 400", etc.
[0039] S203, generating an event object based on the operation data information.
[0040] Since the operation data information may be a plurality of scattered information, at least one operation data information is encapsulated to obtain a complete event object for later recording.
[0041] S204: Based on the event object, record the operation performed by the call request.
[0042] During implementation, the operation requested to be executed can be recorded in BaikalDB (distributed enhanced structured database system, Baikal Data Base), which has the characteristics of a high-performance database to ensure that the operation record can be efficiently stored and quickly retrieved. In addition, other high-performance databases can also be used to store operation records, which is not limited in the embodiments of the present disclosure.
[0043] In the embodiment of the present disclosure, the corresponding data recording model is determined through the mapping rules corresponding to the target interface, and the relevant data is collected based on the data recording model, and is encapsulated into an event object and stored persistently. The process of data recording is realized through the automation of the data recording model. The data recording model defines the data to be collected and the recording method, which can greatly reduce the code development workload of data operation and maintenance related staff and improve recording efficiency. At the same time, the operations performed by the call request are automatically recorded, so that the operation and maintenance personnel can monitor and maintain the system more easily and reduce work pressure. Based on the scheme proposed in the embodiment of the present disclosure, operation recording at the interface granularity can be realized, so that each data operation request that calls the relevant interface can be recorded based on the data recording model, which helps to achieve complete tracing and restoration of the operation path, and at the same time helps to check data changes and disclose them, reducing system risks.
[0044] The disclosed embodiments provide a variety of reusable recording models. When the platform functions are iterated, such as developing new services, service developers can define the required data recording model for each interface to implement data recording for the interface. There is no need to develop separate service code for data recording.
[0045] When the platform runs related business functions and calls the target interface, the data recording model corresponding to the target interface will be triggered to automatically record data.
[0046] In some embodiments, mapping the call request to the data record model based on the mapping rule can be specifically implemented as follows: parsing out the first model identifier, and determining the model corresponding to the first model identifier as the data record model.
[0047] In the business development process, the first mapping parameter is written into the interface parameter of the target interface. When data needs to be automatically recorded in the later stage, the data recording model corresponding to the target interface can be automatically identified.
[0048] In the disclosed embodiment, the data recording model is defined using the interface parameters of the target interface. The data recording model is defined only during the business development process. After the business development is completed, the data recording model can be automatically determined based on the first mapping parameters to facilitate the subsequent automatic acquisition of operation data information for data recording.
[0049] In some embodiments, the call request is mapped to a data record model based on a mapping rule, which can be specifically implemented as follows: obtaining a configuration file corresponding to the target interface; parsing a second model identifier based on a second mapping parameter recorded in the configuration file, and determining the model corresponding to the second model identifier as the data record model.
[0050] Among them, the configuration file can be in the format of XML (eXtensible Markup Language), JSON (JavaScript Object Notation), YAML (data serialization format), etc., which depends on the framework used and is not limited in the embodiments of the present disclosure.
[0051] The second mapping parameter is used to indicate the mapping relationship between the target interface of the call request and the data record model.
[0052] In the process of service development, the second mapping parameter is written into a configuration file corresponding to the target interface, and in the subsequent service operation process, the data record model corresponding to the target interface can be automatically identified.
[0053] It should be noted that, for the target interface developed in this way, in the later process of maintaining the logic of automatic recording, only the configuration file needs to be maintained, and there is no need to redefine the interface parameters of the target interface.
[0054] In the disclosed embodiment, the second mapping parameter is written into the configuration file of the target interface, and the configuration file is directly read to obtain the data recording model to realize automatic acquisition of operation data information, so as to facilitate the subsequent automatic acquisition of operation data information for data recording.
[0055] In the embodiment of the present disclosure, the data recording model includes at least one data format model and at least one operation type; based on the data recording model, the operation data information associated with the call request is collected, such as Figure 3 As shown, it can be implemented as follows:
[0056] S301, determining a data collection scope based on at least one operation type and a data object of a call request operation.
[0057] The at least one operation type includes at least one of the following: adding data, modifying data, querying data, deleting data, and a user-defined type.
[0058] Adding data means adding data objects. Under this operation type, the data collection scope may include operation module, operator, time, operation platform, added data objects, etc. The operation module means the corresponding business module, which can be understood as the business module to be operated on. The operator is the target object, which can be understood as who is operating. The time is the timestamp of the operation. The operation platform is the platform that provides the business module function, which can accurately locate the specific visualization interface provided by the platform.
[0059] In an exemplary service for employee numbers, user A adds employee number A in the platform A interface at YY year XX month ZZ day HH hour MM minute NN second. The operation module is the employee number maintenance module, the operator is user A, the time is YY year XX month ZZ day HH hour MM minute NN second, the operation platform is platform A, and employee number A is the data object.
[0060] Modifying data means modifying the data object. Under this operation type, the data collection scope may include the operation module, operator, time, operation platform, data object before modification, and data object after modification. For example, in the business of employee number points, user A changes the 10 points of the target employee number to 20 points in the platform A interface at YY year XX month ZZ day HH hour PP minute NN second. The data object before modification is 10 points, and the data object after modification is 20 points. Other data are similar to the above, and the embodiments of the present disclosure will not be repeated here.
[0061] Deleting data means deleting the data object. Under this operation type, the data collection scope may include the operation module, operator, time, operation platform, data object before modification, etc. In the exemplary business for employee numbers, user A deletes employee number B in the platform A interface at YY year XX month ZZ day HH hour MM minute NN second. Among them, the operation module is the employee number maintenance module, the operator is user A, the time is YY year XX month ZZ day HH hour MM minute NN second, the operation platform is platform A, and employee number B is the data object.
[0062] Custom types can be developed according to actual business needs, and this disclosure embodiment does not limit this.
[0063] In the disclosed embodiment, based on operation types such as adding data, modifying data, querying data, deleting data, and custom types, operations can be comprehensively recorded so that each operation of the user can be traced back.
[0064] The data collection scope varies depending on the operation type. For example, for the query operation type, the data collection scope only focuses on the data objects involved in the call request of the target interface. However, for modifying data, it is necessary to obtain the data objects before and after the modification. For adding data, it is sufficient to focus on the added data objects. For deleting data, it is sufficient to focus on the deleted data objects.
[0065] During implementation, in order to obtain general data within the data collection scope, it is also necessary to obtain the terminal side information transmitted by the terminal device through the target interface. For example, the target object ID, device ID, etc. In short, the data collection scope is determined based on the call request of the target interface, including the information related to the terminal device transmitted by the terminal device based on the call request, and may also include the relevant operation results of the database based on the call request.
[0066] It should be noted that the data collected in the data collection range can be cleaned and the cleaned data can be used to perform S302. Cleaning means preliminarily analyzing the data in the data collection range and removing data with defects and missing key information in the data collection range.
[0067] S302: Based on at least one data format model, parameters matching at least one data format model are acquired from within a data collection range to obtain operation data information associated with the call request.
[0068] During implementation, the data format model represents the data object of the call request operation and the data format requirements corresponding to the operation behavior, which may include the parameter name and the data format of the parameter, for example, the data format of the name is string. It should be noted that each operation data information may correspond to a data format model.
[0069] During implementation, it is necessary to filter parameters that conform to the data format model from the data collection scope as the operation data information associated with the call request. For example, if the data format model requires the parameter value of parameter A, the parameter value can be queried from the data collection scope, and the parameter value and parameter A constitute part of the operation data information.
[0070] Continuing with the previous example of adding data operation behavior, the data format model requires that the operation module, operator, time, operation platform, modified data object and other contents meet the preset requirements, and the parameters that meet the data format model are selected. Taking the operator as an example, the data format requires that the operator is a person in the preset talent pool. If the operator is a person in the preset talent pool, it is recorded as one of the operation data information associated with the call request. If the operator is a person outside the preset talent pool, it can be recorded and trigger an alarm.
[0071] In addition, the data format model can be set based on actual conditions, and the embodiments of the present disclosure do not limit this.
[0072] In the embodiment of the present disclosure, the data format model is used as a constraint to automatically identify which data needs to be obtained for recording, so as to realize the automation of data recording.
[0073] In some embodiments, since there may be a target object that triggers calling the target interface corresponding to the control through a specified control to perform multiple operations on the database, the multiple operations include not only the operations required to be performed by the target interface, but also actively calling other interfaces to complete the operations on the database due to business logic requirements. Figure 4 As shown, it can be implemented as follows:
[0074] S401, in response to the call of the target interface in the business execution logic, in case of calling the additional interface to perform the additional operation, the additional operation is mapped into an additional model and an additional type based on the mapping rule.
[0075] During implementation, the target object may only require one operation in the business execution logic, but the background may trigger multiple interfaces to perform related operations on the database. Among the multiple interfaces, except for the interface corresponding to the target object triggering operation, which is the target interface, all other interfaces are triggered by the target interface, and the other interfaces can be called additional interfaces.
[0076] The operation type corresponding to the target interface can be the main operation type, and the model associated with the target interface is the main model. The operations of other interfaces triggered by the target interface can be called slave operation types (also known as additional types). The other interfaces are additional interfaces, and the data format model associated with the additional interface is the additional model. The operation type managed by the attachment interface is the additional type.
[0077] S402, merging the additional model and the additional type into the data record model.
[0078] Among them, at least one data format model includes an additional model; at least one operation type includes an additional type.
[0079] In summary, the data record model includes a main model and an additional model, a main operation type and an additional type.
[0080] For example, the operator adds a new employee number A, but the background will not only add employee number A to the database, but also assign default points to it. The operation of adding an employee number corresponds to the operation of the target interface, and the operation of assigning points corresponds to the additional interface. The entire business execution logic is "add a new employee number and increase the points of the newly added employee number by 10 points." It can be seen that the main model is called to execute the newly added employee number data, and the additional model needs to be called to increase the points of the newly added employee number by 10 points. The corresponding additional type is to modify the data.
[0081] In the disclosed embodiment, the use of additional models can automatically realize the recording of various operation behaviors, so that the entire system covers the operation records more comprehensively and improves the accuracy of the operation records.
[0082] In some embodiments, an event object is generated based on the operation data information, which can be specifically implemented as follows: at least one operation data information is integrated into an event object, which is used to describe the operation record of the entire call request execution, that is, the description method used to store in the database.
[0083] After the event object is generated, the event object can be encrypted and backed up to ensure the security and integrity of the data. The encryption method can be symmetric encryption. Any method that can encrypt the event object is applicable to the embodiment of the present disclosure, and the embodiment of the present disclosure does not limit this.
[0084] In some embodiments, based on the event object, the operation performed by the call request is recorded, which can be specifically implemented as follows:
[0085] Step A1: publish an event object through an event publisher.
[0086] Step A2: parse the event object through the event receiver to obtain the operation to be executed by the call request.
[0087] Step A3: record the operation performed by the call request.
[0088] The specific process is shown in Figure 5. After the event object is constructed, it is published to the event receiver 52 using the event publisher 51. After the event receiver 52 receives the event object, it obtains the operation executed by the call request and records the operation executed by the call request to the database 53.
[0089] In the disclosed embodiment, based on the event publisher and the event receiver, the event object can be completely recorded in the database. Based on this method, a complete historical record of the event can be provided, which is conducive to improving the efficiency of automatic data recording.
[0090] It should be noted that based on the data recording method provided in the embodiment of the present disclosure, the business only needs to develop a new business logic interface and define a data recording model for it to complete the automatic recording of the relevant data of the interface. When the interface is subsequently executed, the data recording model is associated with the interface based on the mapping rules, and the data can be automatically collected and recorded. Moreover, which interfaces need to be automatically recorded and which interfaces do not need to be automatically recorded can be flexibly selected according to needs. In addition, the data recording method proposed in the embodiment of the present disclosure can meet the recording needs of various complex scenarios and improve the wide applicability and long-term availability of the entire data recording method.
[0091] In the disclosed embodiment, it also includes: in response to the query operation, displaying the operation executed by the call request.
[0092] When the target object needs to query any operation data information, it can query based on the query words in the operation data information to obtain the query results. The query words can be exemplarily objects corresponding to operation modules, operators, time, operation platforms, etc. In the embodiment of the present disclosure, the query results can be visualized in the form of charts, lists, etc., so that the target object can intuitively understand and analyze the operation status.
[0093] Exemplarily, the target object queries the operation module as the employee number maintenance module, and the query results obtained are displayed in the form of a list, as shown in Table 1:
[0094] Table 1
[0095]
[0096] It can be seen from Table 1 above that when querying the operation module of the employee number, all the operation contents under the operation module can be displayed, and each operation behavior is recorded in detail in the operation content, laying the foundation for later tracing.
[0097] Based on the data records in the embodiments of the present disclosure and combined with the visual query method, each operation step can be recorded in detail, so that each operation behavior can be traced and restored along the path, thereby enhancing the security of the entire platform.
[0098] In summary, the operation recording method proposed in the embodiments of the present disclosure has the following advantages:
[0099] Improve the efficiency of operation records: Through automated recording methods, the workload of developers can be greatly reduced and the efficiency of operation records can be improved.
[0100] Improve system security: Achieve complete traceability and restoration of operation paths, which helps to identify data changes and disclose them, thereby reducing system risks.
[0101] Simplify the operation and maintenance process: Automated operation record management enables operation and maintenance personnel to monitor and maintain the system more easily, reducing work pressure.
[0102] Promote business innovation and development: Lay a solid foundation for subsequent business access and rapid iteration of the business platform, and promote continuous innovation and development of the business.
[0103] Based on the same technical concept, the present disclosure also proposes a data recording device 600, such as Figure 6 As shown, including:
[0104] A mapping module 601 is used to respond to a call request of a terminal device to a target interface and map the call request to a data record model based on a mapping rule;
[0105] A collection module 602, configured to collect operation data information associated with the call request based on the data recording model;
[0106] A generating module 603, used to generate an event object based on the operation data information;
[0107] The recording module 604 is used to record the operation performed by the call request based on the event object.
[0108] In some embodiments, the mapping module includes:
[0109] The first parsing unit is used to parse out a first model identifier from a first mapping parameter predefined in the target interface, and determine a model corresponding to the first model identifier as the data record model.
[0110] In some embodiments, the mapping module includes:
[0111] A first acquisition unit, used to acquire a configuration file corresponding to the target interface;
[0112] The second parsing unit is used to parse out a second model identifier based on a second mapping parameter recorded in the configuration file, and determine a model corresponding to the second model identifier as the data record model.
[0113] In some embodiments, the data record model includes at least one data format model and at least one operation type;
[0114] The acquisition module comprises:
[0115] A determination unit, configured to determine a data collection scope based on the at least one operation type and a data object of the call request operation;
[0116] The second acquisition unit is used to acquire parameters matching the at least one data format model from within the data collection range based on the at least one data format model to obtain operation data information associated with the call request.
[0117] In some embodiments, an additional processing module is further included for:
[0118] In the case where, in response to the call of the target interface in the business execution logic, the additional interface is called to perform the additional operation, the additional operation is mapped to the additional model and the additional type based on the mapping rule;
[0119] merging the additional model and the additional type into the data record model;
[0120] Among them, the at least one data format model includes the additional model; and the at least one operation type includes the additional type.
[0121] In some embodiments, the at least one operation type includes at least one of the following:
[0122] Add data, modify data, query data, delete data, and customize data types.
[0123] In some embodiments, the recording module includes:
[0124] A publishing unit, used for publishing the event object through an event publisher;
[0125] A parsing unit, used for parsing the event object through an event receiver to obtain the operation executed by the call request;
[0126] The recording unit is used to record the operation performed by the call request.
[0127] In some embodiments, a query module is further included for:
[0128] In response to the query operation, the operation performed by the call request is displayed.
[0129] For the description of specific functions and examples of each module and submodule of the device in the embodiment of the present disclosure, reference can be made to the relevant description of the corresponding steps in the above method embodiment, which will not be repeated here.
[0130] In the technical solution disclosed herein, the acquisition, storage and application of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0131] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
[0132] Figure 7 A schematic block diagram of an example electronic device 700 that can be used to implement an embodiment of the present disclosure 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 assistants, cellular phones, smart phones, wearable devices, 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 disclosure described and / or required herein.
[0133] like Figure 7As shown, the device 700 includes a computing unit 701, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 702 or a computer program loaded from a storage unit 708 into a random access memory (RAM) 703. In the RAM 703, various programs and data required for the operation of the device 700 can also be stored. The computing unit 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0134] A number of components in the device 700 are connected to the I / O interface 705, including: an input unit 706, such as a keyboard, a mouse, etc.; an output unit 707, such as various types of displays, speakers, etc.; a storage unit 708, such as a disk, an optical disk, etc.; and a communication unit 709, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 709 allows the device 700 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0135] The computing unit 701 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 701 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 701 performs the various methods and processes described above, such as a data recording method. For example, in some embodiments, the data recording method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 708. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 700 via ROM 702 and / or a communication unit 709. When the computer program is loaded into RAM 703 and executed by the computing unit 701, one or more steps of the data recording method described above may be performed. Alternatively, in other embodiments, the computing unit 701 may be configured to perform the data recording method in any other appropriate manner (e.g., by means of firmware).
[0136] 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.
[0137] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code 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.
[0138] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. 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.
[0139] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer 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 pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types 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).
[0140] The systems and techniques described herein may be implemented in a computing system that includes back-end 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 front-end 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 back-end components, middleware components, or front-end 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), and the Internet.
[0141] A computer 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 relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.
[0142] 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 recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0143] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. 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 principles of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A data recording method, comprising: In response to a call request of a terminal device to a target interface, mapping the call request to a data record model based on a mapping rule; Based on the data recording model, collecting operation data information associated with the call request; Based on the operation data information, generate an event object; Based on the event object, an operation performed on the call request is recorded.
2. The method according to claim 1, wherein: Mapping the call request to a data record model based on a mapping rule includes: A first model identifier is parsed from a first mapping parameter predefined in the target interface, and a model corresponding to the first model identifier is determined as the data record model.
3. The method according to claim 1, wherein: Mapping the call request to a data record model based on a mapping rule includes: Obtaining a configuration file corresponding to the target interface; Based on the second mapping parameter recorded in the configuration file, a second model identifier is parsed, and a model corresponding to the second model identifier is determined as the data record model.
4. The method according to any one of claims 1 to 3, wherein: The data record model includes at least one data format model and at least one operation type; The collecting the operation data information associated with the call request based on the data recording model includes: Determining a data collection scope based on the at least one operation type and the data object of the call request operation; Based on the at least one data format model, parameters matching the at least one data format model are acquired from within the data collection range to obtain operation data information associated with the call request.
5. The method according to claim 4, further comprising: In the case where, in response to the call of the target interface in the business execution logic, the additional interface is called to perform the additional operation, the additional operation is mapped to the additional model and the additional type based on the mapping rule; merging the additional model and the additional type into the data record model; Among them, the at least one data format model includes the additional model; and the at least one operation type includes the additional type.
6. The method according to claim 4, wherein the at least one operation type comprises at least one of the following: Add data, modify data, query data, delete data, and customize data types.
7. The method according to claim 1, wherein: The recording of the operation performed on the call request based on the event object includes: Publishing the event object through an event publisher; Parsing the event object through an event receiver to obtain the operation executed by the call request; The operation performed by the call request is recorded.
8. The method according to claim 1, further comprising: In response to the query operation, the operation performed by the call request is displayed.
9. A data recording device, comprising: A mapping module, configured to respond to a call request of a terminal device to a target interface and map the call request to a data record model based on a mapping rule; A collection module, used for collecting operation data information associated with the call request based on the data recording model; A generating module, used for generating an event object based on the operation data information; The recording module is used to record the operation performed by the call request based on the event object.
10. The device according to claim 9, wherein: The mapping module comprises: The first parsing unit is used to parse out a first model identifier from a first mapping parameter predefined in the target interface, and determine a model corresponding to the first model identifier as the data record model.
11. The device according to claim 9, wherein: The mapping module comprises: A first acquisition unit, used to acquire a configuration file corresponding to the target interface; The second parsing unit is used to parse out a second model identifier based on a second mapping parameter recorded in the configuration file, and determine a model corresponding to the second model identifier as the data record model.
12. The device according to any one of claims 9 to 11, wherein: The data record model includes at least one data format model and at least one operation type; The acquisition module comprises: A determination unit, configured to determine a data collection scope based on the at least one operation type and a data object of the call request operation; The second acquisition unit is used to acquire parameters matching the at least one data format model from within the data collection range based on the at least one data format model to obtain operation data information associated with the call request.
13. The apparatus according to claim 12, further comprising an additional processing module for: In the case where, in response to the call of the target interface in the business execution logic, the additional interface is called to perform the additional operation, the additional operation is mapped to the additional model and the additional type based on the mapping rule; merging the additional model and the additional type into the data record model; in, The at least one data format model includes the additional model; the at least one operation type includes the additional type.
14. The apparatus of claim 12, wherein the at least one operation type comprises at least one of the following: Add data, modify data, query data, delete data, and customize data types.
15. The device according to claim 9, wherein: The recording module comprises: A publishing unit, used for publishing the event object through an event publisher; A parsing unit, used for parsing the event object through an event receiver to obtain the operation executed by the call request; The recording unit is used to record the operation performed by the call request.
16. The apparatus according to claim 9, further comprising a query module, configured to: In response to the query operation, the operation performed by the call request is displayed.
17. An electronic device comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 8.
18. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-8.
19. A computer program product, comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1 to 8.