A data processing method and apparatus

By processing and verifying the data in the user device memory and mapping it to the database, the data consistency problem in the shared database of multiple users is solved, and naming consistency and resource optimization are achieved.

CN114547055BActive Publication Date: 2025-07-25ZHEJIANG DAHUA TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210140611.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-16
Publication Date
2025-07-25
Estimated Expiration
2042-02-16

AI Technical Summary

Technical Problem

In the scenario where multiple users share databases, the data consistency of database tables cannot be guaranteed, especially during the interaction between Flink and hive databases, naming conflicts and inconsistent data structures may occur.

Method used

After processing data in the memory of the user equipment and passing the verification, the processing results are mapped to the storage address of the database to ensure that the data complies with the setting rules and avoid naming confusion and resource waste caused by direct operation in the database.

Benefits of technology

It ensures the consistency of data in the same database table, avoids naming conflicts and resource waste, and improves the efficiency and security of data storage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114547055B_ABST
    Figure CN114547055B_ABST
Patent Text Reader

Abstract

The present application discloses a data processing method and apparatus, which are used to solve the problem that the consistency of database tables cannot be guaranteed in the scenario where multiple users share a database. The method includes: receiving a data processing request from a user device; the data processing request is used to indicate processing of data in the database; processing the data processing request according to the data processing request in a first storage address included in the user device to obtain a processing result; verifying the data processing request according to the set rules of the database; when the verification passes, mapping the processing result to a second storage address of the database.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the technical field of data processing, and in particular, to a data processing method and apparatus. Background Art

[0002] As a new generation of big data streaming computing engine, Flink provides powerful real-time computing capabilities externally. However, as a computing engine, data storage is not the main function of Flink. Therefore, Flink generally relies on third-party services to implement the storage and management of big data. Flink provides a large number of connectors to connect to different external memories. For example, Flink-hive-connector is used to connect to hive. Hive is a data warehouse service based on Hadoop. It can map structured data files into database tables for storage, and record information such as the type, name, namespace, and index of the stored data in the metadata of hive. In practical applications, user devices can obtain the metadata of hive through Flink, determine the storage location of the data to be processed in hive according to the type of the data to be processed, and then perform data processing, such as writing data, deleting data, or querying data. However, in the actual production process, since multiple users use the same hive, naming conflicts may occur when multiple users write data to hive, that is, the content structures of two files with the same name may be different, and the consistency of the data stored in a database table cannot be guaranteed. Summary of the Invention

[0003] In an exemplary embodiment of the present application, a data processing method and apparatus are provided to solve the problem that the consistency of database tables cannot be guaranteed in the scenario where multiple users share a database.

[0004] In a first aspect, an embodiment of the present application provides a data processing method, including:

[0005] Receiving a data processing request from a user device; the data processing request is used to indicate processing of data in a database;

[0006] Processing the data processing request in a first storage address included in the user device according to the data processing request to obtain a processing result;

[0007] Verifying the data processing request according to the set rules of the database;

[0008] When the verification passes, mapping the processing result to a second storage address of the database.

[0009] Based on the above solution, the present application proposes that when processing data, first process the data in the memory of the user device to obtain a processing result, and then map the processing result in the memory of the user device to the database according to a pre-configured mapping relationship after the data to be processed passes the verification. The verification step ensures that the structures of data with the same name are consistent, solves the problem of naming chaos caused by different users directly operating on the data in the database through their respective user devices, that is, avoids the situation where the structures of two files with the same name are completely different. It ensures the consistency of the data stored in the same database table in the same database.

[0010] In some embodiments, the data processing request includes the data to be processed and the name of the data to be processed; the verification of the data processing request according to the set rules of the database includes:

[0011] Determine whether the name of the data to be processed conforms to the name specified by the set rules;

[0012] If it conforms, the verification passes.

[0013] In some embodiments, after determining that the name of the data to be processed conforms to the set rules, the method further includes:

[0014] Determine whether the type of the data to be processed conforms to the type specified by the set rules;

[0015] If it conforms, the verification passes.

[0016] Based on the above solution, by verifying whether the name and format of the data to be processed conform to the set rules of the database, and only storing the data if it conforms, the consistency of the data stored in the database is ensured.

