A data processing method, device, equipment, storage medium and program product
By setting conversion conditions on the interactive interface and recording to the functional module configuration information, the automatic conversion of data transmission between modules is achieved, and the problem of inflexible data transmission between data processing software modules in the prior art is solved, and the flexibility of data transmission is improved and response speed.
Patent Information
- Application Number
- CN202411098948.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-09
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2044-08-09
AI Technical Summary
Existing data processing software lacks flexibility in data transmission between modules and cannot respond quickly to changes in business needs. Developers need to manually write new modules for data reprocessing, resulting in cumbersome and lengthy process.
By setting conversion conditions on the interactive interface and recording the configuration information to the functional modules, automatic conversion of data transmission between modules is realized. Users do not need to manually write new modules, but directly adjust data transmission on the interactive interface.
It greatly improves the flexibility of data transmission between modules, reduces the need to manually write new modules, simplifies the software update process, and can quickly respond to business changes.
Smart Images

Figure CN118642619B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer software technology, and in particular to a data processing method, device, equipment, storage medium and program product. Background Art
[0002] Data processing software usually includes multiple modules, each of which implements corresponding functions. These modules cooperate with each other in a certain logical order to realize a specific data processing process. For example, the data processing software includes an image conversion module and a positioning module, wherein the image conversion module is a pre-order module, which can convert a color image into a black-and-white image, and the positioning module is a subsequent module, which can obtain the black-and-white image by subscribing to the data output by the image conversion module and then locate based on the black-and-white image, thereby realizing the data processing process of locating key information in the image.
[0003] However, in some scenarios, the output data of the previous module cannot be directly used by the subsequent module, and the output data needs to be reprocessed before being input into the subsequent module. The existing method is that developers use scripting languages to manually write a new module for reprocessing the output data of the previous module, and then insert the new module between the previous module and the subsequent module.
[0004] However, this approach requires developers to manually write new modules based on the data reprocessing method, integrate the new modules into the released software, and then release an updated version of the software to implement this change. This process is cumbersome and lengthy, and it is impossible to flexibly adjust the data transmitted between modules, making it difficult to quickly respond to changing business needs. Summary of the invention
[0005] The purpose of the embodiments of the present application is to provide a data processing method, device, equipment, storage medium and program product to flexibly adjust the data transmitted between modules. The specific technical solution is as follows:
[0006] In a first aspect, an embodiment of the present application provides a data processing method, the method comprising:
[0007] In response to a conversion condition setting operation by a user on an interactive interface, obtaining a conversion condition set by the user on the interactive interface for data of a functional module, and recording the conversion condition into configuration information of the functional module;
[0008] In response to calling the first functional module, if the data to be converted by the first conversion condition is the data output by the first functional module, after obtaining the first data output by the first functional module, convert the first data according to the first conversion condition, and input the converted first data into the second functional module, wherein the first conversion condition is the conversion condition recorded in the configuration information of the first functional module, and the second functional module subscribes to the data output by the first functional module;
[0009] If the data to be converted by the first conversion condition is data input into the first functional module, after generating second data input into the first functional module based on the data output by the third functional module, the second data is converted according to the first conversion condition, and the converted second data is input into the first functional module, wherein the first functional module subscribes to the data output by the third functional module.
[0010] Optionally, the second data includes: input data and / or module parameters of the first functional module;
[0011] The step of generating second data input into the first functional module according to the data output by the third functional module comprises:
[0012] The data output by the third functional module are determined as input data and / or module parameters of the first functional module.
[0013] Optionally, the first conversion condition is an expression, and converting the first data according to the first conversion condition and inputting the converted first data into the second functional module includes:
[0014] Performing operation on the first data according to the expression, and inputting the operation result into the second functional module;
[0015] The converting the second data according to the first conversion condition and inputting the converted second data into the first functional module includes:
[0016] The second data is operated according to the expression, and the operation result is input into the first functional module.
[0017] Optionally, there are multiple second functional modules, and inputting the converted first data into the second functional module includes:
[0018] The converted first data are respectively input into each second functional module.
[0019] Optionally, before converting the first data according to the first conversion condition, the method further includes:
[0020] Determine whether the data output by the first functional module currently obtained is the same as the data output by the first functional module last obtained; if they are different, perform the step of converting the first data according to the first conversion condition; if they are the same, input the converted first data obtained by the last conversion into the second functional module;
[0021] and / or,
[0022] Before converting the second data according to the first conversion condition, the method further includes:
[0023] Determine whether the data currently generated and input into the first functional module are the same as the data generated and input into the first functional module last time; if different, execute the step of converting the second data according to the first conversion condition; if the same, input the converted second data obtained by the last conversion into the first functional module.
[0024] Optionally, after obtaining the first data output by the first functional module, converting the first data according to the first conversion condition, and inputting the converted first data into the second functional module includes:
[0025] When it is detected that the first data output by the first functional module is newly added in the data storage area, the first data is converted according to the first conversion condition, and the converted first data is stored in the data storage area to trigger the second functional module to obtain the converted first data;
[0026] After generating second data input into the first functional module according to data output by the third functional module, converting the second data according to the first conversion condition, and inputting the converted second data into the first functional module, comprises:
[0027] When data newly output by a third functional module is detected in the data storage area, second data input into the first functional module is generated based on the data output by the third functional module, the second data is converted according to the first conversion condition, and the converted second data is stored in the data storage area to trigger the first functional module to obtain the converted second data.
[0028] In a second aspect, an embodiment of the present application provides a data processing device, the device comprising:
[0029] A setting unit, configured to obtain, in response to a conversion condition setting operation performed by a user on an interactive interface, a conversion condition set by the user on the interactive interface for data of a functional module, and record the conversion condition in configuration information of the functional module;
[0030] a first data conversion unit, configured to, in response to calling the first functional module, convert the first data output by the first functional module according to the first conversion condition after obtaining the first data output by the first functional module, and input the converted first data into the second functional module, when the data to be converted by the first conversion condition is the data output by the first functional module, wherein the first conversion condition is the conversion condition recorded in the configuration information of the first functional module, and the second functional module subscribes to the data output by the first functional module;
[0031] A second data conversion unit is used to respond to calling the first functional module. When the data to be converted by the first conversion condition is the data input into the first functional module, after generating the second data input into the first functional module according to the data output by the third functional module, the second data is converted according to the first conversion condition and the converted second data is input into the first functional module, wherein the first functional module subscribes to the data output by the third functional module.
[0032] Optionally, the second data includes: input data and / or module parameters of the first functional module; a second data conversion unit, specifically used to determine the data output by the third functional module as the input data and / or module parameters of the first functional module.
[0033] Optionally, the first conversion condition is an expression; the first data conversion unit is specifically used to operate the first data according to the expression, and input the operation result into the second functional module; the second data conversion unit is specifically used to operate the second data according to the expression, and input the operation result into the first functional module.
[0034] Optionally, there are multiple second functional modules, and the first data conversion unit is specifically used to input the converted first data into each second functional module respectively.
[0035] Optionally, the device also includes: a first judgment unit, used to judge whether the data currently obtained and output by the first functional module is the same as the data output by the first functional module obtained last time; if different, triggering the first data conversion unit; if the same, triggering the first data input unit; the first data input unit, used to input the converted first data obtained by the last conversion into the second functional module; a second judgment unit, used to judge whether the data currently generated and input into the first functional module is the same as the data generated and input into the first functional module last time; if different, triggering the second data conversion unit; if the same, triggering the second data input unit; the second data input unit is used to input the converted second data obtained by the last conversion into the first functional module.
[0036] Optionally, the first data conversion unit is specifically used to, when detecting that first data output by the first functional module is newly added to the data storage area, convert the first data according to the first conversion condition, and store the converted first data in the data storage area, so as to trigger the second functional module to obtain the converted first data; the second data conversion unit is specifically used to, when detecting that data output by the third functional module is newly added to the data storage area, generate second data to be input into the first functional module according to the data output by the third functional module, convert the second data according to the first conversion condition, and store the converted second data in the data storage area, so as to trigger the first functional module to obtain the converted second data.
[0037] In a third aspect, an embodiment of the present application provides an electronic device, including:
[0038] Memory, used to store computer programs;
[0039] The processor is used to implement any method described in the first aspect when executing a program stored in the memory.
[0040] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, any method described in the first aspect is implemented.
[0041] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements any of the methods described in the first aspect above.
[0042] Beneficial effects of the embodiments of the present application:
[0043] In the solution provided by the embodiment of the present application, in response to the conversion condition setting operation of the user on the interactive interface, the conversion condition set by the user on the interactive interface for the data of the functional module is obtained, and the conversion condition is recorded in the configuration information of the functional module; in response to calling the first functional module, if the data to be converted by the first conversion condition is the data output by the first functional module, after obtaining the first data output by the first functional module, the first data is converted according to the first conversion condition, and the converted first data is input into the second functional module, wherein the first conversion condition is the conversion condition recorded in the configuration information of the first functional module, and the second functional module subscribes to the data output by the first functional module; if the data to be converted by the first conversion condition is the data input into the first functional module, after generating the second data input into the first functional module according to the data output by the third functional module, the second data is converted according to the first conversion condition, and the converted second data is input into the first functional module, wherein the first functional module subscribes to the data output by the third functional module. When it is necessary to adjust the data transmitted between modules, the user can set the corresponding conversion conditions on the interactive interface, and then the electronic device can record the conversion conditions in the configuration information of the module, and when data is transmitted between modules, the data to be transmitted between modules is automatically converted according to the conversion conditions recorded in the configuration information. In this process, the user only needs to set the corresponding conversion conditions on the interactive interface to adjust the data transmitted between modules, without manually writing a new module, and without integrating the new module into the released software version and releasing an updated version of the software, thus greatly improving the flexibility of adjusting the data transmitted between modules.
[0044] Of course, implementing any product or method of the present application does not necessarily require achieving all of the advantages described above at the same time. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other embodiments can also be obtained based on these drawings.
[0046] Figure 1 A flowchart of a data processing method provided in an embodiment of the present application;
[0047] Figure 2a This is a first schematic diagram of a conversion condition setting interface provided by an embodiment of the present application;
[0048] Figure 2b is a second schematic diagram of a conversion condition setting interface provided in an embodiment of the present application;
[0049] Figure 2c is a third schematic diagram of a conversion condition setting interface provided in an embodiment of the present application;
[0050] Figure 3 A schematic diagram of a data transmission method provided in an embodiment of the present application;
[0051] Figure 4 Based on Figure 1 A schematic diagram of a data processing method of the illustrated embodiment;
[0052] Figure 5 Based on Figure 1 A schematic diagram of another data processing method of the illustrated embodiment;
[0053] Figure 6 Based on Figure 5 A schematic diagram of a method of converting input data in the illustrated embodiment;
[0054] Figure 7 Based on Figure 5 A schematic diagram of a method of converting module parameters in the illustrated embodiment;
[0055] Figure 8 Based on Figure 1 A schematic diagram of a data processing method according to the illustrated embodiment;
[0056] Fig. 9 Based on Figure 4 A schematic diagram of a multi-module data transmission method in the illustrated embodiment;
[0057] Fig.10 A schematic diagram of the structure of a data processing device provided in an embodiment of the present application;
[0058] Fig.11 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0059] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field based on the present application belong to the scope of protection of the present application.
[0060] In order to flexibly adjust the data transmitted between modules, an embodiment of the present application provides a data processing method, device, electronic device, computer-readable storage medium and computer program product. The following first introduces a data processing method provided in an embodiment of the present application.
[0061] A data processing method provided in an embodiment of the present application can be applied to any electronic device that needs to adjust data transmitted between modules, for example, it can be a terminal device, a server, etc., without specific limitation here. For the sake of clear description, it is referred to as an electronic device below.
[0062] like Figure 1 As shown, a data processing method includes:
[0063] S101, in response to a conversion condition setting operation of a user on an interactive interface, obtaining a conversion condition set by the user on the interactive interface for data of a functional module, and recording the conversion condition into configuration information of the functional module.
[0064] S102, in response to calling the first functional module, if the data to be converted by the first conversion condition is the data output by the first functional module, after obtaining the first data output by the first functional module, convert the first data according to the first conversion condition, and input the converted first data into the second functional module.
[0065] The first conversion condition is the conversion condition recorded in the configuration information of the first functional module, and the second functional module subscribes to the data output by the first functional module.
[0066] S103, in response to calling the first functional module, if the data to be converted by the first conversion condition is the data input into the first functional module, after generating the second data input into the first functional module according to the data output by the third functional module, the second data is converted according to the first conversion condition, and the converted second data is input into the first functional module.
[0067] The first functional module subscribes to data output by the third functional module.
[0068] In the solution provided by the embodiment of the present application, when it is necessary to adjust the data transmitted between modules, the user can set the corresponding conversion conditions on the interactive interface, and then the electronic device can record the conversion conditions in the configuration information of the module, and when data is transmitted between modules, the data to be transmitted between modules is automatically converted by the conversion conditions recorded in the configuration information. In this process, the user only needs to set the corresponding conversion conditions on the interactive interface to adjust the data transmitted between modules, without manually writing a new module, and without integrating the new module into the released software version and releasing an updated version of the software, thus greatly improving the flexibility of adjusting the data transmitted between modules.
[0069] The electronic device can display an interactive interface to the user through its own screen or the screen of other devices connected to it for communication. The user can select the functional module to be set from the various functional modules displayed on the interactive interface according to actual needs, and set conversion conditions for the data of the selected functional module.
[0070] by Figure 2a-2c For example, electronic devices can display Figure 2a The interactive interface shown in the figure displays a first functional module 201, a second functional module 202 and a third functional module 203, and the user can select the functional module to be set by operations such as clicking.
[0071] Assuming that the user selects the first functional module 201, the electronic device can further display the following information to the user in the above interactive interface: Figure 2b The configuration interface of the first functional module 201 shown in FIG. 1 may include an input source setting component 2011, and a user may use the input source setting component 2011 to set which module output data the first functional module 201 subscribes to. Figure 2b As shown, the configuration interface may also include an input data setting component 2012 and an output data setting component 2013. When the user needs to adjust the data input into the first functional module 201, the user may select the input data setting component 2012 by clicking or the like. When the user needs to adjust the data output by the first functional module 201, the user may select the output data setting component 2013 by clicking or the like, thereby entering the conversion condition setting interface.
[0072] Assuming that the user selects the input data setting component 2012, the electronic device can further display the following information to the user in the above interactive interface: Figure 2c In the conversion condition setting interface shown, the user can set the conversion conditions for the data of the first functional module 201 through the various buttons in the setting area 20121 in the conversion condition setting interface. In this process, the user can also view the conversion conditions set by the user through the conversion condition display window 20122. Finally, the user can save the conversion conditions set by the user for the data of the first functional module 201 through the save button 20123, and of course, the user can also cancel the setting through the cancel button 20124.
[0073] In response to the user's conversion condition setting operation on the above-mentioned interactive interface, the electronic device can obtain the conversion condition set by the user for the data of the functional module on the interactive interface, and then the electronic equipment can record the conversion condition into the configuration information of the functional module.
[0074] Taking the first functional module as an example, the following describes the manner in which the electronic device adjusts the data transmitted between the functional modules in the embodiment of the present application:
[0075] by Figure 3 The first functional module 302 shown subscribes to the data output by the third functional module 301, and the second functional module 303 subscribes to the data output by the first functional module 302 as an example. The third functional module will output data after data processing. After obtaining the data output by the third functional module, the electronic device can determine that the first functional module needs to be called to process the data output by the third functional module based on the subscription relationship between the functional modules. Correspondingly, the first functional module will also output data after data processing. After obtaining the data output by the first functional module, the electronic device can determine that the second functional module needs to be called to process the data output by the first functional module based on the subscription relationship between the functional modules.
[0076] When the electronic device determines that the first functional module needs to be called, it can first determine whether the conversion conditions are recorded in the configuration information of the first functional module. If the conversion conditions are not recorded in the configuration information, the first functional module can be directly called to process the data output by the third functional module, and the data output by the first functional module after processing can be sent to the second functional module.
[0077] If the configuration information records a conversion condition, the electronic device can further determine whether the data to be converted by the conversion condition is data output by the first functional module or data input to the first functional module.
[0078] If the data to be converted by the conversion condition is the data output by the first functional module, the electronic device can first call the first functional module so that the first functional module processes the data output by the third functional module and outputs the corresponding data after processing. Then the electronic device can convert the first data output by the first functional module obtained according to the first conversion condition recorded in the configuration information of the first functional module, and update the data output by the first functional module to the converted first data. Furthermore, because the second functional module subscribes to the data output by the first functional module, the electronic device can also input the converted first data into the second functional module.
[0079] like Figure 4 As shown, if the data to be converted by the conversion condition is the data output by the first functional module 302, then after the electronic device obtains the first data output by the first functional module 302, it can convert the first data according to the first conversion condition, that is, "first data = first conversion condition (first data)", and then input the converted first data into the second functional module 303.
[0080] If the data to be converted by the conversion condition is data input into the first functional module, the electronic device may first convert the second data generated according to the data output by the third functional module and input into the first functional module according to the first conversion condition to obtain the converted second data. The electronic device may then call the first functional module so that the first functional module processes the converted second data and outputs corresponding data after processing.
[0081] like Figure 5 As shown, if the data to be converted by the conversion condition is data input into the first functional module 302, then after the electronic device obtains the second data generated according to the data output by the third functional module 301 and input into the first functional module 302, it can convert the second data according to the first conversion condition, that is, "second data = first conversion condition (second data)", and then input the converted second data into the first functional module 302.
[0082] In the solution provided by the embodiment of the present application, when it is necessary to adjust the data transmitted between modules, the user can set the corresponding conversion conditions on the interactive interface, and then the electronic device can record the conversion conditions in the configuration information of the functional module, and when data is transmitted between modules, the data to be transmitted between modules is automatically converted by the conversion conditions recorded in the configuration information. In this process, the user only needs to set the corresponding conversion conditions on the interactive interface to adjust the data transmitted between modules, without manually writing a new module, and without integrating the new module into the released software version and releasing an updated version of the software, thus greatly improving the flexibility of adjusting the data transmitted between modules.
[0083] As an implementation of the embodiment of the present application, the second data may include: input data and / or module parameters of the first functional module.
[0084] When the first functional module subscribes to the data output by the third functional module, it may use the output data of the third functional module as its own input data, or may modify its own module parameters according to the output data of the third functional module.
[0085] For example, the third functional module is a circle search module, and the first functional module is a line search module. The first functional module uses the output data of the third functional module as its own input data, thereby further searching for lines in the circle area found by the third functional module. For another example, the third functional module is a vehicle type classification module, and the first functional module is a defect detection module. The first functional module modifies its own module parameters according to the output data of the third functional module, thereby realizing defect detection using different thresholds for different vehicle types.
[0086] Therefore, the second data input into the first functional module may be the input data of the first functional module, or may be the module parameter of the first functional module, or may include both the input data of the first functional module and the module parameter of the first functional module. In other words, the second data may include: the input data and / or the module parameter of the first functional module.
[0087] Correspondingly, such as Figure 6 As shown, when the second data includes the input data of the first functional module, the electronic device can specifically implement the following method when executing the above step S103:
[0088] After obtaining the data output by the third functional module 301, the electronic device may determine the data output by the third functional module 301 as the input data of the first functional module 302. Then the electronic device may convert the input data of the first functional module 302 according to the first conversion condition to obtain the second data, and update the input data of the first functional module 302 to the second data, that is, "input data = first conversion condition (input data)". Finally, the electronic device may call the data input interface 304 of the first functional module 302 to input the second data into the first functional module 302.
[0089] For example, the data output by the third functional module is "100", and the first conversion condition is "IN (input) = IN + 100". After obtaining the data "100" output by the third functional module, the electronic device can determine "100" as the input data of the first functional module. Then the electronic device can convert the input data "100" of the first functional module according to the first conversion condition "IN = IN + 100" to obtain the second data "200", and update the input data of the first functional module to "200". Finally, the electronic device can call the data input interface of the first functional module and input "200" into the first functional module.
[0090] Correspondingly, such as Figure 7 As shown, when the second data includes the module parameters of the first functional module, the electronic device can specifically implement the following method when executing the above step S103:
[0091] After obtaining the data output by the third functional module 301, the electronic device may determine the data output by the third functional module 301 as the module parameter of the first functional module 302. Then the electronic device may convert the module parameter of the first functional module 302 according to the first conversion condition to obtain the second data, and update the module parameter of the first functional module 302 to the second data, that is, "module parameter = first conversion condition (module parameter)". Finally, the electronic device may call the parameter configuration interface 305 of the first functional module 302 to input the second data into the first functional module 302.
[0092] For example, the third functional module is a vehicle type detection module, and the data it outputs is "vehicle type A", and the first conversion condition is "if IN=vehicle type A, then IN=90, if IN=vehicle type B, then IN=95". After obtaining the data "vehicle type A" output by the third functional module, the electronic device can determine "vehicle type A" as the input data of the first functional module. Then the electronic device can convert the input data "vehicle type A" of the first functional module according to the first conversion condition "if IN=vehicle type A, then IN=90, if IN=vehicle type B, then IN=95", obtain the second data "90", and update the input data of the first functional module to "90". Finally, the electronic device can call the parameter configuration interface of the first functional module and input "90" into the first functional module.
[0093] In the solution provided in the embodiment of the present application, the electronic device can convert the input data of the first functional module according to the first conversion condition so that the first functional module can correctly process the data output by the third functional module, and the electronic device can also convert the module parameters of the first functional module according to the first conversion condition to dynamically adjust the module parameters according to the real-time situation, so as to enhance the flexibility and adaptability of the software composed of functional modules.
[0094] As an implementation manner of an embodiment of the present application, the first conversion condition may be an expression, and the first data is converted according to the first conversion condition, and the converted first data is input into the second functional module, which may include:
[0095] The first data is operated according to the expression, and the operation result is input into the second functional module.
[0096] The above-mentioned converting the second data according to the first conversion condition and inputting the converted second data into the first functional module may include:
[0097] The second data is operated according to the expression, and the operation result is input into the first functional module.
[0098] For example, the first functional module is an ellipse search module, and the second functional module is a character recognition module. Figure 8 In the image shown, because the elliptical area 801 and the character area 802 are located in different areas of the image, after the elliptical area in the image is determined by the first functional module, the second functional module cannot perform character recognition in the elliptical area. Therefore, a first conversion condition can be set in advance for the data output by the first functional module, and the first conversion condition can include: a first expression that adds a certain value to the horizontal coordinate of the center point of the elliptical area and a second expression that adds a certain value to the vertical coordinate of the center point of the elliptical area.
[0099] After obtaining the coordinates of the center point of the elliptical area output by the first functional module, the electronic device can convert the coordinates of the center point of the elliptical area according to the first expression and the second expression, thereby offsetting the coordinates of the center point of the elliptical area to the lower right to obtain the coordinates of the center point of the character area. The electronic device can then input the coordinates of the center point of the character area into the second functional module, so that the second functional module determines the character area based on the coordinates of the center point of the character area, and performs character recognition in the character area to obtain the character recognition result of "0518".
[0100] In the solution provided in the embodiment of the present application, when it is necessary to adjust the data transmitted between modules, the user can set a corresponding expression on the interactive interface, and then when the electronic device transmits data between modules, the data to be transmitted between modules can be automatically converted through the expression.
[0101] As an implementation of the embodiment of the present application, the number of the second functional modules may be multiple, and accordingly, the step of inputting the converted first data into the second functional module may include:
[0102] The converted first data are respectively input into each second functional module.
[0103] like Fig. 9 As shown, after the electronic device converts the first data output by the first functional module 302 according to the first conversion condition, if there are multiple second functional modules 303 that subscribe to the data output by the first functional module 302, the electronic device can input the converted first data into each second functional module 303 respectively.
[0104] In the scheme provided by the embodiment of the present application, when the user wants to adjust the data transmitted between the subscription module and the subscribed module, it affects all the subscription modules, and the first conversion condition can be set on the data output by the subscribed module. In this way, after the electronic device converts the data output by the subscribed module, it can input the converted data into each subscription module respectively, so that each subscription module can obtain the converted data. Correspondingly, when the user wants to adjust the data transmitted between the subscription module and the subscribed module, it only affects a specific subscription module, and the first conversion condition can be set on the data input into the specific subscription module. In this way, the electronic device will not convert the data output by the subscribed module, but when the data is transmitted to the above-mentioned specific subscription module, it will convert the data according to the conversion condition corresponding to the specific subscription module. In this way, each subscription module can be set to receive the original data or the converted data according to the actual use requirements, and different conversion conditions can be set for different subscription modules according to the actual use requirements.
[0105] As an implementation manner of the embodiment of the present application, before converting the first data according to the first conversion condition, the method may further include:
[0106] Determine whether the data output by the first functional module currently obtained is the same as the data output by the first functional module last obtained; if different, execute the above-mentioned step of converting the first data according to the first conversion condition; if the same, input the converted first data obtained by the last conversion into the second functional module.
[0107] After the first conversion condition is added to the data output by the first functional module, the electronic device must perform data conversion each time it obtains the data output by the first functional module. Compared with the case where the first conversion condition is not added, a certain amount of time loss will occur due to the additional calculation process.
[0108] On this basis, in order to minimize time loss, the electronic device can first determine whether the data output by the first functional module currently acquired is the same as the data output by the first functional module acquired last time before converting the first data according to the first conversion condition. If they are the same, data conversion can no longer be performed this time, but the data obtained after the last conversion can be directly input to the second functional module to accelerate processing. If they are not the same, the step of converting the first data according to the first conversion condition can be executed to ensure that the data is converted.
[0109] Accordingly, before converting the second data according to the first conversion condition, the method may further include:
[0110] Determine whether the data currently generated and input into the first functional module is the same as the data generated and input into the first functional module last time; if different, execute the above-mentioned step of converting the second data according to the first conversion condition; if the same, input the converted second data obtained by the last conversion into the first functional module.
[0111] Similarly, after the first conversion condition is added to the data input into the first functional module, the electronic device must perform data conversion each time it obtains the data input into the first functional module. Compared with the case where the first conversion condition is not added, a certain amount of time loss will occur due to the addition of an additional calculation process.
[0112] On this basis, in order to minimize time loss, the electronic device can first determine whether the data currently generated and input into the first functional module is the same as the data generated and input into the first functional module last time before converting the second data according to the first conversion condition. If they are the same, data conversion can no longer be performed this time, but the data obtained after the last conversion can be directly input into the second functional module to accelerate processing. If they are not the same, the step of converting the second data according to the first conversion condition can be executed to ensure that the data is converted.
[0113] In the solution provided in the embodiment of the present application, before the electronic device converts the data according to the conversion conditions, it can first determine whether the data acquired this time is the same as the data acquired last time. If they are the same, the data obtained by the last conversion is directly output, thereby accelerating the processing and minimizing the time loss caused by the introduction of the conversion conditions.
[0114] As an implementation method of the present application, the electronic device may run software, which may include a software framework and a first functional module, a second functional module, and a third functional module added on the basis of the software framework. Among them, the blackboard module in the software framework may provide a centralized data storage area, so that different functional modules (such as the first functional module, the second functional module, and the third functional module) can share and access each other's data, that is, the output data of the third functional module can be stored in the data storage area for use by the first functional module, and the output data of the first functional module can also be stored in the data storage area for use by the second functional module.
[0115] On this basis, after obtaining the first data output by the first functional module, converting the first data according to the first conversion condition and inputting the converted first data into the second functional module may include:
[0116] When the first data output by the first functional module is detected to be newly added in the data storage area, the first data is converted according to the first conversion condition, and the converted first data is stored in the data storage area to trigger the second functional module to obtain the converted first data.
[0117] When the electronic device detects that data output by the first functional module is newly added to the data storage area, it can determine whether a conversion condition is pre-set for the data output by the first functional module. If the conversion condition is pre-set, the electronic device can convert the first data output by the first functional module according to the first conversion condition, and store the converted first data in the data storage area, so as to update the data output by the first functional module with the converted first data. After storing the converted first data, the electronic device can determine the second functional module that subscribes to the converted first data according to the subscription relationship between the modules, and then send notification information to the second functional module to trigger the second functional module to obtain the converted first data.
[0118] Similarly, after generating the second data input into the first functional module according to the data output by the third functional module, converting the second data according to the first conversion condition and inputting the converted second data into the first functional module may include:
[0119] When newly added data output by a third functional module is detected in the data storage area, second data input into the first functional module is generated based on the data output by the third functional module, the second data is converted according to the first conversion condition, and the converted second data is stored in the data storage area to trigger the first functional module to obtain the converted second data.
[0120] In the solution provided in the embodiment of the present application, when the electronic device detects new data in the data storage area and the conversion conditions are pre-set for the new data, the electronic device can convert the data according to the conversion conditions and use the converted data to update and store in the data storage area, thereby triggering the corresponding functional module to obtain the converted data for subsequent processing.
[0121] Corresponding to the above-mentioned data processing method, an embodiment of the present application further provides a data processing device. The following is an introduction to a data processing device provided in an embodiment of the present application.
[0122] like Fig.10 As shown, a data processing device comprises:
[0123] The setting unit 1010 is used to obtain the conversion condition set by the user on the interactive interface for the data of the functional module in response to the conversion condition setting operation of the user on the interactive interface, and record the conversion condition into the configuration information of the functional module.
[0124] The first data conversion unit 1020 is used to respond to the call of the first functional module. When the data to be converted by the first conversion condition is the data output by the first functional module, after obtaining the first data output by the first functional module, convert the first data according to the first conversion condition and input the converted first data into the second functional module, wherein the first conversion condition is the conversion condition recorded in the configuration information of the first functional module, and the second functional module subscribes to the data output by the first functional module.
[0125] The second data conversion unit 1030 is used to respond to the call of the first functional module. When the data to be converted by the first conversion condition is the data input into the first functional module, after generating the second data input into the first functional module according to the data output by the third functional module, the second data is converted according to the first conversion condition and the converted second data is input into the first functional module, wherein the first functional module subscribes to the data output by the third functional module.
[0126] In the solution provided by the embodiment of the present application, in response to the conversion condition setting operation of the user on the interactive interface, the conversion condition set by the user on the interactive interface for the data of the functional module is obtained, and the conversion condition is recorded in the configuration information of the functional module; in response to calling the first functional module, if the data to be converted by the first conversion condition is the data output by the first functional module, after obtaining the first data output by the first functional module, the first data is converted according to the first conversion condition, and the converted first data is input into the second functional module, wherein the first conversion condition is the conversion condition recorded in the configuration information of the first functional module, and the second functional module subscribes to the data output by the first functional module; if the data to be converted by the first conversion condition is the data input into the first functional module, after generating the second data input into the first functional module according to the data output by the third functional module, the second data is converted according to the first conversion condition, and the converted second data is input into the first functional module, wherein the first functional module subscribes to the data output by the third functional module. When it is necessary to adjust the data transmitted between modules, the user can set the corresponding conversion conditions on the interactive interface, and then the electronic device can record the conversion conditions in the configuration information of the module, and when data is transmitted between modules, the data to be transmitted between modules is automatically converted according to the conversion conditions recorded in the configuration information. In this process, the user only needs to set the corresponding conversion conditions on the interactive interface to adjust the data transmitted between modules, without manually writing a new module, and without integrating the new module into the released software version and releasing an updated version of the software, thus greatly improving the flexibility of adjusting the data transmitted between modules.
[0127] As an implementation of the embodiment of the present application, the second data may include: input data and / or module parameters of the first functional module.
[0128] The second data conversion unit 1030 may be specifically configured to determine the data output by the third functional module as input data and / or module parameters of the first functional module.
[0129] As an implementation of the embodiment of the present application, the first conversion condition may be an expression.
[0130] The first data conversion unit 1020 may be specifically configured to operate the first data according to an expression and input the operation result into the second functional module.
[0131] The second data conversion unit 1030 may be specifically configured to operate the second data according to an expression and input the operation result into the first functional module.
[0132] As an implementation of the embodiment of the present application, the number of the above-mentioned second functional modules can be multiple.
[0133] The first data conversion unit 1020 may be specifically configured to input the converted first data into each second functional module.
[0134] As an implementation of the embodiment of the present application, the above device may further include:
[0135] The first judgment unit is used to judge whether the data output by the first functional module currently obtained is the same as the data output by the first functional module last obtained; if different, trigger the first data conversion unit 1020; if the same, trigger the first data input unit.
[0136] The first data input unit is used to input the converted first data obtained by the last conversion into the second functional module.
[0137] The second judgment unit is used to judge whether the data currently generated and input into the first functional module is the same as the data generated and input into the first functional module last time; if different, trigger the second data conversion unit 1030; if the same, trigger the second data input unit.
[0138] The second data input unit is used to input the converted second data obtained by the last conversion into the first functional module.
[0139] As an implementation of an embodiment of the present application, the above-mentioned first data conversion unit 1020 can be specifically used to convert the first data according to the first conversion condition when detecting the first data output by the newly added first functional module in the data storage area, and store the converted first data in the data storage area to trigger the second functional module to obtain the converted first data.
[0140] The above-mentioned second data conversion unit 1030 can be specifically used to generate second data input into the first function module based on the data output by the third function module when detecting that data newly output by the third function module is added to the data storage area, convert the second data according to the first conversion condition, and store the converted second data in the data storage area to trigger the first function module to obtain the converted second data.
[0141] The present application also provides an electronic device, such as Fig.11 As shown, including:
[0142] The memory 1101 is used to store computer programs.
[0143] The processor 1102 is used to implement the data processing method described in any of the above embodiments when executing the program stored in the memory 1101.
[0144] In the solution provided by the embodiment of the present application, in response to the conversion condition setting operation of the user on the interactive interface, the conversion condition set by the user on the interactive interface for the data of the functional module is obtained, and the conversion condition is recorded in the configuration information of the functional module; in response to calling the first functional module, if the data to be converted by the first conversion condition is the data output by the first functional module, after obtaining the first data output by the first functional module, the first data is converted according to the first conversion condition, and the converted first data is input into the second functional module, wherein the first conversion condition is the conversion condition recorded in the configuration information of the first functional module, and the second functional module subscribes to the data output by the first functional module; if the data to be converted by the first conversion condition is the data input into the first functional module, after generating the second data input into the first functional module according to the data output by the third functional module, the second data is converted according to the first conversion condition, and the converted second data is input into the first functional module, wherein the first functional module subscribes to the data output by the third functional module. When it is necessary to adjust the data transmitted between modules, the user can set the corresponding conversion conditions on the interactive interface, and then the electronic device can record the conversion conditions in the configuration information of the module, and when data is transmitted between modules, the data to be transmitted between modules is automatically converted according to the conversion conditions recorded in the configuration information. In this process, the user only needs to set the corresponding conversion conditions on the interactive interface to adjust the data transmitted between modules, without manually writing a new module, and without integrating the new module into the released software version and releasing an updated version of the software, thus greatly improving the flexibility of adjusting the data transmitted between modules.
[0145] In addition, the electronic device may further include a communication bus and / or a communication interface, and the processor 1102, the communication interface, and the memory 1101 communicate with each other via the communication bus.
[0146] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0147] The communication interface is used for communication between the above electronic device and other devices.
[0148] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0149] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0150] In another embodiment provided in the present application, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, the steps of the data processing method described in any of the above embodiments are implemented.
[0151] In another embodiment provided in the present application, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute the data processing method described in any of the above embodiments.
[0152] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a solid-state hard disk (SSD), etc.
[0153] It should be noted that, in this article, relational terms such as first and second, etc. are only used 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 "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0154] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, electronic device, computer-readable storage medium, and computer program product embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0155] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the protection scope of the present application.
Claims
1. A data processing method, characterized in that: The method comprises: In response to a conversion condition setting operation by a user on an interactive interface, obtaining a conversion condition set by the user on the interactive interface for data of a functional module, and recording the conversion condition into configuration information of the functional module; In response to calling the first functional module, if the data to be converted by the first conversion condition is the data output by the first functional module, after obtaining the first data output by the first functional module, convert the first data according to the first conversion condition, and input the converted first data into the second functional module, wherein the first conversion condition is the conversion condition recorded in the configuration information of the first functional module, and the second functional module subscribes to the data output by the first functional module; If the data to be converted by the first conversion condition is the data input into the first functional module, after the data output by the third functional module is determined as the second data input into the first functional module, the second data is converted according to the first conversion condition, and the converted second data is input into the first functional module, wherein the first functional module subscribes to the data output by the third functional module.
2. The method according to claim 1, characterized in that: The second data includes: input data and / or module parameters of the first functional module, the input data is data to be processed by the first functional module, and the module parameters are parameters inside the first functional module for configuring a data processing method.
3. The method according to claim 1, characterized in that The first conversion condition is an expression, The converting the first data according to the first conversion condition and inputting the converted first data into the second functional module includes: Performing operation on the first data according to the expression, and inputting the operation result into the second functional module; The converting the second data according to the first conversion condition and inputting the converted second data into the first functional module includes: The second data is operated according to the expression, and the operation result is input into the first functional module.
4. The method according to claim 1, characterized in that The number of the second functional modules is multiple, and the step of inputting the converted first data into the second functional module includes: The converted first data are respectively input into each second functional module.
5. The method according to any one of claims 1 to 4, characterized in that: Before converting the first data according to the first conversion condition, the method further includes: Determine whether the data output by the first functional module currently obtained is the same as the data output by the first functional module last obtained; if they are different, perform the step of converting the first data according to the first conversion condition; if they are the same, input the converted first data obtained by the last conversion into the second functional module; and / or, Before converting the second data according to the first conversion condition, the method further includes: Determine whether the data currently determined to be input into the first functional module is the same as the data determined to be input into the first functional module last time; if different, execute the step of converting the second data according to the first conversion condition; if the same, input the converted second data obtained by the last conversion into the first functional module.
6. The method according to any one of claims 1 to 4, characterized in that: After obtaining the first data output by the first functional module, converting the first data according to the first conversion condition, and inputting the converted first data into the second functional module, comprises: When it is detected that the first data output by the first functional module is newly added in the data storage area, the first data is converted according to the first conversion condition, and the converted first data is stored in the data storage area to trigger the second functional module to obtain the converted first data; After determining the data output by the third functional module as the second data input to the first functional module, converting the second data according to the first conversion condition, and inputting the converted second data into the first functional module, comprises: When data output by a newly added third functional module is detected in the data storage area, the data output by the third functional module is determined as second data input into the first functional module, the second data is converted according to the first conversion condition, and the converted second data is stored in the data storage area to trigger the first functional module to obtain the converted second data.
7. A data processing device, characterized in that: The device comprises: A setting unit, configured to obtain, in response to a conversion condition setting operation performed by a user on an interactive interface, a conversion condition set by the user on the interactive interface for data of a functional module, and record the conversion condition in configuration information of the functional module; a first data conversion unit, configured to, in response to calling the first functional module, convert the first data output by the first functional module according to the first conversion condition after obtaining the first data output by the first functional module, and input the converted first data into the second functional module, when the data to be converted by the first conversion condition is the data output by the first functional module, wherein the first conversion condition is the conversion condition recorded in the configuration information of the first functional module, and the second functional module subscribes to the data output by the first functional module; A second data conversion unit is used to respond to calling the first functional module, when the data to be converted by the first conversion condition is the data input into the first functional module, after determining the data output by the third functional module as the second data input into the first functional module, convert the second data according to the first conversion condition and input the converted second data into the first functional module, wherein the first functional module subscribes to the data output by the third functional module.
8. The device according to claim 7, characterized in that The second data includes: input data and / or module parameters of the first functional module, the input data is data to be processed by the first functional module, and the module parameters are parameters used to configure the data processing method inside the first functional module; and / or, The first conversion condition is an expression; the first data conversion unit is specifically used to operate the first data according to the expression, and input the operation result into the second functional module; the second data conversion unit is specifically used to operate the second data according to the expression, and input the operation result into the first functional module; and / or, There are multiple second functional modules, and the first data conversion unit is specifically used to input the converted first data into each second functional module respectively; and / or, The device further comprises: a first judgment unit, used to judge whether the data currently obtained output by the first functional module is the same as the data output by the first functional module obtained last time; if they are different, the first data conversion unit is triggered; if they are the same, the first data input unit is triggered; the first data input unit is used to input the converted first data obtained by the last conversion into the second functional module; a second judgment unit, used to judge whether the data currently determined to be input into the first functional module is the same as the data determined to be input into the first functional module last time; if they are different, the second data conversion unit is triggered; if they are the same, the second data input unit is triggered; the second data input unit is used to input the converted second data obtained by the last conversion into the first functional module; and / or, The first data conversion unit is specifically used to, when detecting that first data output by the first functional module is newly added to the data storage area, convert the first data according to the first conversion condition, and store the converted first data in the data storage area, so as to trigger the second functional module to obtain the converted first data; the second data conversion unit is specifically used to, when detecting that data output by the third functional module is newly added to the data storage area, determine the data output by the third functional module as the second data input to the first functional module, convert the second data according to the first conversion condition, and store the converted second data in the data storage area, so as to trigger the first functional module to obtain the converted second data.
9. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor, for implementing any of the methods described in claims 1-6 when executing a program stored in a memory.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
11. A computer program product, characterized in that The method comprises a computer program, wherein when the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Software interface optimization display method and device, diagnosis equipment and storage medium
CN110134473A
Test case generator built into data-integration workflow editor
CN110249300A
Data processing method and device and electronic equipment
CN112559808A
Information processing apparatus, storage medium, and information processing method
CN114661259A
Operation condition radar map processing method and device
CN116069202A
