Data processing method and device, electronic equipment and readable medium
By introducing a data bus into the entity, decoupling the business processing logic between services, and achieving unified data management and transmission, the data processing conflict problem between multiple services is resolved, the efficiency and accuracy of data processing are improved, and the performance of the entity is enhanced.
Patent Information
- Application Number
- CN202410382887.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-03-29
- Publication Date
- 2025-09-30
AI Technical Summary
In the entity, since multiple services each maintain their own business processing logic, the data processing process is complicated and prone to conflicts, which affects the real-time and consistency of the data. The coupling relationship between services makes upgrades and maintenance difficult.
The data bus is introduced as the middle layer to determine the target task through the preset correspondence, automatically perform operations to match the updated data of the service, decouple the business processing logic between services, and realize unified management and transmission of data.
It simplifies the data processing process, improves the efficiency and accuracy of data processing, reduces the complexity of service design, and improves the performance of entities and the real-time and consistency of data.
Smart Images

Figure CN120723391A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a data processing method, device, electronic device and readable medium. Background Art
[0002] Within an entity, there are often multiple services (also known as systems) that provide users with various functions. For example, an e-commerce platform might include product promotion services, photography services, and management services. The product promotion service allows users to select and recommend styles, the photography service allows users to take photos, and the management service provides quality control, warehousing, and other management functions.
[0003] However, multiple services each maintain their own business processing logic, and different services are likely to process data of the same object. The processing of a piece of data by one service may require other services to perform related processing on the data. As the number of services included in the entity continues to increase, such a complex data processing process is likely to lead to conflicts in data processing. Summary of the Invention
[0004] In order to solve the above technical problems, the present application provides a data processing method, device, electronic device and readable medium, which can decouple the business processing logic of multiple services belonging to an entity from the data processing process to ensure the accuracy of data processing.
[0005] In order to achieve the above objectives, the technical solutions provided by this application are as follows:
[0006] In a first aspect, the present application provides a data processing method, which is applied to a data bus in an entity. The method may include:
[0007] If data of a first service among multiple services of the entity changes, obtaining first updated data of the first service;
[0008] Determining a target task corresponding to the first update data of the first service from a preset correspondence, where the correspondence is used to indicate a business processing strategy for the update data of each service on the data bus, the target task including at least one second service among the multiple services and a second operation performed by each of the at least one second service;
[0009] A corresponding second operation is performed on each of the at least one second service so that data on the at least one second service on the entity matches the first updated data of the first service.
[0010] In a possible implementation, the at least one second service includes all services on the entity, and the second operation is an operation of broadcasting the first update data;
[0011] Alternatively, the at least one second service includes at least one database on the entity, and the second operation is an operation of saving the first updated data;
[0012] Alternatively, the at least one second service includes at least one designated service on the entity, and the second operation is an operation of synchronizing the first updated data.
[0013] In a possible implementation, the method further includes:
[0014] Saving update details of the first update data, the update details including at least one of the following information: update time, update content, update operator, or service where the update occurs;
[0015] Responding to a query request, obtaining update details of the second update data, where the query request includes at least one information in the update details of the second update data;
[0016] The update details of the second update data are displayed.
[0017] In a possible implementation, before determining the target task corresponding to the first update data of the first service from a preset correspondence, the method further includes:
[0018] Based on the business processing logic of each service in the multiple services and the association relationship of data between the multiple services, a preset corresponding relationship is determined, and the preset corresponding relationship includes a first corresponding relationship, and the first corresponding relationship includes a corresponding relationship between the first updated data of the first service and the target task.
[0019] In a possible implementation, before determining the target task corresponding to the first update data of the first service from a preset correspondence, the method further includes:
[0020] Define the data state of each service in multiple services;
[0021] Establish a correspondence between the data status changes of each service in multiple services and the tasks that need to be executed as a preset correspondence. The preset correspondence includes a first correspondence, and the first correspondence includes a correspondence between the status changes corresponding to the first updated data of the first service and the target task.
[0022] In a possible implementation, if data of a first service among multiple services of an entity changes, obtaining first updated data of the first service includes:
[0023] In response to monitoring a data change in the database of the first service, first update data is determined based on the changed data in the database of the first service.
[0024] In a possible implementation, the first service is a producer or consumer of data in the entity, and the second service is a producer or consumer of data in the entity.
[0025] In a second aspect, the present application further provides a data processing device, applied to a data bus in an entity, comprising:
[0026] an acquiring unit, configured to acquire first updated data of a first service among the plurality of services of the entity if data of the first service changes;
[0027] a determining unit, configured to determine, from a preset correspondence, a target task corresponding to the first update data of the first service, the correspondence being used to indicate a business processing strategy for the update data of each service on the data bus, the target task comprising at least one second service among the plurality of services and a second operation performed by each of the at least one second service;
[0028] The execution unit is configured to execute a corresponding second operation on each of the at least one second service, so that data on the at least one second service on the entity matches the first updated data of the first service.
[0029] In a possible implementation, the at least one second service includes all services on the entity, and the second operation is an operation of broadcasting the first update data;
[0030] Alternatively, the at least one second service includes at least one database on the entity, and the second operation is an operation of saving the first updated data;
[0031] Alternatively, the at least one second service includes at least one designated service on the entity, and the second operation is an operation of synchronizing the first updated data.
[0032] In a possible implementation, the device further includes:
[0033] a storage unit, configured to store update details of the first update data, the update details including at least one of the following information: update time, update content, update operator, or service where the update occurs;
[0034] a query unit, configured to obtain update details of the second update data in response to a query request, wherein the query request includes at least one information in the update details of the second update data;
[0035] The display unit is configured to display update details of the second update data.
[0036] In a possible implementation, the device further includes:
[0037] An establishment unit is used to determine, before determining a target task corresponding to the first updated data of the first service from a preset correspondence, the preset correspondence based on the business processing logic of each service in a plurality of services and the association relationship of data between the plurality of services, wherein the preset correspondence includes a first correspondence, and the first correspondence includes a correspondence between the first updated data of the first service and the target task.
[0038] In a possible implementation, the device further includes:
[0039] a defining unit, configured to define a data state of each of the plurality of services before determining a target task corresponding to the first updated data of the first service from a preset correspondence relationship;
[0040] The suggestion unit is used to establish a correspondence between the data status changes of each service in multiple services and the tasks that need to be performed, as a preset correspondence. The preset correspondence includes a first correspondence, and the first correspondence includes a correspondence between the status changes corresponding to the first updated data of the first service and the target task.
[0041] In a possible implementation, the acquiring unit is specifically configured to:
[0042] In response to monitoring a data change in the database of the first service, first update data is determined based on the changed data in the database of the first service.
[0043] In a possible implementation, the first service is a producer or consumer of data in the entity, and the second service is a producer or consumer of data in the entity.
[0044] It should be noted that the specific implementation method of the device and the technical effects achieved can be found in the relevant description of the method provided in the first aspect or any implementation method of the first aspect.
[0045] In a third aspect, the present application further provides an electronic device, the electronic device comprising: a processor and a memory;
[0046] The memory is used to store instructions or programs;
[0047] The processor is used to execute the instructions or programs in the memory so that the electronic device executes the method provided by the above-mentioned target aspect or any one of the implementations of the target aspect.
[0048] In a fourth aspect, the present application also provides a readable medium, which stores instructions or programs. When the instructions or programs are run on a processor, the processor executes the method provided by the above-mentioned target aspect or any one of the implementations of the target aspect.
[0049] Compared with the prior art, the embodiments of the present application have at least the following advantages:
[0050] The technical solution provided by this application provides a data processing method, which is applied to the data bus of an entity (such as an electronic goods platform). The method may include, for example: first, if a data change occurs in a first service among multiple services of the entity, obtaining first updated data of the first service; then, determining a target task corresponding to the first updated data of the first service from a preset correspondence relationship, the correspondence relationship being used to indicate a business processing strategy for the updated data of each service on the data bus, the target task including at least one second service among the multiple services and a second operation performed by each second service in the at least one second service; then, performing a corresponding second operation on each second service in the at least one second service so that the data on the at least one second service on the entity matches the first updated data of the first service. In this way, different services only need to maintain their own business processing logic, and the updated data of any service can be transmitted to other services through the newly added data bus of the entity, without each service considering the impact of the data update of the service on other services. The relationship between the business processing logic and the data processing process of multiple services belonging to an entity is decoupled, the data processing process within the entity including multiple services is simplified, the problem of conflict in data processing is overcome, and the accuracy of data processing is guaranteed on the basis of improving data processing efficiency. The data bus implementing the data processing method connects multiple services of the entity and can interact with multiple services of the entity. Moreover, the preset corresponding relationship can realize the influence of updated data of each service on other services of the entity. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments recorded in this application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0052] Figure 1 A schematic diagram of a current physical architecture;
[0053] Figure 2 A schematic diagram of a physical architecture provided in an embodiment of the present application;
[0054] Figure 3 A flowchart of a data processing method provided in an embodiment of the present application;
[0055] Figure 4A schematic diagram of an example of a data processing method provided in an embodiment of the present application;
[0056] Figure 5 A schematic diagram of another example of a data processing method provided in an embodiment of the present application;
[0057] Figure 6 A schematic structural diagram of a data processing device 600 provided in an embodiment of the present application;
[0058] Figure 7 A schematic structural diagram of an electronic device 700 provided in an embodiment of the present application. DETAILED DESCRIPTION
[0059] Due to the operational characteristics of supply chain-related entities such as e-commerce platforms, the requirements for data real-time, accuracy, and consistency are increasing. Many different services (also known as systems) within an entity need to access and operate on data, which requires the entity to process data quickly, accurately, and securely in a highly concurrent and distributed environment.
[0060] Currently, the entity's architecture can be found, for example, in Figure 1 As shown, entity 10 includes multiple services: Service 1, Service 2, ..., Service N, where N is an integer greater than 1. Among Services 1 to Service N, services that generate data can be classified as data producers 20, and services that read data can be classified as data consumers 30. Some services can belong to both data producers 20 and data consumers 30. Figure 1 In this example, services 1 to 5 belong to data producer 20, and services 4 to 7 belong to data consumer 30. Taking the e-commerce platform as an example, the services of data producer 20 may include, but are not limited to, promotion services, management services, or photography services, while the services of data consumer 30 may include, but are not limited to, warehouse management systems (WMS), logistics services, or a product middleware.
[0061] by Figure 1For example, it can be seen that the current entity's data processing method has multiple problems such as large concurrency, complex data, wide service distribution, and fast subsequent data iteration speed. In the process of different services processing data separately, data conflicts are easily caused, and the real-time and consistency of data cannot be guaranteed. For example, in service 1, the value of attribute 1 of object 1 (such as a product in an e-commerce platform) is modified to a, while in service 2, the value of attribute 1 of object 1 is modified to b. In this way, when service 1 synchronizes its own modification of the value of attribute 1 of object 1 to service 2, service 2 does not know whether it should keep the value of attribute 1 of object 1 as b or modify the value of attribute 1 of object 1 to a according to the modification of service 1.
[0062] Furthermore, because certain data processing flows between services are coupled, the data processing of one service must consider the impact on other services. This not only complicates the design of the services themselves but also makes upgrading and maintaining each service within the entity difficult. For example, if the value of attribute 1 of object 1 in service 1 is a, if service 2 wants to change the value of attribute 1 of object 1 to b, it needs to consider whether the operation of "changing the value of attribute 1 of object 1 to b" can be performed based on the value of attribute 1 of object 1 in service 1.
[0063] Furthermore, if a data consumer service wants to retrieve data for a specific object, it needs to understand the business processing logic of each service within the entity to determine which service to retrieve the data from. Otherwise, it may not be able to quickly retrieve the desired object's data, or the retrieved data may not be the latest data for the object. Clearly, the current entity architecture is not user-friendly for data consumer services. For example, the value of attribute 2 of object 2 in service 1 is b. After service 1 modifies the value of attribute 1 of object 1 to a, it synchronizes the latest value of attribute 1 of object 1 - a to service 2; service 2 modifies the value of attribute 2 of object 2 to c based on the value a of attribute 1 of object 1. At this time, service 4 wants to obtain the value of attribute 2 of object 2. Then, service 4 can obtain the value of attribute 2 of object 2 from service 1 or from service 2. However, service 4 must understand that the modification of the value of attribute 1 of object 1 by service 1 will trigger the modification of the value of attribute 2 of object 2 in service 2. Only then can it determine that the value of attribute 2 of object 2 in service 2 is the latest, and thus obtain the latest value c of attribute 2 of object 2 from service 2, instead of obtaining the value b of attribute 2 of object 2 from service 1.
[0064] Furthermore, in the current entity architecture, each service only synchronizes the latest object data to the middle platform, allowing users to query object data. However, each service does not synchronize the details of the object data generation and modification process to the middle platform. As a result, the middle platform does not uniformly manage and record all object data, which makes it difficult to maintain the integrity and accuracy of the object data and to locate and resolve data issues.
[0065] Based on this, an embodiment of the present application provides a data processing method, which is applied to a data bus that connects multiple services in an entity. That is, in an embodiment of the present application, an intermediate layer, a data bus, is constructed in the entity to realize data interaction between multiple services. The method may, for example, include: first, if the data of the first service among the multiple services of the entity changes, the first updated data of the first service is obtained; then, from the preset corresponding relationship, the target task corresponding to the first updated data of the first service is determined, and the corresponding relationship is used to indicate the business processing strategy for the updated data of each service on the data bus, and the target task includes at least one second service among the multiple services and the second operation performed by each second service in the at least one second service; then, the corresponding second operation is performed on each second service in the at least one second service, so that the data on the at least one second service on the entity matches the first updated data of the first service.
[0066] In this way, different services only need to maintain their own business processing logic, and the entity's newly added data bus can be used to transmit updated data from any service to other services. Each service does not need to consider the impact of its data updates on other services. This decouples the business processing logic and data processing processes of multiple services belonging to a single entity, simplifies the data processing process within an entity that includes multiple services, overcomes data processing conflicts, and ensures data processing accuracy while improving data processing efficiency. In addition, as a data bus connecting multiple services within an entity, it can also perform caching, load balancing, and scaling functions, improving the entity's performance.
[0067] It's understandable that the data bus hides the specific implementation details of the underlying databases within different services, abstracting data processing into a series of tasks. This decouples the direct relationship between services and data, improves data processing efficiency, and ensures real-time and consistent data. As an intermediary between services and data, the data bus can also perform caching, load balancing, and scaling functions, improving performance. Therefore, the data bus is the core architecture for data processing and management across the application, service, and storage layers of entities like e-commerce platforms. The emergence of the data bus has significantly promoted the rapid flow, secure, and effective management of data within these entities.
[0068] Figure 2 A schematic diagram of a possible physical architecture provided by an embodiment of the present application is shown. Figure 2 As shown, the entity 10 includes: a data bus 40 and multiple services. The multiple services may include: service 1, service 2, ..., service N, where N is an integer greater than 1. Figure 2 In this example, N=7, services 1 to 5 belong to data producer 20, and services 4 to 7 belong to data consumer 30. Data bus 40 connects to each service in data producer 20 and monitors whether the services in data producer 20 have data updates. At the same time, data bus 40 also connects to each service in data consumer 30, allowing each service in data consumer 30 to directly obtain the required data from data bus 40. Furthermore, data bus 40 synchronizes the update details corresponding to the updated data of all services to middle platform 50. Middle platform 50 can uniformly manage and record the update details of each object, making it possible to maintain data integrity and accuracy and locate and resolve data problems.
[0069] In this way, on the one hand, the data bus 40 can convert different business processing logics from different services into a unified data processing logic through a series of conversion functions, avoiding tedious compatibility processing between various services, and greatly reducing the complexity of the business processing logic design within the entity's services. On the other hand, the data bus 40 establishes a correspondence between data changes (including modifications to data content and changes in data status) and tasks, ensuring that when the content or status of the data changes, the data bus 40 can automatically determine the corresponding task and trigger the task, decoupling the dependencies between the various services, so that each service does not need to consider the mutual influence of each other's business processing logic, but only needs to focus on its own business processing logic, thereby improving the overall operating efficiency of the entity. In other words, the data bus 40 abstracts complex business processing logic into a series of updated data and tasks, and separates data processing from the business processing logic of each service, which not only improves the flexibility, scalability and stability of the service, but also simplifies the business processing logic of the service. On the other hand, because all data update processing is performed within the entity's architecture within data bus 40, data bus 40 is able to monitor and record all data updates. When an object's data changes, data bus 40 captures these changes and generates corresponding records of the update details. Data bus 40 also provides a data record query function, allowing users to easily find all relevant records of update details for a specific piece of data. This data record query function may correspond to a flexible query system within data bus 40, allowing users to query data records in a variety of ways, such as by update time, update content, or the service in which the update occurred.
[0070] It should be noted that the subject implementing the data processing method may be the data processing device provided in the embodiments of the present application. The data processing device may be carried in an electronic device or a functional module of an electronic device. The data processing device may be, for example, a data bus of an entity (such as an e-commerce platform), or may be a functional module on the data bus of the entity that can implement the data processing functions provided in the embodiments of the present application.
[0071] Figure 3 A data processing method according to an embodiment of the present invention is provided as a flow chart. The method can be applied to a data processing device, which can, for example, Figure 6 Alternatively, it can be considered that the method can be applied to a data bus, which is connected to multiple services of an entity respectively to achieve interaction with multiple services. For example, the data bus can be Figure 2 A data bus 40 is shown.
[0072] like Figure 3 As shown, the method may include, for example, the following S101 to S103:
[0073] S101: If data of a first service among multiple services of an entity changes, first updated data of the first service is obtained.
[0074] A service may refer to a functional module belonging to an entity and used to implement corresponding functions. The multiple services in S101 refer to functional modules belonging to the same entity and implementing different functions. An entity may refer to a comprehensive platform such as an e-commerce platform that includes multiple services. A first service may generally refer to at least one service among the entity's multiple services that updates data.
[0075] The change of data may refer to a change in the content of the data or a change in the state of the data. Accordingly, the first updated data of the first service may be data indicating a change in the content of the data of the first service or data indicating a change in the state of the first service. For example, in the case where the entity is an e-commerce platform A, the first service may be a payment promotion service, and the first data update of the payment promotion service may refer to a change in the value of attribute 1 on the payment promotion receipt or payment selection receipt of object 1. The first updated data may, for example, be data indicating that the value of attribute 1 on the payment promotion receipt or payment selection receipt of object 1 is modified from a to b; or, the first data update of the payment promotion service may refer to a change in the state of the payment promotion receipt or payment selection receipt of object 1. The first updated data may, for example, be data indicating that the state of the payment promotion receipt or payment selection receipt of object 1 becomes successful.
[0076] In some possible implementations, in order to avoid the impact of the data bus on the business processing logic of each service and to avoid affecting the business processing logic of the service itself as much as possible, in the embodiment of the present application, there is no need to broadcast the business of data updates or report the corresponding updated data to the data bus. Instead, the data bus checks the database corresponding to each service in real time or periodically, or monitors whether data update events occur in each service.
[0077] As an example, S101 may include: in response to monitoring a data change in a database of the first service, determining first update data based on the changed data in the database of the first service.
[0078] For example, for a service database, Figure 2 As shown, data bus 40 may include a Standard Product Unit (SPU) database and a Stock Keeping Unit (SKU) database. Assume that Service 1 is a promotion service, which includes a "promotion list" and a "selection list." Service 2 corresponds to a photography service, which includes a "photography list." Service 3 corresponds to a management service, which includes "global products" and "local products." The SPU database records data related to the object's category and material, while the SKU database records data related to the object's size and color. Updates to the data related to the "promotion list" and "selection list" included in the promotion service will affect both the SPU and SKU databases. The "photography list" in the photography service will only affect the SKU database (specifically, it can be an image of the object in the SKU database) and will not affect the SPU database. The "global products" and "local products" in the management service will only affect the SKU database and will not affect the SPU database. It should be noted that data bus 40 may also include other databases.
[0079] S102 : Determine a target task corresponding to the first update data of the first service from a preset correspondence, where the target task includes at least one second service among the multiple services and a second operation performed by each of the at least one second service.
[0080] S103: Execute a corresponding second operation on each of the at least one second service, so that data on the at least one second service on the entity matches the first updated data of the first service.
[0081] It should be noted that S103 can be understood as: executing a target task, where the target task is used to implement the impact of the updated data of the first service on at least one second service of the entity.
[0082] The preset correspondence can be understood as the basis for the business processing strategy designed within the data bus in the embodiments of this application, which uses update data to drive the data bus. The preset correspondence can include the mapping relationship between different update data and corresponding tasks in each service within the entity, which is used to determine the tasks that the data bus should execute when different services generate different update data.
[0083] The target task is a task corresponding to the first update data of the first service in a preset corresponding relationship, and is also a task that needs to be executed by the data bus after the first update data of the first service occurs.
[0084] As an example, the preset correspondence may include a correspondence between the first update data of a first service and a broadcast task. Then, the target task may be to broadcast the first update data, wherein the at least one second service includes all services on the entity, and the second operation is the operation of broadcasting the first update data. S103 may, for example, include: broadcasting the first update data in the entity, so that all other services of the entity update their data based on the first update data. In this way, the first update data of the first service can be synchronously updated to other services of the entity, allowing other services to perceive and adaptively adjust their own data based on it. The second service that receives the first update data broadcast by the data bus can adaptively adjust its own data based on the first update data. It should be noted that although the second service adaptively adjusts its own data based on the broadcasted first update data, the data of the second service also changes. However, the second service may not be identified as the first service in S101 to prevent the same update data from being repeatedly recorded and broadcast by the data bus.
[0085] As another example, the preset correspondence may include a correspondence between the first updated data of the first service and at least one database on the data bus. Then, the target task may be to update the at least one database, wherein at least one second service includes at least one database on the entity, and the second operation is an operation of saving the first updated data; S103 may, for example, include: based on the first updated data, updating at least one database on the data bus. In this way, through the unified business processing logic (also called a data model) maintained within the data bus, different business processing logics from different services can be converted into the unified business processing logic through a series of conversion functions, and the updated data of different services can be reflected in each database of the data bus, which facilitates the subsequent reading of the required data by each service of the data consumer.
[0086] As another example, the preset correspondence may include a correspondence between the first updated data of a first service and a specified service among multiple services. Then, the target task may be to synchronize the updated data to the specified service, wherein at least one second service includes at least one specified service on the entity, and the second operation is an operation for synchronizing the first updated data; S103 may, for example, include: synchronizing the first updated data to the specified service. In this way, the updated data of each service can be uniformly managed and recorded in a specified service (such as a WMS or a middle platform), making the data record more complete and comprehensive, making it possible to locate and solve data problems, and providing a basis for recording and querying all data-related content.
[0087] For example, the preset correspondence includes 10 specific correspondences: correspondence 1 to correspondence 10, wherein correspondence 1 includes the correspondence between update data 1 of service 1 and task 1, correspondence 2 includes the correspondence between update data 2 of service 1 and task 2, and correspondence 3 includes the correspondence between update data 3 of service 2 and task 3. Then, if the first service obtained by S101 is service 1 and the first updated data is update data 1, the target task determined in S102 is task 1; if the first service obtained by S101 is service 1 and the first updated data is update data 2, the target task determined in S102 is task 2; if the first service obtained by S101 is service 2 and the first updated data is update data 3, the target task determined in S102 is task 3.
[0088] The preset corresponding relationship can be understood as a business processing strategy for indicating the update data of each service on the data bus.
[0089] Before S102, the embodiment of the present application may further include: a step of establishing a preset correspondence. As an example, establishing a preset correspondence may include: based on the business processing logic of each service in the multiple services within the entity and the association relationship of the data between the multiple services, determining the preset correspondence, the preset correspondence may include a first correspondence, the first correspondence may include the correspondence between the first updated data of the first service and the target task. As another example, establishing a preset correspondence may include: defining the data status of each service in the multiple services; establishing a correspondence between the data status change of each service in the multiple services and the task to be performed as a preset correspondence, wherein the preset correspondence may include a first correspondence, the first correspondence includes the correspondence between the status change corresponding to the first updated data of the first service and the target task. In this way, pre-establishing and saving the correspondence provides a basis for S102 to automatically determine the target task, making efficient data processing in the embodiment of the present application possible.
[0090] In the embodiment of the present application, the preset correspondence in the data bus can be understood as a set of effective business processing strategies (also known as data processing mechanisms), which can greatly simplify the operation of the service and allow each service to focus only on its own business processing logic and data changes. Before establishing the preset correspondence, it is necessary to define and standardize the data content and status, where the status describes the position or stage of the object's data in the business processing logic. The status can be, for example: completed, published, selected for payment, waiting to be put on the shelf, etc. Each state corresponds to at least one subsequent event and action (i.e., the task referred to in this article).
[0091] It should be noted that S102 to S103 may be steps automatically triggered after the first updated data of the first service is obtained in S101.
[0092] In some possible implementations, in order to avoid the impact of the data bus on the business processing logic of each service and to avoid affecting the business processing logic of the service itself as much as possible, in an embodiment of the present application, the data bus can automatically process the updated data broadcast by each service to the outside, and then trigger the execution of the corresponding target task, so as to decouple the dependencies between each service and reduce the burden on the service itself, so that each service does not need to process the business processing logic between each other, but only needs to focus on its own business processing logic, thereby improving the overall operating efficiency of the entity.
[0093] For example, if Figure 4 As shown, if the status of the updated data 1 of the first service corresponding to the "promotion order" of the promotion service is "successful", then the target task 1 determined based on S102 can include synchronizing the updated data 1 to the WMS. In this way, the promotion service itself does not need to understand the other services that need to be triggered by the updated data 1, as well as the target tasks that trigger the execution of other services. The data bus can uniformly process the updated data 1, that is, the data bus determines the target task 1 according to the preset correspondence and automatically triggers the execution of the target task 1. Similarly, if the status of the updated data 2 of the first service corresponding to the "local product" of the management service is advanced to "published", then the target task 2 determined based on S102 can include synchronizing the updated data 2 to the middle platform. In this way, the management service itself does not need to understand the other services that need to be triggered by the updated data 2, as well as the target tasks 2 that trigger the execution of other services. The data bus can uniformly process the updated data 2, that is, the data bus determines the target task 2 according to the preset correspondence and automatically triggers the execution of the target task 2.
[0094] In some possible implementations, the data bus may also record each change in the data so that it can be traced during subsequent maintenance and query.
[0095] As an example, the method provided by the embodiment of the present application may further include: saving the update details corresponding to the first update data. The update details are used to describe the relevant circumstances of the first update data in detail, and the update details may include at least one of the following information: update time, update content, update operator, or service that generates the update data. Assuming that the update data is the first update data of the first service, then the method may further include: in response to a query request for the first update data of the first service, obtaining and displaying the update details of the first update data, and the query request may include at least one information in the update details of the first update data. Alternatively, when the user wants to query the second update data, then the method may further include: in response to the query request, obtaining and displaying the update details of the second update data, and the query request may include at least one information in the update details of the second update data. In this way, the data bus can record a more detailed data processing process and provide a data query function, making it possible to conveniently and quickly query the relevant circumstances of the data from the data bus.
[0096] Because each service generates updated data, in addition to the service's own business processing logic, all updated data processing is performed on the data bus. This can include operations such as adding, deleting, and modifying data, making it possible to monitor and record all updated data on the data bus. The data bus generates corresponding records for captured updated data. The content of these records can be understood as the update details mentioned above. For example, for data modifications, the update details may include but are not limited to: the content of the modification, the time of modification, the target service of the modification, the performer of the modification operation, and the reason for the modification.
[0097] For example, if Figure 5 As shown, the data bus can record update details 1 of user A modifying the object title on the management service on year a1, month b1, and day c1, and can also record update details 2 of user B modifying the object title on the promotion service on year a2, month b2, and day c2. The update details recorded on the data bus can be saved in a data format specified on the data bus.
[0098] It should be noted that the object in the embodiment of the present application may refer to a target provided to the user for editing in an entity, for example, it may be a product or service provided for editing and listing on an electronic product platform.
[0099] In some possible implementations, in order to avoid the impact of the data bus on the business processing logic of each service and to minimize the impact on the business processing logic of the service itself, the operations performed by the data bus in the embodiments of the present application generally do not affect the business processing logic to be executed by the first service itself for the first updated data, and the two can be executed simultaneously. However, if the first service needs to ensure strict data synchronization through distributed transactions or synchronization interfaces, after the first service generates the first updated data, the data bus can first execute the method provided in the embodiments of the present application. Only when the data bus successfully executes the target task will it trigger the first service to execute the business processing logic corresponding to the first updated data.
[0100] It can be seen that through this method, different services only need to maintain their own business processing logic, and the newly added data bus in the entity can realize the purpose of transmitting the updated data of any service to other services. Each service does not need to consider the impact of the data update of the service on other services. It decouples the relationship between the business processing logic and the data processing process of multiple services belonging to an entity, simplifies the data processing process within the entity including multiple services, overcomes the problem of conflict in data processing of objects, can effectively avoid tedious compatibility processing between various services, and greatly reduces the complexity of services. On the basis of improving data processing efficiency, it ensures the accuracy of data processing.
[0101] Accordingly, the embodiment of the present application further provides a data processing device 600, such as Figure 6 The device 600 is applied to a data bus of an entity, and the data processing device 600 may include:
[0102] An acquiring unit 601 is configured to acquire first updated data of a first service among multiple services of an entity if data of the first service changes.
[0103] a determining unit 602 configured to determine, from a preset correspondence, a target task corresponding to the first update data of the first service, the correspondence being used to indicate a business processing policy for the update data of each service on the data bus, the target task including at least one second service among the plurality of services and a second operation performed by each of the at least one second service;
[0104] The execution unit 603 is configured to execute a corresponding second operation on each of the at least one second service, so that the data on the at least one second service on the entity matches the first updated data of the first service.
[0105] In a possible implementation, the at least one second service includes all services on the entity, and the second operation is an operation of broadcasting the first update data;
[0106] Alternatively, the at least one second service includes at least one database on the entity, and the second operation is an operation of saving the first updated data;
[0107] Alternatively, the at least one second service includes at least one designated service on the entity, and the second operation is an operation of synchronizing the first updated data.
[0108] In a possible implementation, the apparatus 600 further includes:
[0109] a storage unit, configured to store update details of the first update data, the update details including at least one of the following information: update time, update content, update operator, or service where the update occurs;
[0110] a query unit, configured to obtain update details of the second update data in response to a query request, wherein the query request includes at least one information in the update details of the second update data;
[0111] The display unit is configured to display update details of the second update data.
[0112] In a possible implementation, the apparatus 600 further includes:
[0113] An establishment unit is used to determine, before determining a target task corresponding to the first updated data of the first service from a preset correspondence, the preset correspondence based on the business processing logic of each service in a plurality of services and the association relationship of data between the plurality of services, wherein the preset correspondence includes a first correspondence, and the first correspondence includes a correspondence between the first updated data of the first service and the target task.
[0114] In a possible implementation, the apparatus 600 further includes:
[0115] a defining unit, configured to define a data state of each of the plurality of services before determining a target task corresponding to the first updated data of the first service from a preset correspondence relationship;
[0116] The suggestion unit is used to establish a correspondence between the data status changes of each service in multiple services and the tasks that need to be performed, as a preset correspondence. The preset correspondence includes a first correspondence, and the first correspondence includes a correspondence between the status changes corresponding to the first updated data of the first service and the target task.
[0117] In a possible implementation, the acquiring unit 601 is specifically configured to:
[0118] In response to monitoring a data change in the database of the first service, first update data is determined based on the changed data in the database of the first service.
[0119] In a possible implementation, the first service is a producer or consumer of data in the entity, and the second service is a producer or consumer of data in the entity.
[0120] It should be noted that the specific implementation of the device 600 and the technical effects achieved can be found in Figure 3 Description of the method shown.
[0121] In addition, an embodiment of the present application also provides an electronic device, which includes a processor and a memory: the memory is used to store instructions or computer programs; the processor is used to execute the instructions or computer programs in the memory, so that the electronic device executes any implementation of the method provided in the embodiment of the present application.
[0122] See also Figure 7 , which shows a schematic structural diagram of an electronic device 700 suitable for implementing the embodiments of the present disclosure. The terminal devices in the embodiments of the present disclosure may include, but are 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 (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 7 The electronic device shown is only an example and should not limit the functions and scope of use of the embodiments of the present disclosure.
[0123] like Figure 7 As shown, the electronic device 700 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage device 708 into a random access memory (RAM) 703. Various programs and data required for the operation of the electronic device 700 are also stored in the RAM 703. The processing device 701, the ROM 702, and the RAM 703 are connected to each other via a bus 704. An input / output (I / O) interface 705 is also connected to the bus 704.
[0124] Typically, the following devices may be connected to the I / O interface 705: an input device 706 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 707 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 708 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 709. The communication device 709 may allow the electronic device 700 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 7The electronic device 700 is shown with various devices, but it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed instead.
[0125] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 709, or installed from the storage device 708, or installed from the ROM 702. When the computer program is executed by the processing device 701, the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.
[0126] The electronic device provided by the embodiment of the present disclosure and the method provided by the above embodiment belong to the same inventive concept. For technical details not fully described in this embodiment, please refer to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.
[0127] An embodiment of the present application further provides a computer-readable medium, in which instructions or computer programs are stored. When the instructions or computer programs are executed on a device, the device executes any implementation of the method provided in the embodiment of the present application.
[0128] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination of the above. More specific examples of computer-readable storage media may 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 may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or component. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport 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 may be transmitted using any suitable medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.
[0129] In some embodiments, the client and server can communicate using any currently known or future developed network protocol, such as HTTP (Hypertext Transfer Protocol), and can be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0130] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0131] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device can perform the method.
[0132] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including, but not limited to, object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer or server. In cases involving a remote computer, the remote computer may 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 may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0133] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0134] The units involved in the embodiments described in this disclosure may be implemented in software or hardware, wherein the name of a unit / module does not, in some cases, limit the unit itself.
[0135] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary 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 chip (SOCs), complex programmable logic devices (CPLDs), and the like.
[0136] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0137] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Reference can be made to the common and similar parts between the various embodiments. For the systems or devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the method description.
[0138] It should be understood that in this application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0139] It should also be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or device comprising the element.
[0140] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), internal memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0141] It should be noted that in the embodiments of the present application, user sensitive information is not involved, and user-related information is obtained, used and determined after user authorization. In one example, before obtaining user-related information, the corresponding interface displays prompt information related to obtaining data use authorization. This prompt information is based on relevant laws and regulations and informs the user of the type, scope of use, usage scenarios, etc. of the personal information involved in this disclosure in an appropriate manner, so that the user can determine whether to agree to the authorization based on the prompt information. It can be understood that the above-mentioned notification and the process of obtaining user authorization are only illustrative and do not constitute a limitation on the implementation method of this disclosure. Other methods that meet relevant laws and regulations can also be applied to the implementation method of this disclosure.
[0142] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present application. Various modifications to these embodiments will be readily apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application is not limited to the embodiments shown herein, but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A data processing method, characterized in that: The data bus used in the entity includes: If data of a first service among the multiple services of the entity changes, obtaining first updated data of the first service; Determining a target task corresponding to the first update data of the first service from a preset correspondence relationship, wherein the correspondence relationship is used to indicate a business processing strategy for the update data of each service on the data bus, the target task including at least one second service among the multiple services and a second operation performed by each of the at least one second service; A corresponding second operation is performed on each of the at least one second service so that data on the at least one second service on the entity matches the first updated data of the first service.
2. The method according to claim 1, characterized in that The at least one second service includes all services on the entity, and the second operation is an operation of broadcasting the first update data; Alternatively, the at least one second service includes at least one database on the entity, and the second operation is an operation of saving the first updated data; Alternatively, the at least one second service includes at least one designated service on the entity, and the second operation is an operation of synchronizing the first updated data.
3. The method according to claim 1 or 2, characterized in that The method further comprises: saving update details of the first update data, the update details including at least one of the following information: update time, update content, update operator, or service where the update occurs; Responding to a query request, acquiring update details of the second update data, wherein the query request includes at least one information in the update details of the second update data; The update details of the second update data are displayed.
4. The method according to any one of claims 1 to 3, characterized in that Before determining the target task corresponding to the first update data of the first service from the preset correspondence, the method further includes: Based on the business processing logic of each service in the multiple services and the association relationship of data between the multiple services, the preset corresponding relationship is determined, and the preset corresponding relationship includes a first corresponding relationship, and the first corresponding relationship includes the corresponding relationship between the first updated data of the first service and the target task.
5. The method according to any one of claims 1 to 3, characterized in that Before determining the target task corresponding to the first update data of the first service from the preset correspondence, the method further includes: defining a data state for each of the plurality of services; Establish a correspondence between the data status changes of each service in the multiple services and the tasks that need to be executed as the preset correspondence, and the preset correspondence includes a first correspondence, and the first correspondence includes a correspondence between the status changes corresponding to the first updated data of the first service and the target task.
6. The method according to any one of claims 1 to 5, characterized in that If data of a first service among the multiple services of the entity changes, obtaining first updated data of the first service includes: In response to monitoring a data change in the database of the first service, the first update data is determined based on the changed data in the database of the first service.
7. The method according to any one of claims 1 to 6, characterized in that The first service is a producer or consumer of data in the entity, and the second service is a producer or consumer of data in the entity.
8. A data processing device, characterized in that: The data bus used in the entity includes: an acquiring unit, configured to acquire first updated data of a first service among the plurality of services of the entity if data of the first service changes; a determining unit, configured to determine, from a preset correspondence, a target task corresponding to the first update data of the first service, the correspondence being used to indicate a business processing policy for the update data of each service on the data bus, the target task comprising at least one second service among the plurality of services and a second operation performed by each of the at least one second service; An execution unit is configured to execute a corresponding second operation on each of the at least one second service, so that data on the at least one second service on the entity matches the first updated data of the first service.
9. An electronic device, characterized in that: The electronic device includes: a processor and a memory; The memory is used to store instructions or programs; The processor is configured to execute the instructions or programs in the memory, so that the electronic device executes the method according to any one of claims 1 to 7.
10. A readable medium, characterized in that The readable medium stores instructions or programs, and when the instructions or programs are executed on a processor, the processor is caused to execute the method according to any one of claims 1 to 7.