Data processing method and device, equipment, storage medium and computer program product

By instrumenting data in web front-end applications to obtain global data dependencies, the lack of data dependency analysis in existing technologies is solved, improving development efficiency and code reusability, and optimizing performance.

CN114416029BActive Publication Date: 2026-03-27BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-24
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

In existing technologies, web front-end applications under the MVVM framework lack the ability to analyze the dependencies and consumption characteristics between data when managing data state, resulting in low development efficiency, and the output of data state management cannot reflect the interaction relationship between components.

Method used

By instrumenting, a proxy is inserted between the target data and the data source to obtain global data and determine the dependencies between the data, including data declaration, subscription and update information, and to build a dependency graph of global data.

Benefits of technology

It enables clear analysis of dependencies between global data, improves code reusability and performance optimization capabilities, and helps developers understand project structure and make technical decisions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114416029B_ABST
    Figure CN114416029B_ABST
Patent Text Reader

Abstract

The present disclosure provides a data processing method, device, equipment, storage medium and computer program product, relates to the technical field of computer application, and particularly relates to the technical field of data processing of web front-end application. The specific implementation scheme is as follows: determining target data to be processed, and determining a data source of the target data; performing a patching process between the target data and the data source to obtain global data in a process in which the target data accesses the data source; and determining and outputting a dependency relationship between each data in the global data. Through the present disclosure, the dependency relationship between each data in the global data can be determined and output, and the dependency relationship between the global data can be analyzed.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to the technical field of computer application, and particularly relates to the technical field of data processing of web front-end application. BACKGROUND

[0002] For the web front-end application under the MVVM (Model-View-View Model) framework, the details of view changes can be hidden by using the data-driven method, so that the developer only needs to focus on the processing related to data changes, without needing to care about the details of view change update.

[0003] In the related art, for the code data of the web front-end application, a specific state management tool of a matching framework can be applied to perform global data state analysis and management, so as to obtain data whose data state changes, track and locate problems of the application, and perform correctness analysis on the data change process from the model to the view of the application. SUMMARY

[0004] The present disclosure provides a data processing method, device, equipment, storage medium and computer program product.

[0005] According to an aspect of the present disclosure, a data processing method is provided, comprising:

[0006] determining target data to be processed, and determining a data source of the target data; performing a plug-in processing between the target data and the data source, to obtain global data in a process in which the target data accesses the data source; determining and outputting a dependency relationship between each data in the global data.

[0007] According to another aspect of the present disclosure, a data processing device is provided, comprising:

[0008] a determining unit, configured to determine target data to be processed, and determine a data source of the target data; a processing unit, configured to perform a plug-in processing between the target data and the data source, to obtain global data in a process in which the target data accesses the data source; and an output unit, configured to determine and output a dependency relationship between each data in the global data.

[0009] According to still another aspect of the present disclosure, an electronic device is provided, comprising:

[0010] at least one processor; and a memory connected with the at least one processor in communication; wherein

[0011] The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method described above.

[0012] According to yet another aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to perform the method described above.

[0013] According to yet another aspect of the present disclosure, a computer program product is provided, comprising a computer program which, when executed by a processor, implements the method described above.

[0014] By the present disclosure, the target data and the data source are plugged, and the global data in the process of accessing the data source by the target data can be obtained, so that a data processing device with higher efficiency can be provided.

[0015] It should be understood that the content described in this part is not intended to identify key or important features of the embodiments of the present disclosure, nor to limit the scope of the present disclosure. Other features of the present disclosure will become apparent from the following description. BRIEF DESCRIPTION OF DRAWINGS

[0016] The accompanying drawings are used to better understand the present scheme, and do not limit the present disclosure. Among them:

[0017] Figure 1 is a flow chart of a data processing method according to an exemplary embodiment of the present disclosure;

[0018] Figure 2 shows a global data production and consumption relationship diagram according to an exemplary embodiment of the present disclosure;

