Data processing method, device and system, electronic equipment and storage medium
By converting business data into tag information and storing it, and judging the compliance of data processing activities based on tag information, the problems of low controllability and accuracy of judgment results in the prior art are solved, and more efficient data processing compliance judgment is achieved.
Patent Information
- Application Number
- CN202510280486.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-10
- Publication Date
- 2025-06-10
AI Technical Summary
The data processing activities accumulated by enterprises and organizations in daily operations are difficult to ensure that the actions meet preset conditions, and the existing technology has problems with low controllability and accuracy of judgment results.
By converting the business data of the subject and the object into tag information for storage, and determining whether the actions performed by the subject against the object meet preset conditions based on the tag information, a deterministic tag judgment is achieved.
It improves the controllability and accuracy of the judgment results, and reduces the computing power required for judgment compared with statistics-based methods, and ensures that the data processing activities meet the requirements.
Smart Images

Figure CN120123348A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to a data processing method, a data processing apparatus, a data processing system, an electronic device, and a computer-readable storage medium. Background Art
[0002] With the in-depth development of digitalization, networking, and intelligence, network operations and data processing activities are becoming increasingly frequent, and the data accumulated by enterprises and organizations in their daily operations is also increasing. Summary of the Invention
[0003] This Summary of the Invention section is provided to introduce concepts in a brief form that will be described in detail in the following Detailed Implementation section. This Summary of the Invention section is not intended to identify key features or essential features of the claimed technical solution, nor is it intended to be used to limit the scope of the claimed technical solution.
[0004] At least one embodiment of the present disclosure provides a data processing method, including: in response to receiving a write request, determining first tag data of a first entity included in the write request; and writing the first tag data into a first database, where the first tag data is obtained by converting service data corresponding to the first entity, the first entity belongs to a target entity, and the target entity includes a subject and an object; the tag data of the subject and the tag data of the object are used to determine whether an action performed by the subject on the object meets a preset condition.
[0005] At least one embodiment of the present disclosure provides another data processing method, including: in response to obtaining service data corresponding to a first entity, converting the service data into first tag data of the first entity; and generating a write request based on the first tag data to write the first tag data into a first database, where the first entity belongs to a target entity, the target entity includes a subject and an object, and the tag data of the subject and the tag data of the object are used to determine whether an action performed by the subject on the object meets a preset condition.
[0006] At least one embodiment of the present disclosure provides a data processing apparatus, including: a data determination module configured to, in response to receiving a write request, determine first tag data of a first entity included in the write request; and a data writing module configured to write the first tag data into a first database, where the first tag data is obtained by converting service data corresponding to the first entity, the first entity belongs to a target entity, the target entity includes a subject and an object; the tag data of the subject and the tag data of the object are used to determine whether an action performed by the subject on the object meets a preset condition.
[0007] At least one embodiment of the present disclosure provides another data processing device, including: a data conversion module configured to convert service data into first label data of a first entity in response to obtaining service data corresponding to the first entity; and a request generation module configured to generate a write request based on the first label data to write the first label data into a first database, where the first entity belongs to a target entity, and the target entity includes a subject and an object, and the label data of the subject and the label data of the object are used to determine whether an action performed by the subject on the object meets a preset condition.
[0008] At least one embodiment of the present disclosure provides a data processing system, including: a first database; and a data processing node communicatively connected to the first database, the data processing node being configured to: determine first label data of a first entity included in a write request in response to receiving the write request; and write the first label data into the first database, where the first label data is obtained by converting service data corresponding to the first entity, the first entity belongs to a target entity, and the target entity includes a subject and an object; and the label data of the subject and the label data of the object are used to determine whether an action performed by the subject on the object meets a preset condition.
[0009] At least one embodiment of the present disclosure provides an electronic device, including: a processing device; and a storage device including one or more computer program instructions; where, when the one or more computer program instructions are run by the processing device, they execute the data processing method provided by at least one embodiment of the present disclosure.
[0010] At least one embodiment of the present disclosure provides a computer-readable storage medium that non-temporarily stores computer-readable instructions, where, when the computer-readable instructions are executed by a processor, the data processing method provided by at least one embodiment of the present disclosure is implemented.
[0011] At least one embodiment of the present disclosure provides a computer program product including computer programs / instructions, and when the computer programs / instructions run on a computer, the computer is caused to execute the data processing method provided by at least one embodiment of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0012] In combination with the accompanying drawings and with reference to the following specific embodiments, the above and other features, advantages and aspects of the various embodiments of the present disclosure will become more obvious. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic, and the original elements and elements are not necessarily drawn to scale.
[0013] Figure 1 Schematically shows an exemplary application scenario of the data processing method, device and system provided by at least one embodiment of the present disclosure;
[0014] Figure 2 Schematically shows a flowchart of a data processing method provided by at least one embodiment of the present disclosure;
[0015] Figure 3 Schematically shows a flowchart of a data processing method provided by at least another embodiment of the present disclosure;
[0016] Figure 4 Schematically shows a schematic diagram of the principle of writing tag data into a database according to at least one embodiment of the present disclosure;
[0017] Figure 5 Schematically shows a schematic diagram of the principle of querying service data according to at least one embodiment of the present disclosure;
[0018] Figure 6 Schematically shows a schematic diagram of the principle of caching tag data in a snapshot manner according to at least one embodiment of the present disclosure;
[0019] Figure 7 Schematically shows a technical architecture diagram of providing a snapshot service according to at least one embodiment of the present disclosure;
[0020] Figure 8 Schematically shows a schematic diagram of the principle of updating cached tag data according to at least one embodiment of the present disclosure;
[0021] Figure 9 Schematically shows a schematic diagram of the principle of writing tag data into a database according to at least another embodiment of the present disclosure;
[0022] Figure 10 Schematically shows a logical architecture diagram of implementing a data processing method according to at least one embodiment of the present disclosure;
[0023] Figure 11 Schematically shows a system architecture diagram of implementing a data processing method according to at least one embodiment of the present disclosure;
[0024] Figure 12 Schematically shows a structural block diagram of a data processing system according to at least one embodiment of the present disclosure;
[0025] Figure 13 Schematically shows a structural block diagram of a data processing system according to at least another embodiment of the present disclosure;
[0026] Figure 14 Schematically shows a structural block diagram of a data processing device according to at least one embodiment of the present disclosure;
[0027] Figure 15 Schematically shows a structural block diagram of a data processing device according to at least another embodiment of the present disclosure; and
[0028] Figure 16The figure shows a schematic structural diagram of an electronic device suitable for implementing the embodiments of the present disclosure. Detailed implementation manners
[0029] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although some embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. On the contrary, these embodiments are provided to more thoroughly and completely understand the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not used to limit the protection scope of the present disclosure.
[0030] It should be understood that the various steps recited in the method embodiments of the present disclosure can be executed in a different order and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this regard.
[0031] As used herein, the term "including" and its variations are open-ended, that is, "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.
[0032] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order of the functions performed by these devices, modules or units or the interdependence relationship.
[0033] It should be noted that the modifications of "one" and "plural" mentioned in the present disclosure are illustrative rather than restrictive. Those skilled in the art should understand that unless otherwise clearly stated in the context, it should be understood as "one or more".
[0034] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only for illustrative purposes and are not used to limit the scope of these messages or information.
[0035] With the in-depth development of digitalization, networking, and intelligence, network operations and data processing activities are becoming increasingly frequent, and the data accumulated by enterprises and organizations in their daily operations is also increasing. For example, enterprises and organizations are facing the challenge of how to ensure that data processing activities meet the requirements.
[0036] To ensure that data processing activities comply with requirements, it is possible to judge whether the data generated by the data processing activities meets the requirements, that is, to determine whether the actions performed by the execution entity of the data processing activities comply with preset conditions. The actions performed by the execution entity may include, for example, reading data, storing data, or modifying data, etc. For the sake of convenient description, hereinafter, the recipient of the actions performed by the execution entity is described as the object, the execution entity is simply referred to as the subject, and the actions that the execution entity is permitted to perform are described as actions that comply with preset conditions. The preset conditions may represent, for example, the regulations that an organization needs to comply with when processing, storing, and transmitting data.
[0037] For example, data classification and marking work can be adopted to classify and mark business data, and based on the classification and marking results, determine whether the actions involved in the business data comply with preset conditions. However, this method makes judgments based on statistical principles and has problems of low controllability and accuracy.
[0038] To at least partially solve these technical problems, at least one embodiment of the present disclosure provides a data processing method, including: in response to receiving a write request, determining first tag data of a first entity included in the write request; and writing the first tag data into a first database. The first tag data is obtained by converting business data corresponding to the first entity, the first entity belongs to a target entity, the target entity includes a subject and an object, and the tag data of the subject and the tag data of the object are used to determine whether the actions performed by the subject on the object comply with preset conditions.
[0039] Based on the data processing method provided by at least one embodiment of the present disclosure, at least one embodiment of the present disclosure further provides a data processing device, a data processing system, an electronic device, and a computer-readable storage medium.
[0040] The data processing method provided by at least one embodiment of the present disclosure stores the business data of the subject and the object by converting it into tag information, and determines whether the actions performed by the subject on the object comply with preset conditions based on the tag information. It can use deterministic tags to express the judgment problem of whether the actions comply with preset conditions. Compared with the technical solutions that make judgments based on statistical methods, it can at least partially improve the controllability and accuracy of the judgment results.
[0041] The embodiments of the present disclosure and some of their examples will be described in detail below with reference to the accompanying drawings.
[0042] Figure 1 Schematically shows an exemplary application scenario of the data processing method, device, and system provided by at least one embodiment of the present disclosure.
[0043] As Figure 1As shown, in application scenario 100 of this embodiment, upstream service 130, tag storage service 120, and database 150 for storing tag data are involved.
[0044] For example, tag storage service 120 can be provided by a system for storing entity tags. For example, tag storage service 120 can be called BSave Entity Service, which is also simply referred to as BES hereinafter. Upstream service 130 can be, for example, an Agent or a Policy Engine, etc. For example, BES can be integrated by upstream service 130 to label records written to business storage, that is, to convert the generated and stored business data (which is also described as labeling business data) to obtain tag data. Tag storage service 120 is then used to write the tag data into database 150.
[0045] For example, the data stored in database 150 can be data in units of key-value pairs. Tag storage service 120 and upstream service 130 can be provided by different physical nodes, or can be provided by the same physical node.
[0046] For example, it is possible to rely on pre-configured tags to label business data. For example, in this application scenario 100, tag service 110 is also involved. Tag configurator 101 can, for example, use tag service 110 to configure all tags. The all tags can define the attribute types of all entities and the all attribute values of each attribute type. Tag storage service 120 can, for example, periodically obtain the all tags provided by tag service 110 (which can be provided in the form of a tag tree, for example) for upstream service 130 to call.
[0047] For example, it is also possible to rely on pre-configured entity configurations to determine the tags of entities involved in business data. For example, in this application scenario 100, configuration service 140 is also involved. Entity definer 102 can, for example, configure entities, such as configuring the all types of entities and the attribute types that each type of entity should have, etc. Configuration service 140 can be provided through a distributed transaction (Try-Confirm-Cancel, simply referred to as TCC), which can be used to store entity configuration information. Tag storage service 120 can, for example, periodically obtain the entity configuration information stored by configuration service 140 for upstream service 130 to call.
[0048] For example, tag service 110 and configuration service 140 can be provided by different terminal devices. These services can be provided in the form of an interactive page. The terminal device can be any one of, for example, a smart wearable device, a smart phone, a tablet computer, a laptop computer, and a desktop computer, etc. The embodiments of the present disclosure do not make any limitations in this regard.
[0049] For example, the upstream service 130 can integrate the capabilities of the tag storage service 120 through a Software Development Kit (hereinafter simply referred to as SDK). For example, it can obtain the full set of tags and entity configuration information by calling the SDK, and convert the business data based on the obtained full set of tags and entity configuration information to obtain the tag data of the entities involved in the business data, and write the tag data into the database 150 via the tag storage service 120.
[0050] For example, the upstream service 130 can also read the tag data of an entity from the database 150 via the tag storage service 120 according to a read request. For example, it can read the tag data of the subject and the object, and determine the actions that the subject is allowed to perform on the object based on the read tag data of the subject and the object. By comparing the actions with the actions performed by the data processing activity, it determines the judgment result of whether the actions involved in the data processing activity meet the preset conditions. For example, it can also read the tag data of an entity from the database 150 according to the need to query business data, and use the tag data as the basis for searching for the business database storing the business data, and query the business data from the searched business database.
[0051] For example, the data processing method provided by at least one embodiment of the present disclosure can be executed by the tag storage service 120, and the data processing method provided by at least another embodiment of the present disclosure can be executed by the upstream service 130. For example, the data processing method provided by at least one embodiment of the present disclosure can be implemented in the form of software, hardware, firmware, or any combination thereof. For example, the data processing method provided by at least one embodiment of the present disclosure is applicable to a terminal device or a server, and the terminal device or the server can load and execute the data processing method, and the embodiments of the present disclosure do not limit this. For example, the terminal device and / or the server can include a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a Digital Signal Processor (DSP), or other forms of processing units with data processing capabilities and / or instruction execution capabilities, a storage unit, etc. An operating system, an application programming interface (such as OpenGL (Open Graphics Library), Metal, etc.) is also installed on the computing device, and the data processing method provided by the embodiments of the present disclosure is implemented by running code or instructions.
[0052] The following will combine Figures 2 to 11 to describe in detail the implementation principle of the data processing method provided by at least one embodiment of the present disclosure.
[0053] Figure 2 Schematically shown is a flowchart of a data processing method provided by at least one embodiment of the present disclosure.
[0054] As Figure 2 shown, the data processing method 200 of this embodiment may include step S210 to step S220. The data processing method 200 may be run by the upstream service described above, for example.
[0055] Step S210, in response to obtaining service data corresponding to a first entity, convert the service data into first label data of the first entity.
[0056] Step S220, generate a write request based on the first label data to write the first label data into a first database.
[0057] For example, the service data may be data generated by a user's behavior of booking items needed in life on the network, data generated by a user's information publishing on the network, data generated by the behavior of a maintainer of employee information in an enterprise or organization entering employee information, multimedia information recording data, or comment records, etc. For example, one piece of service data may correspond to an entity, and the entity may be any distinguishable thing such as a person, a work order, a video, a picture, etc. For example, if user A books a plane ticket on a booking platform, the traffic data generated by this booking operation is a piece of service data.
[0058] For example, the service data may be stored in a service database corresponding to the booking platform. For example, before the service data is stored in the service database, the upstream service may first convert the service data to obtain label data of the entity corresponding to the service data. After obtaining the label data or writing the label data into the first database, the service data is then stored in the service database. For example, the upstream service may be a service that provides the service that generates the service data, such as a service that provides a booking platform, or may also be an agent or a policy engine, etc. The service data may be generated by the upstream service or by other services with the upstream service as an agent. The embodiments of the present disclosure do not limit this.
[0059] For example, entity and attribute information can be first extracted from business data, and tag data can be obtained based on the entity and attribute information. For example, character recognition technology can be used to identify the entity name field and the attribute value field in the business data, so as to extract the entity and attribute information. Or a pre-trained sequence labeling model or the like can be used to label the entity and attribute information in the business data, so as to obtain the entity and attribute information. For example, after obtaining the entity and attribute information, the entity and attribute information can be arranged and combined according to actual needs to obtain tag data. For example, the entity and attribute information can also be organized into key-value pairs, and the organized key-value pairs can be used as tag data. For example, the attribute type corresponding to the attribute information can be first determined according to the foregoing full amount of tags, and then the entity, the attribute type, and the attribute information are combined into tag data.
[0060] For example, the composition of the tag data can include the identification information of the entity (for example, it can be the identity identification number entity_id of the entity), the attribute type (which can be represented by the identification information tag_id of the attribute type), and the attribute value (for example, it can be represented by the identification information tag_value_id of the attribute value). The tag data can be in the form of key-value pairs. The identification information of the entity and the attribute type constitute the value of the key in the key-value pair, and the attribute value constitutes the value of the value in the key-value pair. In one embodiment, the tag data can also include, for example, the entity type (which can be represented by the identification information entity_type_id of the entity type). In the tag data in the form of key-value pairs, the entity type is a part of the value of the key, so that it is convenient to judge whether the actions of different types of entities meet different preset conditions.
[0061] For example, the entity corresponding to the business data belongs to the target entity, and the target entity includes at least a subject and an object. For example, the entity corresponding to the business data (such as the first entity) can be a subject or an object. For example, the subject can include enterprises, organizations, network operators, security management teams, personnel, etc., and the object can include data, network devices, application systems, data records (such as video records, comment records), etc. Whether the action performed by the subject on the object meets the preset conditions can be determined, for example, according to the tag data of the subject and the tag data of the object. For example, when judging whether the action performed by the subject on the object in the data processing activity meets the preset conditions, the tag data of the subject and the tag data of the object can be first obtained, and then the actions allowed for the subject are determined according to the tag data. If the action performed by the subject in the actual data processing activity does not match the action allowed for the subject, it can be determined that the actual data processing activity does not meet the requirements, that is, the action performed by the subject on the object in the data processing activity does not meet the preset conditions.
[0062] For example, taking the requirement that data processing activities should meet as an example, where employees at level two can access the basic information (such as the start date of employment, etc.) of employees at level three, but cannot access salary information. If a data processing activity is that employee B at level two requests to access the salary information of employee C at level three, then the label data of employee B and the label data of employee C can be obtained from the first database. For example, the obtained label data of employee B includes: the identity identification number of employee B, the level indicating the attribute type, and the level two indicating the attribute value. The obtained label data of employee C includes: the identity identification number of employee C, the level indicating the attribute type, and the level three indicating the attribute value. According to these two parts of label data, it can be determined that the actions allowed for employee B to perform on employee C include actions such as accessing the start date of employment, but do not include actions such as accessing salary information. Then, it can be determined that the action of employee B at level two accessing the salary information of employee C at level three does not meet the preset conditions, and this data processing activity does not meet the requirements, so no response is given.
[0063] After obtaining the label data of the entity, a write request including the label data of the entity can be generated, and the label input can be written into the first database via the label storage service by calling the SDK. For example, the write request can be sent to the label storage service, and the label storage service can write the label data into the first database through the Figure 3 process shown. For example, the first database can be the database 150 mentioned above. For example, the first database can adopt a KV storage system, and the embodiments of the present disclosure do not limit this. Figure 1
[0064] At least one embodiment of the present disclosure stores business data by converting it into label data, and determines whether the actions performed by the subject on the object in the data processing activity meet the preset conditions based on the label data of the subject and object involved in the data processing activity. The scenario model for determining whether the data processing activity meets the requirements can be abstracted into a "subject - object - action" triple. Also, when determining the allowed actions, it can rely on deterministic label data instead of obtaining label data and allowed actions based on statistical principles. Therefore, the implementation accuracy of determining whether the data processing activity meets the requirements is higher and the controllability is also higher. Moreover, compared with statistical principles, the computing power required for judgment can be reduced.
[0065] Figure 3 Schematically shows a flowchart of a data processing method provided by at least another embodiment of the present disclosure.
[0066] As Figure 3 shown, the data processing method 300 of this embodiment includes steps S310 to S320, and the data processing method 300 can be run by the label storage service 120 described above.
[0067] Step S310: In response to receiving a write request, determine the first tag data of the first entity included in the write request.
[0068] Step S320: Write the first tag data into the first database.
[0069] For example, in response to receiving a write request, the write request can be parsed to obtain the tag data included in the write request. Subsequently, the tag data is written into the first database for storing tag data. For example, the tag data is the data obtained by converting service data through the foregoing step S210.
[0070] In at least one embodiment of the present disclosure, by storing the tag data of an entity obtained by converting service data, it is convenient to obtain the tag data when determining whether an action meets a preset condition, providing deterministic information for the determination of allowed actions and the judgment of whether data processing activities meet requirements, and facilitating improving the accuracy and controllability of the judgment. Through the technical solution of converting service data into tag data and storing the tag data in the embodiments of the present disclosure, the tag data can be mapped one-to-one with the row record of service data through identification information, which can support the judgment party of the preset condition to add, delete, or update tag data according to actual needs. The tag storage service only needs to store a small amount of data and tag data.
[0071] Figure 4 Schematically shows a schematic diagram of the principle of writing tag data into a database in at least one embodiment of the present disclosure.
[0072] In one embodiment, as Figure 4 shown, after service data is generated, the upstream service 410 can call the SDK 411 to instruct the tag storage service (also abbreviated as BES) 420 to write the tag data of the entity obtained by converting the service data into the database 430 to persist the tag data of the entity.
[0073] For example, the tag data of the entity includes fields entity_type_id, entity_id, tag_id, and tag_value_id. The value of the field entity_type_id represents the type of the entity, the value of the field entity_id is the identity identification number of the entity, the value of the field tag_id represents the type of the attribute, and the value of the field tag_value_id is the attribute value corresponding to the type of the attribute.
[0074] In at least one embodiment of the present disclosure, for a single entity, one or at least two pieces of tag data stored in the database 430 may be provided, and each piece of tag data may represent, for example, an attribute of the single entity. When reading the tag data, the identity identification information of the entity and at least one required attribute type may be used as the reading condition to read the tag data corresponding to the at least one attribute type.
[0075] For example, according to actual requirements, the tag data stored in the database for a single entity may be one piece, and this piece of tag data may represent all attributes of the single entity. When reading the tag data, the identity identification information of the entity may be used as the reading condition to read the tag data of the single entity.
[0076] For example, in different scenarios, the entity type to which a single entity belongs may be different. Then, when reading the tag data, the type of the entity may also be used as one of the reading conditions to read the tag data of the entity that matches the actual scenario.
[0077] Figure 5 The principle diagram of querying service data in at least one embodiment of the present disclosure is schematically shown.
[0078] In one embodiment, as Figure 5 shown, when the upstream service 510 receives a request to query service data related to the second entity, for example, a read request for the tag data of the second entity may be generated based on the query request to respond to the query request and read the tag data of the second entity.
[0079] For example, the request to query service data includes the identity identification number of the second entity and the attribute type to be queried. This embodiment may generate a read request based on the identity identification number and the attribute type. The upstream service 510 may instruct the tag storage service (i.e., BES) 520 to read the tag data based on the read request by calling the SDK 511. For example, BES may first parse the read request to determine the second entity targeted by the read request and the attribute type of the attributes possessed by the second entity. Subsequently, using the second entity and the attribute type of the attributes it possesses as the reading condition, tag data that matches both the second entity and the attribute type of the attributes it possesses is read from the database 530 that stores the tag data.
[0080] The label data read by BES from the database 530 can be fed back to the upstream service 510 through the SDK. After obtaining the label data, the upstream service can use the label data as a query condition to query the service data corresponding to the second entity from the service database 540. For example, at least the attribute values included in the label data can be used as the query conditions for querying the service database 540. The service database 540 can be, for example, any type of online database to ensure the timeliness of the storage of service data. According to actual requirements, the service database 540 can also be any other type of database, which is not limited in the embodiments of the present disclosure.
[0081] For example, the fields included in the read request can include the fields entity_type_id, entity_id, and tag_id to accurately obtain the label data corresponding to the requirements of the current scenario.
[0082] For example, taking the requirement that the data processing activity should meet as an example that the service data for booking a flight should have the flight booking location. If the service data is generated by employee B with household registration in L1 booking a flight back to L1 on the business travel platform at the current location L2, the label data converted from the service data can at least include {the id of employee B, location, L2}, where the location is the value of the field tag_id and L2 is the value of the field tag_value_id. After employee B returns to L1, if the service data is viewed through the business travel platform, the generated read request can at least include the information {the id of employee B, location} to read from the database 530 the label data {the id of employee B, location, L2} with the information {the id of employee B, location} as the key. Based on the read label data, it can be determined that the service data is stored in L2, and then the upstream service 510 can initiate a routing request to query the service data from the service database deployed in L2.
[0083] In at least one embodiment of the present disclosure, by storing the label data converted based on the service data, it is convenient to query the service data based on the label data, thereby ensuring the query efficiency and query accuracy of the service data.
[0084] Figure 6 Schematically shows the schematic diagram of the principle of caching label data in the snapshot mode in at least one embodiment of the present disclosure.
[0085] In at least one embodiment of the present disclosure, as the business runs, more and more business data and stored tag data will be generated, and there will also be more and more requests for querying data. For example, some of the stored tag data can be cached locally in the upstream service, so that when obtaining tag data, it is first queried locally. In the case where the tag data to be obtained is not cached locally, it is then obtained from the database storing the tag data described above. In this way, the number of requests for the Remote Procedure Call Protocol can be reduced, and the query efficiency and the overall availability of the business can be improved.
[0086] In one embodiment, as Figure 6 shown, the tag storage service 620 can read some of the tag data (such as tag1) from the database storing the full amount of tag data (i.e., the first database described above), and write the read part of the tag data into the second database 650 that can be loaded by the upstream service 610. The upstream service 610 can, for example, periodically or at regular intervals load the tag data stored in the second database 650 and store the loaded tag data in the cache 612. For example, the first database 630 can be a K-V database, and the second database 650 can be implemented based on object storage, and object storage is a reliable, efficient, and flexible data storage solution. It can be understood that the types of the above-mentioned first database 630 and second database 650 are only examples for facilitating the understanding of the present disclosure, and the embodiments of the present disclosure do not limit this.
[0087] For example, part of the tag data can be read from the first database 630 by configuring and executing a snapshot task, and the read part of the tag data is written into the second database 650. For example, the tag storage service 620 can provide a configuration window, and developers can configure the range of the tag data to be snapshotted according to actual needs, so as to determine the tag data that needs to be read from the first database 630 and written into the second database 650 when the snapshot task is executed. Alternatively, the range of the tag data to be snapshotted can be a fixed range preset during the development of the tag storage service 620, and the embodiments of the present disclosure do not limit this. For example, the configuration information provided by the developer can include the object corresponding to the tag data, the type of the object corresponding to the tag data, the attribute type of the object represented by the tag data, etc., and this configuration information can be determined according to the actual needs of the business, and the embodiments of the present disclosure do not limit this.
[0088] For example, the snapshot task can be generated periodically and executed periodically, or can also be created by the developer according to actual needs, and the embodiments of the present disclosure do not limit this.
[0089] In at least one embodiment of the present disclosure, a snapshot task may be generated based on snapshot task configuration information, which may include range information indicating a data reading range and may also include time information indicating a data reading time. For example, the tag storage service 620 may create a snapshot task according to the time information and the range information, so as to execute the snapshot task at the moment indicated by the time information and read the tag data within the data reading range indicated by the range information through the execution of the snapshot task.
[0090] Figure 7 Schematically shows a technical architecture diagram for providing a snapshot function in at least one embodiment of the present disclosure.
[0091] In at least one embodiment of the present disclosure, as Figure 7 shown, the snapshot service provided by the tag storage service 720 may, for example, include a data plane 721 and a control plane 722. The data plane 721 provides the function of executing a snapshot task, and the control plane 722 provides the function of maintaining a snapshot task.
[0092] For example, the data plane 721 may provide one or more worker threads for invocation, and the invoked worker thread is used to execute the snapshot task to be executed.
[0093] For example, the control plane 722 may include a task configuration unit, which may, for example, create a snapshot task according to the configuration information provided by the R & D personnel 701. The created snapshot task may be assigned to any worker thread to execute the snapshot task by the any worker thread. For example, the task configuration unit may also delete the periodically executed snapshot task according to the configuration information.
[0094] For example, the control plane 722 may also include an election unit, which is used to elect a thread from one or more worker threads to execute the snapshot task. The rule for electing a thread may be any rule set according to actual needs, and the embodiments of the present disclosure do not limit this.
[0095] For example, the control plane 722 may also include a task scheduling unit, which is used to schedule the snapshot task to be executed to a worker thread for the worker thread to execute the snapshot task. For example, the scheduling function of the task scheduling unit may be implemented depending on the worker thread.
[0096] For example, the control plane 722 may also include a task management unit, which is used to manage the snapshot tasks being executed and not yet executed, for example, stop and cancel the snapshot task.
[0097] For example, the control plane 722 may also be provided with a metadata management unit for managing the generated snapshot versions, such as performing operations like querying and deleting snapshot versions. For example, for snapshot tasks that need to be executed periodically, the tag data (also known as snapshot data) obtained each time the task is executed has different snapshot versions, and the tag data of different snapshot versions can be queried and deleted as needed.
[0098] For example, the snapshot service may provide an interactive page through which the R & D personnel 701 can provide configuration information, enabling the task configuration unit to create a snapshot task based on this configuration information. For example, the R & D personnel 701 can also perform management operations on the executing and unexecuted snapshot tasks through this interactive page, enabling the task management unit to manage the snapshot tasks in response to this management operation.
[0099] For example, the R & D personnel can provide the following configuration information on the control plane 722: snapshot tags are required for the tag data of records with the entity type of business trips, and the snapshot interval is once every 30 minutes. That is, every 30 minutes, the tag data of records with the entity type of business trips is read from the first database and the read tag data is updated to the second database.
[0100] For example, the snapshot service can execute a snapshot task through the following steps. First, the snapshot service uses an election module to elect a working thread. Subsequently, the elected working thread extracts the snapshot tasks to be executed according to the configuration information in the task configuration unit and executes the extracted snapshot tasks. Finally, the snapshot service stores the status after the execution of the snapshot task (such as successful execution or unsuccessful execution) in the metadata management unit.
[0101] In one embodiment, the R & D personnel 701 can, for example, view and delete the basic snapshot information through the interface provided by the tag storage service 720. The business party 702 can, for example, load the snapshot data by calling the SDK 711 and store the snapshot data in the local cache of the upstream service used by the business party 702.
[0102] In one embodiment, the second database 750 used by the snapshot service may, for example, include a database for storing snapshot data (abbreviated as Snap Data), and this database may, for example, be a database implemented based on object storage. The database for storing snapshot data can be one or more, and the present disclosure embodiment does not limit the type and quantity of this database.
[0103] For example, the second database used by the snapshot service may further include a database for storing snapshot metadata (e.g., snapshot version, abbreviated as Snap Meta) and a snapshot task queue (abbreviated as Snap Task Queue). This database may be, for example, a Redis database, and there may be one or more such databases. The embodiments of the present disclosure do not limit the type and quantity of this database. For example, the stored snapshot task queue may be a task queue of snapshot tasks to be executed. According to actual requirements, an additional database may also be set up to store snapshot tasks that have been executed and successfully executed.
[0104] For example, the second database used by the snapshot service may further include a database for storing configuration information of snapshot tasks (abbreviated as Snap Config) and configuration information for managing snapshot tasks (abbreviated as Mgr Config). This database may be, for example, a database running based on distributed transactions, and there may be one or more such databases. The embodiments of the present disclosure do not limit the type and quantity of this database.
[0105] In at least one embodiment of the present disclosure, if an exception occurs in the network or system during the execution of a snapshot task, resulting in the execution status of the task being not successfully executed, then both the snapshot task that has not been successfully executed and the snapshot tasks that have not been executed can be regarded as snapshot tasks to be executed.
[0106] In one embodiment, if the snapshot tasks to be executed include at least two tasks, then when executing the snapshot tasks to be executed, the execution order of the at least two tasks can be determined according to the time information of the at least two tasks. For example, the execution order of the at least two tasks can be determined in the order of the time information from earliest to latest, so as to first execute the tasks with earlier corresponding execution times. Subsequently, the at least two tasks can be executed in sequence according to this execution order. When executing each task, the label data within the data reading range corresponding to each task is read from the first database and stored in the second database.
[0107] By determining the execution order of at least two snapshot tasks to be executed according to the time information in the embodiments of the present disclosure, the execution of snapshot tasks can be made more in line with actual requirements, avoiding the situation where the upstream service cannot obtain the required label data from the cache for a long time. This is because the execution of snapshot tasks, for example, is slightly earlier than the usage time of snapshot data. If a snapshot task that needs to be executed at an earlier historical moment has not been successfully executed, the snapshot data that should have been obtained by this unsuccessfully executed snapshot task may be used at the current moment or will soon be used.
[0108] Figure 8 Schematically shows a schematic diagram of the principle of updating the label data of the cache in at least one embodiment of the present disclosure.
[0109] In at least one embodiment of the present disclosure, it is also possible to subscribe to the log information of the first database and update the tag data for cache pulling in a timely manner according to the subscribed log information, so as to ensure the consistency of the tag data in the cache with the tag data in the first database, thereby ensuring the accuracy of the tag data obtained from the cache.
[0110] For example, the tag storage service can subscribe to the log information of the target entities of the target type in the first database. In response to the update of the subscribed log information, the updated log information is converted into second tag data, and the second tag data is written into the third database for the cache pulling of the upstream service.
[0111] For example, the target type can be determined according to the configuration information provided by the foregoing R & D personnel. For example, the target type can be a partial type among the entity types corresponding to the range information included in the configuration information. Alternatively, the target type can also be the entity type with the largest corresponding business data volume, or the entity type corresponding to the business data with relatively high real-time requirements. The embodiments of the present disclosure do not make any limitations thereto.
[0112] In one embodiment, as Figure 8 shown, a data transmission service (Data Transmission Service, abbreviated as DTS) 823, etc. can be used to implement the subscription to the log information of the first database 830. For example, the subscribed log information can be stored in the log storage space 860, and the log storage space 860 can be provided by any database. The subscribed log information can be stored in a queue structure, for example. The tag storage service can provide an asynchronous service 824, and the asynchronous service 824 can read the subscribed log information from the log storage space 860 through a data subscription SDK and convert the log information into second tag data. For example, the subscribed log information is a binary log (abbreviated as binlog), and the log information records the statements for modifying the database data. For example, the subscribed log information can be used to restore the tag data of the target entities updated in the first database, thereby obtaining the second tag data. After obtaining the second tag data, for example, the second tag data can be written into a database different from the foregoing first database and second database, or can also be written into a specified location in the foregoing second database to store the second tag data separately from the snapshot data.
[0113] For example, the label storage service may also provide a data subscription service 825, which can write the converted second label data into a third database through a write proxy. Alternatively, the asynchronous service 824 may send the converted second label data to the data subscription service 825, and the data subscription service 825 directly writes the second label data into the third database. For example, the third database may be a cloud database (Relational Database Service, abbreviated as RDS).
[0114] For example, the upstream service 810 may pull the label data of the target entity of the target type stored in the third database and update the cached label data based on the pulled label data. For example, the data subscription service 825 may provide an external read interface, which may be implemented through a pull proxy, for example. The upstream service 810 may communicate with the read interface provided by the data subscription service through the data subscription SDK 813, for example, to pull the latest label data from the third database and update the label data stored in its local cache 812 according to the pulled label data. For example, if the latest pulled label data has the same key as a certain label data stored in the local cache 812 but different value, the certain label data may be replaced with the latest label data to update the cached label data.
[0115] For example, the upstream service 810 may pull the label data stored in the third database according to actual business requirements. For example, it may pull only the label data of a certain target entity, or only the label data of a certain type of target entity. The embodiments of the present disclosure do not limit this.
[0116] In at least one embodiment of the present disclosure, there may be at least two upstream services that pull label data from the third database, and the label data pulled by different upstream services may be the same or different. For example, the upstream service may pull label data from the third database periodically or non-periodically on demand.
[0117] For example, in order to facilitate the update of the label data in the local cache, a version number may be added to each label data, and the version number is updated synchronously with the value of the attribute in each label data.
[0118] Figure 9 Schematically shows a schematic diagram of the principle of writing label data into a database in at least another embodiment of the present disclosure.
[0119] For example, the process of writing tag data into a database in response to a write request described above can be performed online in real time. That is, after the upstream service receives the service data, it generates a write request. The tag storage service, in response to receiving the write request, determines the tag data included in the write request and writes it into the database.
[0120] In at least one embodiment of the present disclosure, considering that the link for online writing of tag data (hereinafter also referred to as the real-time link) may be unable to operate normally due to network failures or the like, this embodiment may also be provided with a method of writing tag data corresponding to service data through an offline link, so as to ensure that the stored tag data is full-scale tag data and ensure the consistency between the stored tag data and the service data.
[0121] For example, the update of service data in the service database can be monitored. In the case where there is updated service data in the service database, the updated service data is converted to obtain the tag data to be written into the first database.
[0122] As Figure 9 shown, the tag storage service can subscribe to the binary log (binlog) of the service database 940 using a data transmission service. According to the subscribed binlog, the service data updated in the service database 940 can be restored. If the restored service data corresponds to a third entity belonging to the target entity, then by converting the restored service data, for example, the tag data of the third entity (such as the third tag data) can be obtained. For example, the tag storage service can provide a log conversion service, and this log conversion service can be used to convert the subscribed binlog into the third tag data. After obtaining the third tag data, it can be written into the first database.
[0123] In one embodiment, the binary log subscribed using the data transmission service can be temporarily stored in a message queue (Message Queue, abbreviated as MQ) 926. The log conversion service 927 can read the binary log from this message queue 926 and convert the read binary log.
[0124] As Figure 9 shown, the online link can be used for the upstream service 910 to convert service data into tag data in response to the generation of service data, and for the tag storage service 920 to write the tag data into the first database.
[0125] In one embodiment, the first database may include a first data table (e.g., a real-time table 931) and a second data table (e.g., a historical table 932). The real-time table 931 may be used to store the tag data obtained from the online link, that is, the first tag data described above is written into the real-time table 931. The historical table 932 may be used to store the tag data obtained from the offline link, that is, the tag data converted by the log conversion service 927. By setting up the real-time table 931 and the historical table 932, the process of writing data in the online link and the offline link can be made independent of each other, which is conducive to improving the writing efficiency of the tag data.
[0126] In at least one embodiment of the present disclosure, when reading tag data from the first database in response to a read request, the tag data targeted by the read request may first be searched for in the real-time table 931. If the tag data is not found in the real-time table 931, the tag data targeted by the read request may then be searched for in the historical table 932. Since the tag data stored in the real-time table 931 includes the latest tag data, reading the tag data from the real-time table 931 first can ensure the timeliness of the read tag data. If the tag data is not found in the real-time table 931, searching in the historical table 932 can ensure that the tag data is read.
[0127] In at least one embodiment of the present disclosure, when writing tag data into the real-time table 931, for example, the write time of the tag data may also be recorded. After receiving a read request, the tag storage service 920 may, for example, first determine the write time of the tag data targeted by the read request. If it is determined based on the write time that the tag data was written within a predetermined historical period, the tag data is read from the first data table. If it is determined based on the write time that the tag data was written outside the predetermined historical period, the tag data is read from the second data table. For example, the predetermined historical period may be a historical period with the current moment as the end time, and the length of the predetermined historical period may be set according to actual needs. For example, it may be determined based on the delay of the write time of the tag data in the offline link relative to the generation time of the service data, or it may be determined based on the delay duration that the service party can tolerate when querying the service data. The embodiments of the present disclosure do not limit this.
[0128] In one embodiment, a time-to-live (TTL) may be set for the tag data in the real-time table 931, and the length of the validity period may be the same as the length of the predetermined historical period. If the storage duration of the tag data in the real-time table 931 exceeds the validity period, the tag data may be eliminated to free up storage space.
[0129] In the embodiments of the present disclosure, by setting up a real-time table and a historical table, and selecting whether to read tag data from the historical table or from the real-time table according to a predetermined historical period, the service can complete the read operation after data writing in a relatively real-time manner in most business scenarios, and can also avoid data loss caused by reasons such as unstable network, that is, ensure the storage reliability of tag data.
[0130] In at least one embodiment of the present disclosure, when converting log information in an offline link, for example, it is also possible to first determine a preset condition corresponding to the business data to be updated, and then determine the second attribute type involved in the preset condition. Finally, the business data to be updated is converted according to the second attribute type to obtain third tag data. For example, there may be different versions of the preset conditions corresponding to the same type of business data, and this embodiment can use the latest version of the preset condition corresponding to the business type to which the business data to be updated belongs as the preset condition corresponding to the business data to be updated.
[0131] For example, if the determined preset condition is that for the business data of booking air tickets on a business travel platform, the business data exists in the business database of the region where the employee applies for business travel. Then the second attribute type involved in the preset condition is location. When converting this business data, the attribute value corresponding to the attribute type location can be extracted from the business data first, and the employee identity identifier, attribute type, and attribute value are assembled into tag data. For example, if the location where the employee applies for business travel is L2, the converted tag data can at least include: the employee identity identifier of employee B who applies for business travel, location, and L2.
[0132] For example, the type of business data can correspond one-to-one with the type of entity, or the type of one business data can correspond to multiple types of entities, and one preset condition can correspond to one or more types of business data.
[0133] As Figure 9 shown, the tag storage service can provide a tagging function 928, which is used to determine the preset condition corresponding to the business data to be updated and calculate the tag corresponding to the business data, that is, determine the second attribute type. The log conversion service 927 then converts the business data to be updated according to the tag provided by the tagging function 928.
[0134] For example, for data processing activities corresponding to different time periods, different preset conditions can be adopted when determining whether the generated data meets the requirements. When determining whether a data processing activity meets the requirements, for example, the attribute type of the entity targeted by the read request can be determined first according to the target time period corresponding to the data processing activity, and the determined attribute type matches the preset condition corresponding to the target time period. For example, for entities added in different time periods, the data processing activities they perform can be used as data processing activities corresponding to different time periods, and the embodiments of the present disclosure do not limit this.
[0135] In the embodiments of the present disclosure, by first determining the preset condition corresponding to the service data to determine the attribute type, and then performing the conversion of the service data according to the attribute type, it is beneficial to set different versions of preset conditions for data processing activities generated in different periods, which can improve the flexibility of determining whether the data meets the requirements, and thus improve the accuracy and controllability of the judgment result.
[0136] Figure 10 Schematically shows the logical architecture diagram of the data processing method for at least one embodiment of the present disclosure.
[0137] In at least one embodiment of the present disclosure, the logical architecture for implementing the data processing method executed by the tag storage service may include a log conversion module 1027, a snapshot module 1021, an object interface 1029, and a log queue 1026 provided by the tag storage service, as well as a first database 1030, a service database 1040, and a second database 1050.
[0138] For example, the object interface 1029 can be called by an upstream service to write tag data into the first database 1030 or read tag data from the first database 1030. For example, the object interface 1029 can be an Application Programming Interface (API for short).
[0139] For example, the snapshot module 1021 is used to provide the snapshot service described above. The snapshot module 1021 may include, for example, Figure 7 each unit included in the control plane described above. For example, the snapshot module can ingest tag data from the first database 1030 by executing a snapshot task and write the tag data into the second database 1050. For example, before writing the read tag data into the second database 1050, the tag data can also be packaged and compressed, and the tag data stored in the second database 1050 is the packaged and compressed tag data.
[0140] For example, the log conversion module 1027 is used to convert the binary log of the subscribed business database 1040, which can be cached in the log queue 1026. The log conversion module 1027 can read the binary log from the log queue 1026, convert the read binary log into tag data, and write the converted tag data into the first database 1030 as compensation data.
[0141] For example, the first database 1030 can adopt a storage system of the Abase series or any K-V database. The time for switching the master node of this storage system is at the level of dozens of seconds. That is, when the master node needs to be switched due to a machine room failure or a failure during long-distance data transmission, there will be a situation where data cannot be written for dozens of seconds. However, through the setting of the log conversion module 1027 in at least one embodiment of the present disclosure, the situation of data loss caused by the inability to write data during these dozens of seconds can be avoided, the storage consistency between the tag data and the business data can be ensured, and reliable storage capabilities can be provided.
[0142] For example, the object interface 1029 can also be called by the upstream service to read tag data from the second database 1050, and the upstream service stores the read tag data in the local cache. In this embodiment, the snapshot module 1021 is set to ingest some tag data from the first database 1030 and write it into the second database 1050 for the upstream service to load and cache, that is, preloading is performed locally by the upstream service. This can make the architecture provided by the embodiments of the present disclosure more suitable for large-scale microservice scenarios and cloud-native scenarios compared with traditional databases and distributed databases, and the data reading rate is faster.
[0143] For example, the architecture of at least one embodiment of the present disclosure can also subscribe to the log information of the first database and update the tag data cached by the upstream service based on the log information. For example, the update principle described above is adopted to update the tag data cached by the upstream service. In this way, the situation of data loss can be avoided when the operation of writing to the main database is successfully executed but the main replica fails and the requests written to other replicas are all lost, improving the reliability of data storage. It can be understood that in order to implement the update of the cached tag data, the logical architecture of this embodiment may further include a third database for storing the tag data obtained by converting the log information of the first database. Figure 8 Through the logical architecture for implementing the data processing method provided by at least one embodiment of the present disclosure, since the business data can be real-time converted into tag data and stored, high performance with a storage latency of P90 < 2ms and P99 < 4ms for the tag data can be achieved.
[0144]
[0145] Figure 11 Schematically shows the system architecture diagram for implementing the data processing method of at least one embodiment of the present disclosure.
[0146] In at least one embodiment of the present disclosure, the upstream service and the label storage service can be integrated in different physical nodes. As Figure 11 shown, in the system architecture for implementing the data processing method, the upstream service is integrated in the first physical node 1101, and the label storage service can be integrated in the second physical node 1102.
[0147] For example, the upstream service and the label storage service can be containerized and deployed based on the microservices architecture. For example, virtual network cards can be deployed in both the first physical node 1101 and the second physical node 1102, and at least one container is instantiated on the virtual network card. The upstream service 1111 can be integrated in the container instantiated on the virtual network card in the first physical node 1101, and the label storage service BES1112 can be integrated in the container instantiated on the virtual network in the second physical node 1102. The upstream service 1111 can communicate with the physical network card in the first physical node 1101 through the proxy service mesh_proxy, container network card, virtual network card integrated in the instantiated container via the SDK 1121, so as to send read requests, etc. to the second physical node 1102 via the physical network card. The read requests, etc. can be sent to the label storage service BES1112 via the physical network card, virtual network card, container network card and proxy service mesh_proxy in the second physical node 1102, for example.
[0148] In one embodiment, the system architecture for implementing the data processing method further includes a first database 1130 and a second database 1150. The second physical node 1102 can access the first database 1130 via the network, for example, to perform read and write operations on the first database 1130. The first physical node 1101 can access the second database 1150 via the network, for example, to perform read operations on the second database 1150.
[0149] At least one embodiment of the present disclosure realizes the data processing method through a containerized deployment solution, which can make the implementation of the method fully cloud-native. Compared with the traditional single storage middleware, the label storage service can simultaneously meet the reliable storage capacity and the ability of data eventual consistency, exceeding the capabilities that can be provided by the single storage middleware.
[0150] Based on the data processing method provided by at least one embodiment of the present disclosure, at least one embodiment of the present disclosure also provides a data processing system, which will be described in detail below in combination with Figure 12 and Figure 13 for this data processing system.
[0151] Figure 12 A block diagram schematically showing the structure of a data processing system according to at least one embodiment of the present disclosure.
[0152] As Figure 12 shown, the data processing system of this embodiment includes a data processing node 1220 and a first database 1230. The processing node 1220 is communicatively connected to the first database 1230. The processing node 1220 may be, for example, a physical node integrated with a label storage service as Figure 11 shown. For example, the processing node 1220 may perform read operations and / or write operations on the first database 1230.
[0153] For example, the processing node 1220 may be configured to, in response to receiving a write request, determine first label data of a first entity included in the write request and write the first label data into the first database. For example, the first label data is obtained by converting service data corresponding to the first entity. The first entity belongs to a target entity, and the target entity includes a subject and an object. For example, it may be determined whether an action performed by the subject on the object meets a preset condition based on the label data of the subject and the label data of the object. For example, the processing node 1220 may be configured to execute the data processing method 300 described above, and the specific implementation principle may refer to the relevant description of the data processing method 300 and will not be elaborated here.
[0154] Figure 13 A block diagram schematically showing the structure of a data processing system according to at least another embodiment of the present disclosure.
[0155] In at least one embodiment of the present disclosure, the data processing system may further include the second database and / or the third database described above.
[0156] For example, as Figure 13 shown, in addition to including a processing node 1320 and a first database 1330, the data processing system may further include a second database 1350. The data processing node 1320 is communicatively connected to the second database 1350 and may, for example, perform write operations on the second database 1350. For example, an upstream service may also be communicatively connected to the second database 1350 to perform read operations on the second database 1350.
[0157] For example, the data processing node 1320 may further be configured to: in response to the existence of a snapshot task to be executed, execute the snapshot task to be executed, read target label data from the first database 1330, and write the target label data into the second database 1350 for loading. For example, the data processing node 1320 may further be configured to manage and execute snapshot tasks, and the specific implementation principle may refer to the above description for Figure 6 and Figure 7The relevant descriptions of the label storage service management and the execution of snapshot tasks in the description part will not be elaborated here.
[0158] For example, the data processing system may further include a third database. The data processing node is communicatively connected to the third database. For example, the data processing node may perform a write operation on the third database. For example, the upstream service may also be communicatively connected to the third database to perform a read operation on the third database.
[0159] For example, the data processing node may further be configured to: in response to the log information of the first database being updated and the updated log information being for a target entity of a target type, convert the updated log information into second label data, and write the second label data into the third database for pulling. For example, the data processing node 1320 may further be configured to subscribe to the log information of the first database and process the updated log information. The specific implementation principle may refer to the implementation principles of the asynchronous service and the data subscription service in the description part for Figure 8 which will not be elaborated here.
[0160] Based on the data processing method provided by at least one embodiment of the present disclosure, at least one embodiment of the present disclosure further provides a data processing apparatus, which will be described in detail below in conjunction with Figure 14 this.
[0161] Figure 14 Schematically shows a structural block diagram of a data processing apparatus provided by at least one embodiment of the present disclosure.
[0162] As Figure 14 shown, the data processing apparatus 1400 of this embodiment includes a data determination module 1401 and a data writing module 1402. For example, these units or modules may be implemented by hardware (such as circuits) modules or software modules, etc. The following embodiments are the same and will not be elaborated. For example, these units or modules may be implemented by a central processing unit (CPU), a general-purpose graphics processing unit (GPGPU), an image processing unit (GPU), a tensor processing unit (TPU), a field-programmable gate array (FPGA), or other forms of processing units with data processing capabilities and / or instruction execution capabilities and corresponding computer instructions.
[0163] The data determination module 1401 is configured to determine first tag data of a first entity included in a write request in response to receiving the write request. For example, the first tag data is obtained by converting service data corresponding to the first entity. The first entity belongs to a target entity, and the target entity includes a subject and an object. For example, it is possible to determine whether an action performed by the subject on the object meets a preset condition according to the tag data of the subject and the tag data of the object. Exemplarily, the data determination module 1401 may be configured to execute step S310 described above, and the specific implementation principle thereof may refer to the related description of step S310, which will not be elaborated herein.
[0164] The data writing module 1402 is configured to write the first tag data into first data. Exemplarily, the data writing module 1402 may be configured to execute step S320 described above, and the specific implementation principle thereof may refer to the related description of step S320, which will not be elaborated herein.
[0165] In at least one embodiment of the present disclosure, the data processing device 1400 may further include a type determination module and a data reading module. The type determination module is configured to determine a second entity targeted by a read request and a first attribute type of an attribute that the second entity has in response to receiving the read request. The data reading module is configured to read tag data that matches both the second entity and the first attribute type from a first database, so as to query service data corresponding to the second entity according to the read tag data.
[0166] In at least one embodiment of the present disclosure, the data processing device 1400 may further include a task execution module, which is configured to execute a to-be-executed snapshot task in response to the existence of a to-be-executed snapshot task, so as to read target tag data from a first database and write the target tag data into a second database for loading.
[0167] In at least one embodiment of the present disclosure, the snapshot task is generated based on snapshot task configuration information, and the snapshot task configuration information includes range information indicating a data reading range and time information indicating a data reading time. The to-be-executed snapshot task includes at least two tasks. The above task execution module may include a sequence determination sub-module and a task execution sub-module. The sequence determination sub-module is configured to determine an execution sequence of the at least two tasks according to the time information. The task execution sub-module is configured to execute the at least two tasks according to the execution sequence, so as to, for each of the at least two tasks, read tag data within a data reading range corresponding to each task from the first database to obtain target tag data.
[0168] In at least one embodiment of the present disclosure, the data processing device 1400 may further include a first conversion module, configured to convert the updated log information into second tag data in response to the log information of the target entity of the target type in the first database being updated. The data writing module 1402 may, for example, also be configured to write the second tag data into a third database for pulling.
[0169] In at least one embodiment of the present disclosure, the data processing device 1400 may further include a second conversion module, configured to convert the updated service data corresponding to a third entity to obtain third tag data of the third entity, where the third entity belongs to the target entity, in response to the service data corresponding to the third entity being updated. The data writing module 1402 may, for example, also be configured to write the third tag data into the first database.
[0170] In at least one embodiment of the present disclosure, the second conversion module may include a condition determination sub-module, a type determination sub-module, and a conversion sub-module. The condition determination sub-module is configured to determine a preset condition corresponding to the updated service data. The type determination sub-module is configured to determine a second attribute type involved in the preset condition. The conversion sub-module is configured to convert the updated service data according to the second attribute type to obtain third tag data of the third entity.
[0171] In at least one embodiment of the present disclosure, the first database includes a first data table and a second data table. The data writing module 1402 may be configured to write the first tag data into the first data table and write the third tag data into the second data table.
[0172] In at least one embodiment of the present disclosure, the data processing device 1400 may further include a data reading module, configured to: read the tag data targeted by the received read request from the first data table in response to the tag data targeted by the received read request being written into the first database within a predetermined historical period with the current moment as the end moment; read the tag data targeted by the received read request from the second data table in response to the tag data targeted by the received read request being written into the first database at a historical moment outside the predetermined historical period.
[0173] It should be noted that, for clarity and conciseness, the present disclosure embodiments do not give all the constituent units of the data processing device 1400. To implement the necessary functions of the data processing device, those skilled in the art may provide and set other constituent units not shown according to specific needs, and the embodiments of the present disclosure do not limit this.
[0174] Based on the data processing method provided by at least another embodiment of the present disclosure, at least another embodiment of the present disclosure also provides a data processing device, which will be described in detail below in conjunction with Figure 15 This data processing device will be described in detail.
[0175] Figure 15 Schematically shows a structural block diagram of a data processing device provided by at least one embodiment of the present disclosure.
[0176] As Figure 15 shown, the data processing device 1500 of this embodiment includes a data conversion module 1501 and a request generation module 1502. For example, these units or modules can be implemented by hardware (such as circuits) modules or software modules, etc. The following embodiments are the same and will not be elaborated. For example, these units or modules can be implemented by a central processing unit (CPU), a general-purpose graphics processing unit (GPGPU), an image processing unit (GPU), a tensor processing unit (TPU), a field-programmable gate array (FPGA), or other forms of processing units with data processing capabilities and / or instruction execution capabilities, as well as corresponding computer instructions.
[0177] The data conversion module 1501 is configured to convert service data into first label data of a first entity in response to obtaining service data corresponding to the first entity. For example, the first entity belongs to a target entity, and the target entity includes a subject and an object. For example, it can be determined whether the action performed by the subject on the object meets a preset condition according to the label data of the subject and the label data of the object. Exemplarily, the data conversion module 1501 can be configured to execute step S210 described above, and its specific implementation principle can refer to the relevant description of step S210 and will not be elaborated here.
[0178] The request generation module 1502 is configured to generate a write request based on the first label data to write the first label data into a first database. Exemplarily, the request generation module 1502 can be configured to execute step S220 described above, and its specific implementation principle can refer to the relevant description of step S220 and will not be elaborated here.
[0179] In at least one embodiment of the present disclosure, the request generation module 1502 can also be configured to generate a read request for second label data of a second entity based on a query request for querying service data corresponding to the second entity; wherein, the second entity belongs to the target entity, and the read request indicates the second entity and the attribute type of the attributes that the second entity has. The data processing device 1500 may further include a data query module, which is configured to query service data corresponding to the second entity based on the second label data in response to obtaining second label data that matches both the second entity and the attribute type read based on the read request.
[0180] In at least one embodiment of the present disclosure, the data processing device 1500 may further include a data loading module and a data caching module. The data loading module is configured to load the target tag data stored in the second database, and the data caching module is configured to cache the loaded target tag data. For example, in the case where the cached tag data does not include the second tag data, the second tag data is read from the first database; the target tag data includes the tag data read from the first database by executing a snapshot task.
[0181] In at least one embodiment of the present disclosure, the data processing device 1500 may further include a data pulling module and a data updating module. The data pulling module is configured to pull the tag data of the target entity of the target type from the third database, and the data updating module is configured to update the cached tag data based on the pulled tag data, where, in the case where the cached tag data does not include the second tag data, the second tag data is read from the first database; the tag data stored in the third database is obtained by converting the log information of the target entity of the target type in the log information of the first database.
[0182] It should be noted that, for clarity and conciseness, the present disclosure embodiments do not show all the constituent units of the data processing device 1500. To implement the necessary functions of the data processing device, those skilled in the art can provide and set other constituent units not shown according to specific needs, and the embodiments of the present disclosure do not limit this.
[0183] At least one embodiment of the present disclosure further provides an electronic device, including: a processing device; a storage device including one or more computer program modules; wherein, the one or more computer program modules are stored in the storage device and configured to be executed by the processing device, and the one or more computer program modules are used to implement the data processing method provided in any embodiment of the present disclosure.
[0184] For example, the processing device may be a central processing unit (CPU), a digital signal processor (DSP), an image processor (GPU), a general-purpose graphics processing unit (GPGPU), or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may be a general-purpose processor or a dedicated processor, and may control other components in the electronic device to perform desired functions.
[0185] For example, a storage device may include one or more computer program products, which may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory, etc. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage media, and the processing device may run the program instructions to implement the functions (implemented by the processing device) in the embodiments of the present disclosure and / or other desired functions, such as data processing methods, etc. Various application programs and various data may also be stored in the computer-readable storage media, such as service data, snapshot tasks, tag data, read requests, etc.
[0186] Reference is made below to Figure 16 FIG. which shows a schematic structural diagram of an electronic device (such as a terminal device or a server) 1600 suitable for use in implementing the embodiments of the present disclosure. The terminal device in the embodiments of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (such as in-vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 16 The electronic device shown is only an example and should not impose any limitation on the functions and usage scope of the embodiments of the present disclosure.
[0187] As Figure 16 shown, the electronic device 1600 may include a processing device (such as a central processing unit, a graphics processing unit, etc.) 1601, which may perform various appropriate actions and processes according to a program stored in the read-only memory (ROM) 1602 or a program loaded from the storage device 1608 into the random access memory (RAM) 1603. In the RAM 1603, various programs and data required for the operation of the electronic device 1600 are also stored. The processing device 1601, the ROM 1602, and the RAM 1603 are connected to each other through a bus 1604. The input / output (I / O) interface 1605 is also connected to the bus 1604.
[0188] Generally, the following devices may be connected to the I / O interface 1605: an input device 1606 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 1607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 1608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1609. The communication device 1609 may allow the electronic device 1600 to communicate with other devices wirelessly or wiredly to exchange data. AlthoughFigure 16 An electronic device 1600 with various devices is shown, but it should be understood that it is not required to implement or have all the shown devices. Instead, more or fewer devices may be implemented or had.
[0189] In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, an embodiment of the present disclosure includes a computer program product that includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes program code for performing the methods shown in the flowcharts. In such an embodiment, the computer program can be downloaded and installed from a network via the communication device 1609, or installed from the storage device 1608, or installed from the ROM 1602. When the computer program is executed by the processing device 1601, the above functions defined in the methods of the embodiments of the present disclosure are performed.
[0190] It should be noted that the computer-readable medium in the present disclosure can be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of the computer-readable storage medium can include, but are not limited to: an electrical connection with one or more wires, 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 above. In the present disclosure, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. And in the present disclosure, a computer-readable signal medium can include a data signal propagated in a baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium can also be any computer-readable medium other than a computer-readable storage medium, and the computer-readable signal medium can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted by any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0191] In some embodiments, the client and the server can communicate using any currently known or future-developed network protocol such as HTTP (Hyper Text Transfer Protocol), and can be interconnected with digital data communication in any form or medium (e.g., a communication network). Examples of communication networks include local area networks ("LANs"), wide area networks ("WANs"), the Internet (e.g., the Internet), and end-to-end networks (e.g., ad hoc end-to-end networks), as well as any currently known or future-developed networks.
[0192] The above computer-readable medium can be included in the above electronic device; or it can exist separately without being assembled into the electronic device.
[0193] The above computer-readable medium carries one or more programs. When the above one or more programs are executed by the electronic device, the electronic device is caused to: in response to receiving a write request, determine first tag data of a first entity included in the write request; and write the first tag data into a first database, where the first tag data is obtained by converting service data corresponding to the first entity; or cause the electronic device to: in response to obtaining service data corresponding to the first entity, convert the service data into first tag data of the first entity; and generate a write request based on the first tag data to write the first tag data into the first database, where the first entity belongs to a target entity, the target entity includes a subject and an object, and the tag data of the subject and the tag data of the object are used to determine whether an action performed by the subject on the object meets a preset condition.
[0194] Computer program code for performing the operations of the present disclosure can be written in one or more programming languages or combinations thereof. The above programming languages include, but are not limited to, object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, executed as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., by using an Internet service provider to connect through the Internet).
[0195] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, a segment of a program, or a portion of code that contains one or more executable instructions for implementing a specified logical function. It should also be noted that, in some alternative implementations, the functions noted in the blocks may occur in a different order than that noted in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, or they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and combinations of blocks in the block diagram and / or flowchart, may be implemented by a dedicated hardware-based system that performs the specified functions or operations, or may be implemented by a combination of dedicated hardware and computer instructions.
[0196] The units or modules involved in the embodiments described in the present disclosure may be implemented in software or in hardware. In some cases, the name of the unit or module does not constitute a limitation on the unit or module itself.
[0197] The functions described above herein may be performed, at least in part, by one or more hardware logic components. By way of example, and without limitation, the types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on a chip (SOCs), complex programmable logic devices (CPLDs), and the like.
[0198] In the context of the present disclosure, a machine-readable medium may be a tangible medium that can contain or store a program for use by or in connection with an instruction execution system, apparatus, or device. 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, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0199] According to one or more embodiments of the present disclosure, Example 1 provides a data processing method, including:
[0200] In response to receiving a write request, determine first tag data of a first entity included in the write request; and
[0201] Write the first tag data into a first database,
[0202] wherein the first tag data is obtained by converting service data corresponding to the first entity, the first entity belongs to a target entity, and the target entity includes a subject and an object; the tag data of the subject and the tag data of the object are used to determine whether an action performed by the subject on the object meets a preset condition.
[0203] According to one or more embodiments of the present disclosure, Example 2 provides the method in Example 1, further comprising:
[0204] In response to receiving a read request, determine a second entity targeted by the read request and a first attribute type of an attribute that the second entity has; and
[0205] Read tag data that matches both the second entity and the first attribute type from the first database, so as to query service data corresponding to the second entity according to the read tag data.
[0206] According to one or more embodiments of the present disclosure, Example 3 provides the method in Example 1 or Example 2, further comprising: In response to the existence of a snapshot task to be executed, execute the snapshot task to be executed, so as to read target tag data from the first database and write the target tag data into a second database for loading.
[0207] According to one or more embodiments of the present disclosure, in Example 4, the snapshot task in Example 3 is generated based on snapshot task configuration information, the snapshot task configuration information includes range information indicating a data reading range and time information indicating a data reading time, and the snapshot task to be executed includes at least two tasks; executing the snapshot task to be executed in Example 3 to read target tag data from the first database includes:
[0208] According to the time information, determine an execution order of the at least two tasks; and
[0209] Execute the at least two tasks according to the execution order, so as to, for each task in the at least two tasks, read tag data within the data reading range corresponding to each task from the first database to obtain the target tag data.
[0210] According to one or more embodiments of the present disclosure, Example 5 provides the method in Example 1 or Example 2, further comprising:
[0211] In response to the log information of the target entity of the target type in the first database being updated, convert the updated log information into second tag data; and
[0212] Write the second tag data into a third database for pulling.
[0213] According to one or more embodiments of the present disclosure, Example Six provides the method in Example One or Example Two, further including:
[0214] In response to the business data corresponding to the third entity being updated, convert the updated business data to obtain third tag data of the third entity, where the third entity belongs to the target entity; and
[0215] Write the third tag data into the first database.
[0216] According to one or more embodiments of the present disclosure, Example Seven provides the conversion of the updated business data in Example Six to obtain third tag data of the second entity, including:
[0217] Determine a preset condition corresponding to the updated business data;
[0218] Determine a second attribute type involved in the preset condition; and
[0219] Convert the updated business data according to the second attribute type to obtain third tag data of the third entity.
[0220] According to one or more embodiments of the present disclosure, Example Eight provides that the first database in Example Six includes a first data table and a second data table;
[0221] The writing of the first tag data into the first database includes: writing the first tag data into the first data table;
[0222] The writing of the third tag data into the first database includes: writing the third tag data into the second data table.
[0223] According to one or more embodiments of the present disclosure, Example Nine provides the method in Example Eight, further including:
[0224] In response to the tag data targeted by the received read request being written into the first database within a predetermined historical period with the current moment as the end moment, read the tag data targeted by the read request from the first data table;
[0225] In response to the tag data targeted by the received read request being written to the first database at a historical moment outside the predetermined historical period, read the tag data targeted by the read request from the second data table.
[0226] According to one or more embodiments of the present disclosure, Example Ten provides a data processing method, including:
[0227] In response to obtaining service data corresponding to a first entity, convert the service data into first tag data of the first entity; and
[0228] Generate a write request based on the first tag data to write the first tag data to a first database,
[0229] wherein the first entity belongs to a target entity, the target entity includes a subject and an object, and the tag data of the subject and the tag data of the object are used to determine whether the action performed by the subject on the object meets a preset condition.
[0230] According to one or more embodiments of the present disclosure, Example Eleven provides the method in Example Ten, further including:
[0231] In response to a query request for querying service data corresponding to a second entity, generate a read request for second tag data of the second entity based on the query request; wherein the second entity belongs to the target entity, and the read request indicates the second entity and the attribute type of the attributes the second entity has; and
[0232] In response to obtaining second tag data that matches both the second entity and the attribute type read based on the read request, query the service data corresponding to the second entity based on the second tag data.
[0233] According to one or more embodiments of the present disclosure, Example Twelve provides the method in Example Eleven, further including:
[0234] Load target tag data stored in a second database; and
[0235] Cache the loaded target tag data,
[0236] wherein in the case where the cached tag data does not include the second tag data, the second tag data is read from the first database; the target tag data includes tag data read from the first database by executing a snapshot task.
[0237] According to one or more embodiments of the present disclosure, Example Thirteen provides the method in Example Eleven or Example Twelve, further including:
[0238] Pull the label data of the target entity of the target type from the third database; and
[0239] Update the cached label data based on the pulled label data,
[0240] wherein, in the case that the cached label data does not include the second label data, the second label data is read from the first database; the label data stored in the third database is obtained by converting the log information of the target entity of the target type in the log information of the first database.
[0241] According to one or more embodiments of the present disclosure, Example Fourteen provides a data processing apparatus, including:
[0242] A data determination module, configured to determine the first label data of the first entity included in the write request in response to receiving the write request; and
[0243] A data writing module, configured to write the first label data into the first database,
[0244] wherein, the first label data is obtained by converting the service data corresponding to the first entity, the first entity belongs to the target entity, and the target entity includes a subject and an object; the label data of the subject and the label data of the object are used to determine whether the action performed by the subject on the object meets a preset condition.
[0245] According to one or more embodiments of the present disclosure, Example Fifteen provides a data processing apparatus, including:
[0246] A data conversion module, configured to convert the service data into the first label data of the first entity in response to obtaining the service data corresponding to the first entity; and
[0247] A request generation module, configured to generate a write request based on the first label data to write the first label data into the first database,
[0248] wherein, the first entity belongs to the target entity, the target entity includes a subject and an object, and the label data of the subject and the label data of the object are used to determine whether the action performed by the subject on the object meets a preset condition.
[0249] According to one or more embodiments of the present disclosure, Example Sixteen provides a data processing system, including:
[0250] A first database; and
[0251] A data processing node, communicatively connected to the first database, is configured to: in response to receiving a write request, determine first tag data of a first entity included in the write request; and write the first tag data to the first database.
[0252] Wherein, the first tag data is obtained by converting service data corresponding to the first entity, the first entity belongs to a target entity, and the target entity includes a subject and an object; the tag data of the subject and the tag data of the object are used to determine whether an action performed by the subject on the object meets a preset condition.
[0253] According to one or more embodiments of the present disclosure, Example Seventeen provides the system in Example Sixteen, further including:
[0254] A second database, the data processing node is communicatively connected to the second database;
[0255] Wherein, the data processing node is further configured to:
[0256] In response to the existence of a pending snapshot task, execute the pending snapshot task to read target tag data from the first database and write the target tag data to the second database for loading.
[0257] According to one or more embodiments of the present disclosure, Example Eighteen provides the system in Example Sixteen, further including:
[0258] A third database, the data processing node is communicatively connected to the third database;
[0259] Wherein, the data processing node is further configured to:
[0260] In response to the log information of the first database being updated and the updated log information being for the target entity of the target type, convert the updated log information into second tag data; and
[0261] Write the second tag data to the third database for pulling.
[0262] According to one or more embodiments of the present disclosure, Example Nineteen provides an electronic device, including:
[0263] A processing device; and
[0264] A storage device, including one or more computer program instructions;
[0265] Wherein, when the one or more computer program instructions are run by the processing device, they execute the data processing method provided by at least one embodiment of the present disclosure.
[0266] According to one or more embodiments of the present disclosure, Example Twenty provides a computer-readable storage medium that non-transitorily stores computer-readable instructions, wherein when the computer-readable instructions are executed by a processor, a data processing method provided by at least one embodiment of the present disclosure is implemented.
[0267] The above description is only a preferred embodiment of the present disclosure and an explanation of the applied technical principles. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above technical features, and should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosure concept. For example, a technical solution formed by mutually replacing the above features with technical features (but not limited to) having similar functions disclosed in the present disclosure.
[0268] In addition, although the operations are depicted in a particular order, this should not be construed as requiring that the operations be performed in the particular order shown or in sequential order. In certain environments, multitasking and parallel processing may be advantageous. Similarly, although several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the present disclosure. Certain features described in the context of separate embodiments may also be implemented combinatorially in a single embodiment. Conversely, the various features described in the context of a single embodiment may also be implemented separately or in any suitable sub-combination in multiple embodiments.
[0269] Although the subject matter has been described in language specific to structural features and / or methodological acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims.
Claims
1. A data processing method, comprising: In response to receiving a write request, determining first tag data of a first entity included in the write request; as well as writing the first tag data into a first database, Among them, the first label data is obtained by converting the business data corresponding to the first entity, the first entity belongs to the target entity, and the target entity includes a subject and an object; the label data of the subject and the label data of the object are used to determine whether the action performed by the subject on the object meets the preset conditions.
2. The method according to claim 1, further comprising: In response to receiving a read request, determining a second entity to which the read request is directed and a first attribute type of an attribute of the second entity; as well as Tag data matching both the second entity and the first attribute type is read from the first database, so as to query business data corresponding to the second entity according to the read tag data.
3. The method according to claim 1 or 2, further comprising: In response to the existence of a snapshot task to be executed, the snapshot task to be executed is executed to read target tag data from the first database and write the target tag data into the second database for loading.
4. The method according to claim 3, wherein: The snapshot task is generated based on snapshot task configuration information, wherein the snapshot task configuration information includes range information indicating a data reading range and time information indicating a data reading time, and the snapshot task to be executed includes at least two tasks; The executing the snapshot task to be executed to read the target tag data from the first database includes: Determining, according to the time information, an execution order of the at least two tasks; as well as The at least two tasks are executed according to the execution order, so as to read the label data within the data reading range corresponding to each task in the at least two tasks from the first database to obtain the target label data.
5. The method according to claim 1 or 2, further comprising: In response to the log information of the target entity of the target type in the first database being updated, converting the updated log information into second tag data; as well as The second tag data is written into a third database for retrieval.
6. The method according to claim 1 or 2, further comprising: In response to the business data corresponding to the third entity being updated, converting the updated business data to obtain third tag data of the third entity, the third entity belonging to the target entity; as well as The third tag data is written into the first database.
7. The method according to claim 6, wherein: The converting the updated business data to obtain the third tag data of the second entity includes: Determining a preset condition corresponding to the updated business data; Determining a second attribute type involved in the preset condition; and The updated business data is converted according to the second attribute type to obtain third label data of the third entity.
8. The method according to claim 6, wherein: The first database includes a first data table and a second data table; Writing the first tag data into the first database includes: writing the first tag data into the first data table; Writing the third tag data into the first database includes: writing the third tag data into the second data table.
9. The method according to claim 8, further comprising: In response to the received tag data targeted by the read request being written into the first database within a predetermined historical period with the current time as the end time, reading the tag data targeted by the read request from the first data table; In response to the tag data targeted by the received read request being written into the first database at a historical moment outside the predetermined historical period, the tag data targeted by the read request is read from the second data table.
10. A data processing method, comprising: In response to acquiring the business data corresponding to the first entity, converting the business data into first tag data of the first entity; as well as generating a write request based on the first tag data to write the first tag data into a first database, The first entity belongs to a target entity, the target entity includes a subject and an object, and the label data of the subject and the label data of the object are used to determine whether the action performed by the subject on the object meets a preset condition.
11. The method according to claim 10, further comprising: In response to a query request for querying business data corresponding to a second entity, generating a read request for second tag data of the second entity based on the query request; wherein the second entity belongs to the target entity, and the read request indicates the second entity and an attribute type of an attribute of the second entity; and In response to obtaining second tag data that matches both the second entity and the attribute type and is read based on the read request, querying business data corresponding to the second entity based on the second tag data.
12. The method according to claim 11, further comprising: Loading target tag data stored in the second database; as well as The target tag data loaded by the cache, Wherein, when the cached tag data does not include the second tag data, the second tag data is read from the first database; and the target tag data includes the tag data read from the first database by executing the snapshot task.
13. The method according to claim 11 or 12, further comprising: Pull label data of a target entity of a target type from a third database; as well as Update the cached tag data based on the pulled tag data, In which, when the cached label data does not include the second label data, the second label data is read from the first database; the label data stored in the third database is obtained by converting the log information of the target entity of the target type in the log information of the first database.
14. A data processing device, comprising: a data determination module, configured to, in response to receiving a write request, determine first tag data of a first entity included in the write request; as well as a data writing module, configured to write the first tag data into a first database, Among them, the first label data is obtained by converting the business data corresponding to the first entity, the first entity belongs to the target entity, and the target entity includes a subject and an object; the label data of the subject and the label data of the object are used to determine whether the action performed by the subject on the object meets the preset conditions.
15. A data processing device, comprising: a data conversion module, configured to, in response to acquiring business data corresponding to a first entity, convert the business data into first tag data of the first entity; as well as a request generating module, configured to generate a write request based on the first tag data to write the first tag data into a first database, The first entity belongs to a target entity, the target entity includes a subject and an object, and the label data of the subject and the label data of the object are used to determine whether the action performed by the subject on the object meets a preset condition.
16. A data processing system comprising: First database; as well as A data processing node is connected to the first database for communication, and the data processing node is configured to: In response to receiving a write request, determining first tag data of a first entity included in the write request; and writing the first tag data into the first database, Among them, the first label data is obtained by converting the business data corresponding to the first entity, the first entity belongs to the target entity, and the target entity includes a subject and an object; the label data of the subject and the label data of the object are used to determine whether the action performed by the subject on the object meets the preset conditions.
17. The system of claim 16, further comprising: a second database, the data processing node being communicatively connected to the second database; Wherein, the data processing node is further configured as: In response to the existence of a snapshot task to be executed, the snapshot task to be executed is executed to read target tag data from the first database and write the target tag data into the second database for loading.
18. The system of claim 16, further comprising: A third database, the data processing node being communicatively connected to the third database; Wherein, the data processing node is further configured as: In response to the log information of the first database being updated, and the updated log information is for the target entity of the target type, converting the updated log information into second tag data; and The second tag data is written into a third database for retrieval.
19. An electronic device comprising: Processing device; as well as a storage device including one or more computer program instructions; The one or more computer program instructions, when executed by the processing device, execute the method according to any one of claims 1 to 9, or execute the method according to any one of claims 10 to 13.
20. A computer-readable storage medium that non-transitorily stores computer-readable instructions, wherein: When the computer-readable instructions are executed by a processor, the method according to any one of claims 1 to 9 is implemented, or the method according to any one of claims 10 to 13 is implemented.