[0017] In some embodiments, the data processing request includes a write request; processing the data at the first storage address according to the data processing request includes:

[0018] Write the data to be written at the first storage address according to the first data;

[0019] After mapping the processing result to the second storage address of the database, the method further includes:

[0020] Delete the first data in the first storage address.

[0021] In the related art, since the user device directly accesses the database to write the data to be written, the intermediate data generated during the data writing process will also be stored in the database, resulting in a waste of storage resources in the database. Based on the above solution, this application proposes to write data in the user device, so that the intermediate data generated during the data writing will also be stored in the user device, avoiding the waste of storage resources in the database. And after the data to be written is mapped to the database, the intermediate data in the user device will be deleted, so the solution proposed in this application will not increase the burden on the user device.

[0022] In some embodiments, before verifying the data processing request according to the set rules of the database, the method further includes:

[0023] Determine that the user device has the permission to access and read / write the data stored in the second storage address.

[0024] By setting different permissions for different users for different storage addresses, it avoids the situation where users accidentally delete or modify data.

[0025] In a second aspect, an embodiment of this application provides a data processing device, including:

[0026] A transceiver unit, configured to receive a data processing request from a user device; the data processing request is used to indicate processing of data in a database;

[0027] A processing unit, configured to execute:

[0028] Process the data processing request in the first storage address included in the user device according to the data processing request to obtain a processing result;

[0029] Verify the data processing request according to the set rules of the database;

[0030] When the verification passes, map the processing result to the second storage address of the database.

[0031] In some embodiments, the data processing request includes the data to be processed and the name of the data to be processed; the processing unit is specifically configured to:

[0032] Determine whether the name of the data to be processed conforms to the name specified by the set rules;

[0033] If it conforms, the verification passes.

[0034] In some embodiments, after determining that the name of the data to be processed conforms to the set rules, the processing unit is further configured to:

[0035] Determine whether the type of the data to be processed conforms to the type specified by the set rules;

[0036] If it conforms, the verification passes.

[0037] In some embodiments, the data processing request includes a write request; the processing unit is specifically configured to:

[0038] Write the data to be written in the first storage address according to the first data;

[0039] After mapping the processing result to the second storage address of the database, the method further includes:

[0040] Delete the first data in the first storage address.

[0041] In some embodiments, the processing unit is further configured to:

[0042] Determine that the user device has the permission to access and read and write the data stored in the second storage address.

[0043] In a third aspect, an embodiment of the present application provides an electronic device, which includes a controller and a memory. The memory is used to store computer execution instructions, and the controller executes the computer execution instructions in the memory to execute the operation steps of any possible implementation method of the first aspect by using the hardware resources in the controller.

[0044] In a fourth aspect, the present application provides a computer-readable storage medium, in which instructions are stored, and when they run on a computer, the computer is caused to execute the methods of the above aspects.

[0045] In addition, the beneficial effects of the second aspect to the fourth aspect can be referred to the beneficial effects described in the first aspect, and will not be elaborated here. Description of the Drawings