[0019] Figure 3 shows a schematic diagram of plugging between the producer and the consumer according to an exemplary embodiment of the present disclosure;

[0020] Figure 4 is a flow chart of a data processing method according to an exemplary embodiment of the present disclosure;

[0021] Figure 5 is a block diagram of a data processing device according to the present disclosure;

[0022] Figure 6 shows a schematic block diagram of an example electronic device 600 that can be used to implement embodiments of the present disclosure. DETAILED DESCRIPTION

[0023] Exemplary embodiments of the present disclosure are described herein with reference to the accompanying drawings, which are meant to be exemplary in nature, and include various details intended to facilitate understanding of the present disclosure. Thus, it should be apparent to those skilled in the art that various modifications and changes can be made in the embodiments described herein without departing from the scope and spirit of the present disclosure. Likewise, the description is not to be construed to be exhaustive or limiting as to the forms disclosed herein. Numerous specific aspects are described with specificity and are set forth with sufficient particularity as to clearly identify the inventive features.

[0024] The data processing method provided by the present disclosure is applied to the scene of analyzing and processing data of a web front-end application. For example, it can be applied to data analysis and processing of a modern web front-end application based on an MVVM framework.

[0025] In the related art, a front-end program analysis tool can be used to analyze global data of a web front-end application. At present, various analysis tools for analyzing global data of a web front-end application mainly focus on program analysis capabilities in a specific state management scheme, and provide data change tracking capabilities for specific schemes. Such data change tracking capabilities mainly start from the change of a single data state, and analyze the data change relationship involved in the data running process through dynamic running, for program problem positioning and program correctness analysis. However, such a scheme only focuses on data change tracking, and lacks analysis of the dependence and consumption characteristics between data, especially for data subscription and data dependency related parts, and lacks analysis capabilities, and cannot completely solve the problems encountered in business, thereby affecting the development efficiency. In other words, in the scheme for managing the data state of global data in the related art, only the tracking of data changes is supported, and the dependence analysis between data is not involved, nor is it involved in which views consume the data. Moreover, the output result of the data state management in the related art is a linear structure log, which cannot reflect the association relationship between the output results of components, that is, cannot reflect the interaction relationship between logs, the serial relationship of component operations, etc.

[0026] Therefore, the present disclosure provides a data processing method, in which, by means of a plug-in processing method, global data involved in the process of accessing the data source by data with consumption characteristics is obtained, and the dependence relationship between each data in the global data is determined and output, so as to analyze the dependence and consumption characteristics between each data in the global data.

[0027] Figure 1 is a flow chart of a data processing method according to an exemplary embodiment of the present disclosure. Referring to Figure 1 As shown in the figure, the data processing method includes the following steps S101 to S103.

[0028] In step S101, the target data to be processed is determined, and the data source of the target data is determined.

[0029] In step S102, a stubbing process is performed between the target data and the data source to obtain global data in a process in which the target data accesses the data source.

[0030] In step S103, a dependency relationship between each data in the global data is determined and output.

[0031] The data involved in the present disclosure can be global data in a producer-consumer mode. In the producer-consumer mode, the data includes a producer and a consumer. There is only one producer of the global data, but there are usually multiple consumers. That is, one producer can correspond to multiple consumers, but one consumer can only correspond to one producer. Each producer and each consumer corresponds to an address, occupies a network node, and belongs to predetermined data. Figure 2 A global data production and consumption relationship diagram according to an example embodiment of the present disclosure is shown. Referring to Figure 2 As shown, the data of the producer can be consumed by consumer 1 and consumer 2. The target data to be processed involved in the present disclosure can be a consumer in the producer-consumer mode, such as a view element or other data with a consumption feature. The target data to be processed can also be referred to as a consumer. In the present disclosure, the data source of the target data can be a producer in the producer-consumer mode.

[0032] In the present disclosure, the stubbing process between the target data and the data source can be understood as adding a stubbing code in the source code of the global data. Through the stubbing code, the global data in the process in which the target data accesses the data source can be obtained, and then the content information of the data dependency relationship between the global data can be obtained.

[0033] In an example embodiment of the present disclosure, an agent can be inserted between the data source (producer) and the target data to be processed (consumer). Figure 3 A diagram showing the stubbing between the producer and the consumer according to an example embodiment of the present disclosure is shown. Referring to Figure 3 As shown, an agent is inserted between the data and consumer 1 and consumer 2. For the data of the data source, the consumer needs to access and modify the data through the agent and save it to the access library. The consumer cannot directly access the real data in the data source, but accesses the data through the agent.

[0034] In the present disclosure, by obtaining the access of any consumer to the data through the agent, the global data in the process in which the target data accesses the data source can be obtained. In the present disclosure, whenever a consumer accesses the data, the component path to which the current consumer belongs, the component name, the data content of the current data, and other information are calculated, and then the dependency relationship between the data is determined.

[0035] In the present disclosure, the dependency relationship between each data in the global data is determined, and the dependency relationship between each data in the global data can be outputted to realize the monitoring of the dependency relationship between the data and reflect the association relationship between each data. For example, the dependency relationship between each data in the global data can be stored in the data access library in the present disclosure.

[0036] The data processing method provided by the present disclosure can obtain the global data in the process of accessing the data source by the target data through the instrumentation, and can obtain the content information of the dependency relationship between each data in the global data. The dependency relationship between each data in the global data can be outputted to realize the analysis of the dependency relationship between the global data.

[0037] In the present disclosure, when the global data is obtained through the instrumentation code added in the source code of the data source, the declaration of the data, the update of the data, the subscription mode of the data to the component, etc. can be obtained, so that the dependency relationship of the obtained global data can cover the data state of the relatively comprehensive global data.

[0038] Figure 4 is a data processing method flow chart according to an exemplary embodiment of the present disclosure. Referring to Figure 4 The data processing method includes the following steps S201 to S203.

[0039] In step S201, the data structure returned by the data declaration API is obtained to obtain the global data declaration information of the target data accessing the data source.

[0040] In step S202, the subscription information of calling the data subscription API for data subscription is obtained to obtain the global data subscription information of the target data accessing the data source.

[0041] In step S203, the update information of calling the data update API for data update is obtained to obtain the global data update information of the target data accessing the data source.

[0042] It can be understood that the present disclosure does not limit the execution order of step S201, step S202 and step S203, and the declaration of the data, the update of the data, the subscription mode of the data to the component, etc. can be obtained.

[0043] In the related art, the APIs provided by the view layer frameworks applied to different front-end MVVMs are different in form, but the functions provided by the APIs are the same in the dimensions of data declaration, update, and subscription. For example, the functions provided by createStore in the Redux (React) framework, atom in the Recoil (React) framework, and Class@observable in the Mobx (React / Vue) framework are all data declaration API functions. The functions provided by dispatchAction in the Redux (React) framework, useRecoilState / getter in the Recoil (React) framework, and Property accessor in the Mobx (React / Vue) framework are all data update API functions. The functions provided by useSelector in the Redux (React) framework, useRecoilState / setter in the Recoil (React) framework, and Property setter in the Mobx (React / Vue) framework are all data subscription API functions. Therefore, in the present disclosure, the data declaration API, the data update API, and the data subscription API are obtained through the instrumentation method, the relevant information of the application applied to different front-end MVVM frameworks during runtime can be obtained, and the data states of the comprehensive global data are covered.

[0044] In an example embodiment, the present disclosure takes the Redux framework as an example to explain the acquisition of global data and the determination of the dependency relationship between the global data.

[0045] In the present disclosure, in the case where the relevant information of the global data declaration needs to be obtained, the data structure finally returned by the data declaration API of the framework is obtained based on the instrumentation scheme involved in the above embodiment. Under the Redux framework, the store object returned by createStore is obtained through the instrumentation method, and the object holds the global data of the web front-end application, so the declaration information of all global data can be obtained in the instrumentation proxy.