[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application.

[0047] Figure 1 It is a schematic structural diagram of a network architecture provided by an embodiment of the present application;

[0048] Figure 2 It is a flowchart of a data processing method provided by an embodiment of the present application;

[0049] Figure 3 It is a flowchart of another data processing method provided by an embodiment of the present application;

[0050] Figure 4 The structural schematic diagram of a data processing device provided by an embodiment of the present application;

[0051] Figure 5 The structural schematic diagram of an electronic device provided by an embodiment of the present application. Specific embodiments

[0052] To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the technical solutions of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the technical solutions of the present application, rather than all the embodiments. Based on the embodiments described in this application document, all other embodiments obtained by those of ordinary skill in the art without creative efforts belong to the scope of protection of the technical solutions of the present application.

[0053] The terms "first" and "second" in the specification and claims of the present application and the above-mentioned drawings are used to distinguish different objects, rather than to describe a specific order. In addition, the term "comprising" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but optionally further includes steps or units not listed, or optionally further includes other steps or units inherent to these processes, methods, products, or devices. "Multiple" in the present application may represent at least two, for example, it may be two, three, or more, and the embodiments of the present application do not make limitations.

[0054] In addition, the term "and / or" in this article is only a description of the association relationship between associated objects, indicating that there can be three relationships. For example, A and / or B may represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in this article generally represents an "or" relationship between the associated objects before and after without special explanation.

[0055] To facilitate the understanding of the data processing method proposed in the present application, the technical terms involved in the present application will be briefly introduced first.

[0056] (1) Flink: An open-source computing platform for distributed data stream processing and batch data processing, mainly implemented in Java, with the characteristics of high throughput and low latency. By implementing the InputFormat interface and OutputFormat interface of the Flink framework, the Flink platform can read and write data from different data sources. Since Flink is mainly used for data computing and data storage is not its main function, the Flink platform generally relies on third-party services to manage and store data. Based on this, Flink provides a large number of connectors. For example, when Flink uses Hive to implement data storage and management, the Flink-hive-connector can be used to access Hive, and the HiveCatalog can also be used to directly manage the metadata of Hive.

[0057] (2) Hadoop: An open-source architecture written in Java for storing massive data on a distributed server cluster and running distributed analysis applications. Its core components are HDFS and MapReduce.

[0058] (3) HDFS: A distributed storage system, which can be understood as a hard disk for storing large-scale data and can achieve the function of storing massive data.

[0059] (4) MapReduce: A distributed computing architecture, the core idea of which is "divide and conquer". It specifically includes two parts: Mapper and Reducer. Mapper is used to split complex tasks into multiple subtasks, and multiple subtasks can be computed in parallel. Reducer is used to summarize the results of each subtask.

[0060] (5) Hive: Hive is a database engine based on Hadoop, which can map structured data files into a database table for storage. Moreover, it can also convert Structured Query Language (SQL) statements into MapReduce code to provide simple SQL query functions. Since when directly using Hadoop, operation and maintenance personnel need to manually write MapReduce code to implement the function of data computing, Hive was proposed, which can directly convert SQL statements into MapReduce code, saving labor costs.

[0061] (6) Metadata of Hive: It is used to record all table names and database names stored in the Hive database. Simply put, the metadata of Hive is used to record what databases, tables, table formats, directories, partitions, indexes, and namespaces are stored in the Hive database (i.e., a database adopting the Hive architecture, hereinafter simply referred to as the Hive database for ease of description).

[0062] Next, for the convenience of understanding the solution proposed in this application, the network architecture adopted in this application will be introduced. For example, refer to Figure 1 , the network architecture adopted in this application includes a user device 101, a Flink platform 102, and a database 103. The user device 101 can process the data in the database 103 through the Flink platform 102, such as writing data into the database 103 or deleting or modifying the data in the database 103.

[0063] Figure 1 The user device 101 shown can also be referred to as a terminal (User Equipment, UE), or a terminal device, a mobile station (Mobile Station, MS), a mobile terminal (Mobile Terminal, MT), etc. It is a device that provides voice and / or data connectivity to users. For example, it can be a handheld device with wireless connection capabilities, a vehicle-mounted device, etc. Currently, some examples of user devices are: mobile phones, tablet computers, laptop computers, palm computers, Mobile Internet Devices (MIDs), wearable devices, Virtual Reality (VR) devices, Augmented Reality (AR) devices, wireless terminals in industrial control, wireless terminals in self-driving, wireless terminals in remote medical surgery, wireless terminals in smart grids, wireless terminals in transportation safety, wireless terminals in smart cities, wireless terminals in smart homes, etc. In some embodiments, the user device involved in this application may include a display screen for displaying various display interfaces.

[0064] Figure 1The functions of the Flink platform 102 shown can be implemented by a single server or by a server cluster. Alternatively, the functions of the Flink platform 102 can also be implemented by a chip or a processor, such as a chip or a processor deployed in the user device 101 or in the database 103. That is to say, the functions of the Flink platform 102 can be implemented by independent devices or can be deployed in the user device 102 and the database 103. This application does not make specific limitations in this regard. For the specific functions of the Flink platform 102, reference can be made to the introduction of Flink in the above technical terms, which will not be elaborated here.

[0065] Figure 1 The database 103 shown can be a server including data computing functions and data storage functions or can also be a simple memory. Alternatively, the database 103 can also be a distributed database cluster. This application does not make specific limitations on the architecture adopted by the database. For example, the database 103 can be a hive database. Optionally, the metadata of the database 103 can be stored in a relational database, such as a mysql or postgresql database (not shown in Figure 1 ).

[0066] In some embodiments, in order to ensure that the Flink platform 102 can normally access and manage the database 103, the network architecture involved in this application can also include a connector between the Flink platform 102 and the database 103 (not shown in Figure 1 ). For example, when the database 103 is a hive database, the Flink platform 102 can access and manage the data in the hive database through the Flink-hive-connector.

[0067] It should be noted that this application does not make specific limitations on the implementation forms and quantities of the user device 101, the Flink platform 102, and the database 103, Figure 1 only as an example. Subsequently, for the convenience of description, the user device 101 will be simply referred to as the user device, the Flink platform 102 will be simply referred to as the Flink platform, and the database 103 will be simply referred to as the database.

[0068] Next, the data processing method proposed in this application will be introduced. For ease of understanding, reference can be made to Figure 2 , which is a schematic flowchart of a data processing method provided by an embodiment of this application. Optionally, the one executing this method flow can be the above Figure 1The Flink platform introduced in []. As a possible implementation, the functions of the Flink platform for executing this method process can be implemented by a server or a server cluster. Alternatively, the Flink platform can be deployed in a user device or a database. The specific steps of this method process include:

[0069] 201, Receive a data processing request from a user device.

[0070] Among them, the data processing request is used to indicate the processing of data in the database. Optionally, processing the data in the database may include deleting or changing the existing data in the database, or may also include writing data into the database.

[0071] 202, Process the data processing request in the first storage address included in the user device according to the data processing request to obtain a processing result.

[0072] Optionally, the user device may include a certain amount of storage space (such as the memory of the user device), and the first storage address is any address in the storage space of the user device. After the Flink platform receives a data processing request from the user device for indicating the processing of data in the database, it can first process the request in a certain storage address of the user device to obtain a processing result.

[0073] As an example, for instance, if the data processing request indicates writing data A into the database, the Flink platform can write the data A into the memory of the user device. That is, the processing result is the written data A.

[0074] 203, Verify the data processing request according to the set rules of the database.

[0075] Optionally, the data processing request may include the data to be processed and the name of the data to be processed.

[0076] As a possible implementation, the set rules of the database can be used to check whether the name and type of the data to be processed meet the standards. For example, the data to be processed is the amount of a certain type of commodity, in tabular format, and the name of the data to be processed is "commodity amount". The set rules of the database indicate that the name of the stored data should be "commodity amount" and the data type should be in key-value pair format. Then the above data to be processed will not meet the set rules of the database due to the format mismatch and the verification will fail. If the set rules of the database indicate that the name of the stored data is "commodity amount" and the data type is tabular. Then the above data to be processed will pass the verification.

[0077] It should be noted that the present application does not specifically limit the execution order of steps 202 and 203. For example, step 202 can be executed first, or step 203 can be executed first.

[0078] 204. When the verification passes, map the processing result to the second storage address in the database.

[0079] Optionally, before processing the data to be processed, the Flink platform can first establish a mapping relationship between the first storage address in the user device's memory and the second storage address in the database. Through this mapping relationship, the data at the first storage address can be mapped to the second storage address. As an example, the mapping relationship between the first storage address and the second storage address can be regarded as a process of writing data from a local device to a cloud storage. Different from this, in the present application, it is not automatically uploaded to the database after writing to the memory of the user device (i.e., the local device), but the Flink platform needs to first perform verification, and after the verification passes, it is mapped to the database.

[0080] Based on the above solution, the present application proposes that when processing data, first process the data in the memory of the user device to obtain a processing result, and then, after the data to be processed passes the verification, map the processing result in the memory of the user device to the database according to the pre-configured mapping relationship. The verification step ensures the consistency of the structures of data with the same name, solves the problem of naming chaos caused by different users directly operating the data in the database through their respective user devices, that is, avoids the situation where the structures of two files with the same name are completely different. It ensures the consistency of the data stored in the same database table in the same database.

[0081] In some embodiments, some rules can also be preset in the Flink platform. For example, different user devices can be configured with permissions for different database tables through the Flink platform to avoid users accidentally deleting, writing, or modifying data. Optionally, data control statements (DCL) from user devices can be blocked, such as permissions similar to those of an administrator, including grant (assigning permissions to a user) and revoke (revoking the permissions of a certain user in the database). Optionally, the Flink platform can be set to normally receive data definition language (DDL) or data manipulation language (DML) from user devices. In other words, the Flink platform can be set to receive data processing requests for DDL or DML statements normally and can be set to block data processing requests for DCL statements. Optionally, when the Flink platform receives a request from a user device indicating that data in a certain storage address in the database is to be processed, it can first determine whether the user device has the permission to access and read / write the certain storage address. If it has the permission, it will perform data processing according to the content of the request; otherwise, it will not perform data processing. Based on this solution, it is possible to avoid users accidentally deleting data or other incorrect operations on data due to the same name and format.

[0082] In some scenarios, when the data processing request is used to request writing a certain piece of data into the database, the Flink platform can write the data into the first storage address in the user device's memory and can create a mapping relationship between the first storage address and the second storage address in the database (as another optional way, this mapping relationship can also be created before receiving the request to write data). After writing the data to be written into the first storage address, further, the Flink platform can verify whether the format and name of the data to be written meet the storage requirements of the second storage address. For example, if only data named "to-do list" and in string format can be stored in the second storage address, then the Flink will verify whether the name of the data to be written is "to-do list" and whether the format is a string. If so, it will pass the verification. Optionally, after determining that the data to be written passes the verification, the Flink can map the data to be written that has been written into the first storage address to the second storage address in the database according to the pre-configured mapping relationship.

[0083] In some embodiments, some intermediate data may be generated during the process of Flink writing the data to the first storage address. For example, the data to be written is a three-row and three-column table A. The first column of table A is the same as the second column of an existing table B, the second column of table A is the same as the first column of table C, and the third column of table A is the same as the first column of table B. Therefore, when the Flink platform writes table A, it can generate table A based on table B and table C. Then, table B and table C will be used as the intermediate data generated during the process of writing table A. When the Flink platform writes the data to be written to the first storage address, the intermediate data generated during the writing process will also be stored in the first storage address. After the Flink platform maps the data to be written to the second storage address, it can delete the intermediate data stored in the first storage address. Since in the related art, the user device directly accesses the database and writes the data to be written in the database, the intermediate data generated during the process of writing the data will also be stored in the database, resulting in the problem of waste of storage resources in the database. However, based on the solution proposed in the present application, the process of generating the data to be written is performed in the user device. Therefore, the intermediate data generated during the process of generating the data to be written will only be stored in the user device. This avoids wasting the storage resources of the database. And after the data to be written is mapped to the database, the intermediate data in the user device will be deleted. Therefore, the solution proposed in the present application will not cause a burden on the user device.

[0084] In a possible scenario, the Flink platform can also pre-obtain the metadata of the database from a third-party database (such as a relational database) for storing the metadata of the database. After the Flink platform writes the data to be written to the first storage address in the user device and maps it to the second storage address of the database, it can also add the relevant information of the data to be written to the metadata of the database, such as the storage address, name, and category of the data to be written.

[0085] Next, in order to further understand the solution proposed in the embodiments of the present application, specific embodiments will be introduced. Refer to Figure 3 , which is a data transmission method provided by an embodiment of the present application. Specifically, it includes:

[0086] 301. The user device sends a request to the Flink platform for instructing to write data A to the database.

[0087] Optionally, the request may further include the address in the database indicated by the user device for writing data A. For the convenience of description, this address will be referred to as address A hereinafter.

[0088] 302. The Flink platform receives the request and writes data A in the user device memory.

[0089] For ease of description, hereinafter, the address where data A is written into the user device memory will be simply referred to as address B, and there is a preset mapping relationship between address B and address A in the database.

[0090] Optionally, some intermediate data may be generated during the process of writing data A to address B, and this intermediate data will also be stored in address B.

[0091] 303, the Flink platform determines whether data A passes the verification.

[0092] Specifically, the Flink platform verifies data A according to the setting rules of address A in the database and determines whether data A can pass the verification. Optionally, the specific verification process can refer to the introduction in the above embodiments and will not be elaborated here.

[0093] If the verification passes, continue to step 304.

[0094] If the verification fails, send an indication message for indicating data error to the user device.

[0095] 304, the Flink platform maps data A to address A according to the mapping relationship.

[0096] The specific mapping process can refer to the introduction in the above embodiments and will not be elaborated here.

[0097] 305, the Flink platform deletes the intermediate data stored in address B.

[0098] Based on the same concept as the above method, refer to Figure 4 , a data processing apparatus 400 provided in an embodiment of the present application. The apparatus 400 can execute each step in the above method. To avoid repetition, it will not be elaborated here. The apparatus 400 includes: a transceiver unit 401 and a processing unit 402.

[0099] The transceiver unit 401 is used to receive a data processing request from the user device; the data processing request is used to indicate processing of data in the database;

[0100] The processing unit 402 is configured to execute:

[0101] Process the data processing request in a first storage address included in the user device according to the data processing request to obtain a processing result;

[0102] Verify the data processing request according to the setting rules of the database;

[0103] When the verification passes, map the processing result to a second storage address in the database.

[0104] In some embodiments, the data processing request includes the data to be processed and the name of the data to be processed; the processing unit 402 is specifically configured to:

[0105] Determine whether the name of the data to be processed conforms to the name specified by the set rule;

[0106] If it conforms, the verification passes.

[0107] In some embodiments, after determining that the name of the data to be processed conforms to the set rule, the processing unit 402 is further configured to:

[0108] Determine whether the type of the data to be processed conforms to the type specified by the set rule;

[0109] If it conforms, the verification passes.

[0110] In some embodiments, the data processing request includes a write request; the processing unit 402 is specifically configured to:

[0111] Write the data to be written in the first storage address according to the first data;

[0112] After mapping the processing result to the second storage address of the database, the method further includes:

[0113] Delete the first data in the first storage address.

[0114] In some embodiments, the processing unit 402 is further configured to:

[0115] Determine that the user device has the permission to access and read and write the data stored in the second storage address.

[0116] Figure 5 FIG. shows a schematic structural diagram of an electronic device 500 provided by an embodiment of the present application. The electronic device 500 in the embodiment of the present application may further include a communication interface 503. The communication interface 503 is, for example, a network interface. The electronic device can transmit data through the communication interface 503. For example, the communication interface 503 can implement the above Figure 4 function of the transceiver unit 401.

[0117] In the embodiment of the present application, the memory 502 stores instructions that can be executed by at least one controller 501. By executing the instructions stored in the memory 502, at least one controller 501 can be used to execute each step in the above method. For example, the controller 501 can implement the above Figure 4 function of the processing unit 402.

[0118] Among them, the controller 501 is the control center of the electronic device. It can connect various parts of the entire electronic device through various interfaces and circuits, and run or execute instructions stored in the memory 502 and call data stored in the memory 502. Optionally, the controller 501 may include one or more processing units. The controller 501 may integrate an application controller and a modulation and demodulation controller. Among them, the application controller mainly processes the operating system and application programs, etc., and the modulation and demodulation controller mainly processes wireless communication. It can be understood that the above modulation and demodulation controller may not be integrated into the controller 501 either. In some embodiments, the controller 501 and the memory 502 may be implemented on the same chip, and in some embodiments, they may also be separately implemented on independent chips.

[0119] The controller 501 can be a general-purpose controller, such as a central controller (CPU), a digital signal controller, an application-specific integrated circuit, a field programmable gate array, or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present application. The general-purpose controller can be a microcontroller or any conventional controller, etc. The steps executed by the data statistics platform disclosed in combination with the embodiments of the present application can be directly executed by the hardware controller, or executed by a combination of hardware and software modules in the controller.

[0120] As a non-volatile computer-readable storage medium, the memory 502 can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. The memory 502 may include at least one type of storage medium. For example, it may include flash memory, a hard disk, a multimedia card, a card-type memory, a random access memory (RAM), a static random access memory (SRAM), a programmable read-only memory (PROM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic memory, a magnetic disk, an optical disc, etc. The memory 502 is any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 502 in the embodiments of the present application may also be a circuit or any other device capable of implementing a storage function, for storing program instructions and / or data.

[0121] By programming the design of the controller 501, for example, the code corresponding to the training method of the neural network model introduced in the foregoing embodiments can be solidified into the chip, so that the chip can execute the steps of the foregoing neural network model training method during operation. How to program the design of the controller 501 is a well-known technology to those skilled in the art and will not be elaborated here.

[0122] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0123] The present application is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the present application. It should be understood that each flow and / or block in the flowchart and / or block diagram, and the combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the controller of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, so that the instructions executed by the controller of the computer or other programmable data processing devices generate means for implementing the specified functions in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.

[0124] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured article including an instruction device, and the instruction device implements the specified functions in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.

[0125] These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide steps for implementing the specified functions in Figure 1 one process or multiple processes and / or blocks Figure 1 one block or multiple blocks.

[0126] Although the preferred embodiments of the present application have been described, additional changes and modifications can be made to these embodiments by those skilled in the art once they learn of the basic creative concept. Therefore, the appended claims are intended to be construed to include the preferred embodiments as well as all changes and modifications that fall within the scope of the present application.

[0127] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalent technologies, the present application is also intended to include these modifications and variations.

Claims

1. A data processing method, characterized in that, Applied to the Flink platform, including: Receiving a data processing request from a user device; the data processing request is used to indicate processing of data in a database; Processing the data processing request in a first storage address included in the user device according to the data processing request to obtain a processing result; Verifying the data processing request according to the set rules of the database; When the verification passes, based on the pre - constructed mapping relationship between the first storage address and the second storage address of the database, mapping the processing result to the second storage address of the database.

2. The method according to claim 1, characterized in that, The data processing request includes data to be processed and the name of the data to be processed; the verifying the data processing request according to the set rules of the database includes: Determining whether the name of the data to be processed conforms to the name specified by the set rules; If it conforms, the verification passes.

3. The method according to claim 2, characterized in that, After determining that the name of the data to be processed conforms to the set rules, the method further includes: Determining whether the type of the data to be processed conforms to the type specified by the set rules; If it conforms, the verification passes.

4. The method according to any one of claims 1 to 3, characterized in that The data processing request includes a write request; processing the data in the first storage address according to the data processing request includes: Writing the data to be written in the first storage address according to the first data; After mapping the processing result to the second storage address of the database, the method further includes: Deleting the first data in the first storage address.

5. The method according to any one of claims 1 to 3, characterized in that, Before verifying the data processing request according to the set rules of the database, the method further includes: Determining that the user device has the permission to access and read / write the data stored in the second storage address.

6. A data processing device, characterized in that, Including: A transceiver unit for receiving a data processing request from a user device; The data processing request is used to indicate processing of data in a database; A processing unit configured to execute: Processing the data processing request in a first storage address included in the user device according to the data processing request to obtain a processing result; Verifying the data processing request according to the set rules of the database; When the verification passes, based on the pre - constructed mapping relationship between the first storage address and the second storage address of the database, mapping the processing result to the second storage address of the database.

7. The device according to claim 6, characterized in that, The data processing request includes data to be processed and the name of the data to be processed; the processing unit is specifically used for: Determining whether the name of the data to be processed conforms to the name specified by the set rules; If it conforms, the verification passes.

8. The device according to claim 7, wherein, After determining that the name of the data to be processed conforms to the set rules, the processing unit is further used for: Determining whether the type of the data to be processed conforms to the type specified by the set rules; If it conforms, the verification passes.

9. The device according to any one of claims 6 - 8, characterized in that The data processing request includes a write request; the processing unit is specifically used for: Writing the data to be written in the first storage address according to the first data; After mapping the processing result to the second storage address of the database, the method further includes: Delete the first data in the first storage address.

10. The device according to any one of claims 6-8, characterized in that, The processing unit is further configured to: Determine that the user equipment has the permission to access and read / write the data stored in the second storage address.

11. An electronic device, characterized in that, The electronic device includes a controller and a memory. The memory is used to store computer programs or instructions. The controller is configured to execute the computer programs or instructions in the memory, so that the method described in any one of claims 1-5 is executed.

12. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when called by a computer, cause the computer to execute the method described in any one of claims 1-5.

Citation Information

Patent Citations

  • Data processing method and device, electronic equipment and storage medium

    CN112069163A