[0046] In the present disclosure, in the case where the subscription relationship of the data in the component needs to be obtained, the relevant call of the data subscription API in the component is hijacked based on the instrumentation scheme involved in the above embodiment. Under the Redux framework, when the useSelector call is performed, the access information of the selector function to the object property is obtained in the proxy access library through the instrumentation method, and the connection between the global data state and the subscription state component can be established, and the specific object property accessed in the component can be clearly determined.

[0047] In the present disclosure, in the case where the update relationship of the acquired data needs to be obtained, the update API is hijacked in a way of plugging based on the plugging scheme involved in the above embodiment. Under the Redux framework, the global data of component update is updated by dispatching the action through the call of the dispatchAction method, and therefore, by plugging the call of the dispatchAction, the change of the global data of any component can be obtained, and then according to the change of the global data before and after the call, it can be determined which component triggers the update of which data, and then the data update state in the whole process can be clearly recorded.

[0048] In the present disclosure, the data declaration API, the data update API and the data subscription API are hijacked in a way of plugging, and then the complete dependency relationship between the data and the components during the application running can be constructed, the update process of the components can be clearly described, and the developer can understand the project and make technical decisions.

[0049] The data dependency relationship involved in the present disclosure includes at least one of the following: data state, data state change information, and subscription relationship between data and components.

[0050] In the present disclosure, when the global data is obtained based on the plugging method, the access of the data by the consumer is obtained from the agent, and when the data is accessed by the consumer, the component path, the component identifier and the data content of the current consumer are calculated. The obtained component path, component identifier and data content are saved. Further, in the present disclosure, the component path, component identifier and data content corresponding to each consumer accessing the data can be compared to determine the changed and updated content, store the changed and updated content, and determine the reason for the changed and updated content, and then the data state, the change and update of the data state, and the subscription relationship between the data and the components can be determined.

[0051] In the present disclosure, when the dependency relationship between the data is determined, the component identifier of the component to which each data in the obtained global data belongs can be determined, and the data dependency relationship associated with the component identifier can be determined, and the data dependency relationship associated with the component identifier can be assembled, so that the data states of the components can be connected in series to obtain the dependency relationship between the data.

[0052] In the present disclosure, the data dependency relationship associated with the component identifier is assembled, the data state is recorded, and the reason for the change of the data state is recorded, and compared with the data state analysis result of the linear structure log method in the traditional technology, the association relationship between the output results of the components can be determined, and the subscription analysis of the global data can be more beneficial.

[0053] Further, based on the data dependency relationship between the output data, the developer can utilize the global data subscription analysis to conveniently understand which components consume the global data, obtain the dependency relationship of different components, encapsulate components with the same dependency relationship, and reuse the encapsulated components.

[0054] In the present disclosure, components with the same data dependency relationship can be determined and encapsulated, and the same dependency relationship includes at least one of the following: the same component path, the same component identifier, and the same data content. In the present disclosure, the same data dependency relationship is encapsulated, which can facilitate the developer to reuse the encapsulated data dependency relationship, perform code refactoring, and improve the code reuse degree.

[0055] Further, based on the data dependency relationship between the output data, the developer can utilize the global data subscription analysis to determine the component identifier corresponding to the relatively stable propagation link based on the recorded component identifier and the propagation link between the component identifiers, as cacheable data.

[0056] In the present disclosure, the component identifier with cacheability can be determined, and the data with component dependency can be determined based on the component identifier. The data with component dependency can be data with the same component path, or can be understood as data with the same propagation link in the data propagation process.

[0057] In the present disclosure, for the data with component dependency, the component identifier corresponding to the data with component dependency can be cached, and in subsequent performance optimization, the cached component identifier can be directly utilized to determine the corresponding component path, thereby improving the component performance optimization. In other words, through the present disclosure, it can be determined whether the data with component dependency has cacheability and the propagation link of the cacheable data through the cache fast positioning, thereby improving the performance by increasing the cache.

[0058] Further, based on the data dependency relationship between the output data, the output data is subscribed by the component subscription relationship distribution diagram. The subscription relationship distribution diagram represents the subscription relationship between the data and the component, constructs a complete data-component dependency relationship diagram during application running, and can clearly describe the update process of the component. Therefore, the object attribute and the nesting level between the objects can be determined based on the subscription relationship distribution diagram provided by the present disclosure, the module division can be judged based on the nesting level, and the code maintainability can be judged.

[0059] For example, by analyzing the subscription relationship distribution diagram of data subscribed to by components, developers can further observe the depth of data subscriptions and thus analyze whether the current module division is reasonable. For instance, the subscription relationship distribution diagram might show that a global data model has been written in the comment section of the global data. Since the comment section can only be subscribed to and cannot be divided, developers could conclude that the module division of the comment section is unreasonable in this situation.

[0060] Based on the same concept, embodiments of this disclosure also provide a data processing apparatus.

[0061] It is understood that the data processing apparatus provided in this disclosure includes hardware structures and / or software modules corresponding to each function in order to achieve the above-mentioned functions. In conjunction with the units and algorithm steps of the various examples disclosed in this disclosure, this disclosure can be implemented in hardware or a combination of hardware and computer software. Whether a function is executed by hardware or by computer software driving hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of the technical solutions of this disclosure.

[0062] As an exemplary implementation, Figure 5 This is a block diagram of a data processing apparatus according to the present disclosure. (See also...) Figure 5 As shown, the data processing apparatus 500 provided in this disclosure includes a determining unit 501, a processing unit 502, and an output unit 503.

[0063] The determining unit 501 is used to determine the target data to be processed and the data source of the target data; the processing unit 502 is used to perform instrumentation between the target data and the data source to obtain global data during the process of the target data accessing the data source; the output unit 503 is used to determine and output the dependencies between the data in the global data.

[0064] The processing unit 502 is configured to: obtain the data structure returned by the data declaration application interface to obtain the global data declaration information of the target data access data source; obtain the subscription information of the data subscription application interface to obtain the global data subscription information of the target data access data source; and obtain the update information of the data update application interface to obtain the global data update information of the target data access data source.

[0065] The output unit 503 is configured to determine component identifiers of components to which data in the global data belongs, and determine data dependency relationships associated with the component identifiers, the data dependency relationships including at least one of data states, data state change information, and subscription relationships between the data and the components.

[0066] The output unit 503 is configured to determine component identifiers of components to which data in the global data belongs, and determine data dependency relationships associated with the component identifiers, the data dependency relationships including at least one of data states, data state change information, and subscription relationships between the data and the components.

[0067] In an example embodiment of the present disclosure, the output unit 503 is further configured to determine identical data dependency relationships, the identical data dependency relationships including at least one of identical component paths, identical component identifiers, and identical data contents, and encapsulate the identical data dependency relationships.

[0068] In an example embodiment of the present disclosure, the output unit 503 is further configured to determine component-dependent data based on the component identifiers, the component-dependent data including components to which the data belongs having identical component paths, and cache component identifiers corresponding to the component-dependent data.

[0069] In an example embodiment of the present disclosure, the output unit 503 is further configured to output a subscription relationship distribution diagram, the subscription relationship distribution diagram being used to represent the subscription relationships between the data and the components.

[0070] As to the apparatuses described above in relation to the present disclosure, the specific manners in which various modules perform operations have been described in detail in the embodiments in relation to the method, and will not be described here in detail.

[0071] In the technical solutions of the present disclosure, the acquisition, storage and application of user personal information comply with relevant laws and regulations and do not violate public order and good customs.

[0072] According to the embodiments of the present disclosure, the present disclosure further provides an electronic device, a readable storage medium and a computer program product.

[0073] Figure 6 A schematic block diagram of an example electronic device 600 that can be used to implement embodiments of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptops, desktops, tablets, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown here, their connections and relationships, and their functions, are meant to be examples only, and are not intended to limit the implementations of the present disclosure described and / or claimed in this document.

[0074] As Figure 6As shown, the device 600 includes a computing unit 601 that can perform various appropriate actions and processes in accordance with a computer program stored in a read-only memory (ROM) 602 or a computer program loaded from the storage unit 608 into a random access memory (RAM) 603. Various programs and data required for the operation of the device 600 can also be stored in the RAM 603. The computing unit 601, the ROM 602, and the RAM 603 are connected to each other through a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0075] Various components in the device 600 are connected to the I / O interface 605, including an input unit 606 such as a keyboard, a mouse, etc., an output unit 607 such as various types of displays, speakers, etc., a storage unit 608 such as a magnetic disk, an optical disk, etc., and a communication unit 609 such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 609 allows the device 600 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0076] The computing unit 601 can be various general and / or special purpose processing components with processing and computing capabilities. Some examples of the computing unit 601 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The computing unit 601 performs various methods and processes described above, such as the data processing method. For example, in some embodiments, the data processing method can be implemented as a computer software program that is tangibly embodied in a machine-readable medium, such as the storage unit 608. In some embodiments, part or all of the computer program can be loaded and / or installed on the device 600 via the ROM 602 and / or the communication unit 609. When the computer program is loaded into the RAM 603 and executed by the computing unit 601, one or more steps of the data processing method described above can be performed. Alternatively, in other embodiments, the computing unit 601 can be configured to perform the data processing method by any other appropriate means, such as by means of firmware.

[0077] The various embodiments of the systems and techniques described above can be implemented in digital electronic circuitry, integrated circuitry, a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), a system on a chip (SOC), a load programmable logic device (CPLD), computer hardware, firmware, software, and / or combinations thereof. These various embodiments can include implementation in one or more computer programs that are executable and / or interpretable on a programmable system including at least one programmable processor, which can be special or general purpose, coupled to receive data and instructions from, and to transmit data and instructions to, a storage system, at least one input device, and at least one output device.

[0078] Program code for carrying out methods of the present disclosure can be written in any combination of one or more programming languages. The program code can be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the program code, when executed by the processor or controller, produces the functions / operations specified in the flowcharts and / or the block diagrams. The program code can be executed entirely on a machine, partially on a machine, partially on a machine as a stand-alone software package, partially on a machine and partially on a remote machine or entirely on a remote machine or server.

[0079] In the context of the present disclosure, a machine-readable medium can be a tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device. The 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, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the machine-readable storage medium will include one or more lines of electrical connections, portable computer disks, hard disk drives, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or Flash memory), optical fibers, portable compact disc read-only memories (CD-ROMs), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0080] To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user and a keyboard and a pointing device (e.g., a mouse or a trackball) by which the user can provide input to the computer. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form, including acoustic, speech, or tactile input.

[0081] The systems and techniques described here can be implemented in a computing system that includes a back end component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front end component (e.g., a user computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.

[0082] The computer system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server can arise by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, a server of a distributed system, or a server combined with a blockchain.

[0083] It should be understood that various forms of flow shown above can be used, with steps reordered, added, or removed. For example, the steps recited in the present disclosure can be performed in parallel, in series, or in a different order, without limitation, as long as the desired results of the technology disclosed in the present disclosure are achieved.

[0084] The specific embodiments described above are not intended to limit the scope of the present disclosure. Those skilled in the art will understand that various modifications, combinations, sub-combinations, and alternatives can be made to the specific embodiments without departing from the spirit and principles of the present disclosure. Any further modifications, changes, improvements, and the like that come within the spirit and principles of the present disclosure should be considered within the scope of the present disclosure.

Claims

1. A data processing method, comprising: determining target data to be processed and determining a data source of the target data, wherein the target data is a consumer in a producer-consumer mode and the data source of the target data is a producer in the producer-consumer mode; performing instrumentation processing between the target data and the data source to obtain global data in a process in which the target data accesses the data source; determining and outputting dependency relationships between data in the global data; wherein the determining and outputting of the dependency relationships between the data in the global data comprises: determining component identifiers of components to which the data in the global data belong; determining data dependency relationships associated with the component identifiers, the data dependency relationships comprising at least one of data states, data state change information, and subscription relationships between data and components; assembling the data dependency relationships associated with the component identifiers; the method further comprising: in response to a consumer accessing data, calculating a component path of a component to which the current consumer belongs, a component identifier, and data content of current data, comparing component paths, component identifiers, and data content corresponding to each time the consumer accesses data, determining and storing content that has changed and a reason for which the content has changed; wherein the obtaining of the global data in the process in which the target data accesses the data source comprises: obtaining a data structure returned by a data declaration application program interface to obtain global data declaration information of the target data accessing the data source; obtaining subscription information of calling a data subscription application program interface to subscribe to data to obtain global data subscription information of the target data accessing the data source; obtaining update information of calling a data update application program interface to update data to obtain global data update information of the target data accessing the data source.

2. The method of claim 1, further comprising: determining identical data dependency relationships, the identical data dependency relationships comprising at least one of identical component paths, identical component identifiers, and identical data content; encapsulating the identical data dependency relationships.

3. The method of claim 1, further comprising: based on the component identifiers, determining data that exists in component dependency, the data that exists in the component dependency comprising component paths to which the data belongs being identical; caching component identifiers corresponding to the data that exists in the component dependency.

4. The method of claim 1, further comprising: outputting a subscription relationship distribution diagram, the subscription relationship distribution diagram being used to represent subscription relationships between data and components.

5. A data processing apparatus, comprising: a determining unit configured to determine target data to be processed and determine a data source of the target data, wherein the target data is a consumer in a producer-consumer mode and the data source of the target data is a producer in the producer-consumer mode; a processing unit configured to perform instrumentation processing between the target data and the data source to obtain global data in a process in which the target data accesses the data source; an output unit configured to determine and output dependency relationships between data in the global data. The output unit is configured to: determine the component identifier of each data in the global data; determine the data dependency associated with the component identifier, the data dependency including at least one of the following: data state, data state change information, and subscription relationship between data and component; assemble the data dependency associated with the component identifier; The processing unit is further configured to: in response to the consumer accessing the data, calculate the component path, component identifier, and data content of the current data of the consumer, compare the component path, component identifier, and data content corresponding to each consumer accessing the data, determine and store the changed update content and the reason for the changed update content; The processing unit is configured to: obtain the data structure returned by the data declaration application program interface to obtain the global data declaration information of the target data accessing the data source; obtain the subscription information of calling the data subscription application program interface for data subscription to obtain the global data subscription information of the target data accessing the data source; obtain the update information of calling the data update application program interface for data update to obtain the global data update information of the target data accessing the data source.

6. The apparatus of claim 5, wherein the output unit is further configured to: determine the same data dependency, the same data dependency including at least one of the following: same component path, same component identifier, and same data content; package the same data dependency.

7. The apparatus of claim 5, wherein the output unit is further configured to: based on the component identifier, determine the data dependent on the component, the data dependent on the component including the same component path of the data; cache the component identifier corresponding to the data dependent on the component.

8. The apparatus of claim 5, wherein the output unit is further configured to: output a subscription relationship distribution diagram, the subscription relationship distribution diagram being used to represent the subscription relationship between data and component.

9. An electronic device, comprising: at least one processor; and a memory connected in communication with the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-4.

10. A non-transitory computer readable storage medium having stored thereon computer instructions, wherein, The computer instructions are used to enable the computer to perform the method of any one of claims 1-4.

11. A computer program product comprising a computer program which, when executed by a processor, implements the method of any one of claims 1-4.

Citation Information

Patent Citations

  • Visualization method, device and system for dependence relation of global task nodes

    CN106293928A

  • Data stream analysis method, apparatus and device, and medium

    CN107622015A