Component data changing method, device, electronic device, medium and program product
By determining the changed data in the business configuration platform and using the interface to access the data association relationship of the components, the component data change method is executed, which solves the data consistency damage caused by code property rights and technical compatibility issues and improves the efficiency and accuracy of the configuration platform.
Patent Information
- Application Number
- CN202411239152.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-05
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2044-09-05
AI Technical Summary
In the existing technology, due to code property rights and technical compatibility issues, components that cannot publish component source code cannot change data by modifying the source code, which destroys the data consistency between multiple components in the business configuration platform.
By determining the changed data in the target page, if the component is an interface access component, the data to be modified is determined based on the data association relationship, and the component data change method is obtained, and the change method is executed in the interface access component to ensure data consistency.
It solves the problem of being unable to modify component data, ensures data consistency between components in the business configuration platform, and improves configuration efficiency and data accuracy.
Smart Images

Figure CN119127276B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a component data modification method, device, electronic device, medium, and program product. Background Art
[0002] With the development of business digitalization, when configuring a company's business, the business configuration platform used to configure the business may integrate multiple components from different manufacturers and different technology stacks. This results in the presence of multiple components from different sources on the business configuration platform page. Within the business configuration platform page, the consistency of the same data must be ensured between multiple different components. For example, the data of component A and component B both include a set year, and the set year is 2023. If the set year of component A is changed to 2024, the set year of component B must be changed accordingly.
[0003] In the prior art, when data of other components needs to be changed according to data changes of one component, the source code of other components in the business configuration platform is directly modified to modify the data that needs to be changed in other components.
[0004] However, for some components whose source code cannot be released due to issues such as code ownership and technical compatibility, the data in the component cannot be changed by modifying the source code, thereby destroying the data consistency between multiple components on the business configuration platform page. Summary of the Invention
[0005] The present application provides a component data change method, device, electronic device, medium and program product to solve the problem in the prior art that for some components whose source code cannot be released due to code ownership, technical compatibility and other issues, the data in the component cannot be changed by modifying the source code, thereby destroying the data consistency between multiple components on the page of the business configuration platform.
[0006] In a first aspect, the present application provides a method for changing component data, the method comprising:
[0007] Determine the changed data in the target page; wherein the changed data is the data that has been changed in the change component;
[0008] If the change component is an interface access component, determining, based on the data association relationship corresponding to the change data, first data to be modified in the first target component corresponding to the change data; wherein the first target component is an interface access component, and the first target component is a component in the target page, and the interface access component is a component configured on the target page by calling a component interface;
[0009] Obtaining a component data change method of the changed component; wherein the component data change method includes the changed data;
[0010] The component data changing method is executed in the first target component to change the first data to be modified according to the changed data.
[0011] In a second aspect, the present application provides a component data modification device, the device comprising:
[0012] A first determining module is used to determine the changed data in the target page; wherein the changed data is the data that has been changed in the change component;
[0013] a second determining module configured to determine, if the changed component is an interface access component, first data to be modified in a first target component corresponding to the changed data based on a data association relationship corresponding to the changed data; wherein the first target component is an interface access component, and the first target component is a component in the target page, and the interface access component is a component configured on the target page by calling a component interface;
[0014] An acquisition module, configured to acquire a component data change method of the changed component; wherein the component data change method includes the changed data;
[0015] An execution module is used to execute the component data changing method in the first target component to change the first data to be modified according to the changed data.
[0016] In a third aspect, the present application provides an electronic device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein when the processor executes the program, the component data changing method as described in any embodiment of the present application is implemented.
[0017] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the component data changing method as described in any embodiment of the present application.
[0018] In a fifth aspect, the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the component data change method as described in any embodiment of the present application.
[0019] The solution of the present application determines the changed data in the target page; wherein the changed data is the data that has completed the change in the change component; if the change component is an interface access component, then according to the data association relationship corresponding to the change data, the first data to be modified corresponding to the changed data in the first target component is determined; wherein the first target component is an interface access component, and the first target component is a component in the target page, and the interface access component is a component configured on the target page by calling the component interface; obtains the component data change method of the change component; wherein the component data change method includes the changed data; executes the component data change method in the first target component to change the first data to be modified according to the changed data. That is, the solution of the present application, when the change component is an interface access component, according to the component data change method of the change component, changes the data of the first target component corresponding to the changed data of the change component, so as to solve the problem that the component that cannot publish the component source code cannot modify the component data, thereby ensuring the data consistency between multiple components in the page of the business configuration platform, thereby improving the configuration efficiency and data accuracy of the business configuration platform. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solution of the present application, the following is a brief introduction to the drawings required for use in the embodiments. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without paying any creative work.
[0021] Figure 1 This is a flowchart of the component data modification method provided by this application;
[0022] Figure 2a This is another flowchart of the component data modification method provided by this application;
[0023] Figure 2b This is an example diagram of component properties of the component data change method provided by this application;
[0024] Figure 2c This is an example diagram of the distribution of components on a page in the component data change method provided by this application;
[0025] Figure 2d This is an example diagram of a data association relationship of the component data change method provided by this application;
[0026] Figure 2e This is an example diagram of the data association relationship between components in the component data change method provided by this application;
[0027] Figure 2fThis is an example diagram of the data association relationship between a component and its subcomponents in the component data change method provided by this application;
[0028] Figure 3 This is a structural diagram of the component data changing device provided by this application;
[0029] Figure 4 It is a structural diagram of the electronic device provided by this application. DETAILED DESCRIPTION
[0030] In order to enable those skilled in the art to better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of this application.
[0031] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in a sequence other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0032] Figure 1 This is a flow chart of the component data change method provided by the present application. The method can be executed by a component data change device, which can be implemented in software and / or hardware. In a specific embodiment, the device can be applied to an electronic device, which can be a computer. The following embodiments will be described using the device applied to an electronic device as an example, with reference to Figure 1 , the method may specifically include the following steps:
[0033] Step 101: Determine the changed data in the target page.
[0034] The changed data refers to the data that has been changed in the changed component.
[0035] Specifically, the changed component is a component whose data has changed. The target page is a page that integrates multiple components, and the components in the target page include interface access components and source code access components. Among them, the interface access component is a component that cannot publish the component source code due to issues such as code ownership and technical compatibility, and can only be configured on the target page by calling the component interface. For example, the interface access component is a component configured on the target page by accessing the uniform resource locator (URL) of the component. The URL can be the component address configured when the component is configured. The source code access component is a component configured on the target page by introducing the component source code. For example, by editing the source code of the component, the component name, component configuration address, component editing address, component linkage input parameters and other parameters of the component are determined, and then the component is configured on the page through the component configuration address.
[0036] Figure 2b This is an example diagram of a component attribute of the component data change method provided by this application, such as Figure 2b As shown, when determining a component, it is necessary to determine the component name, component configuration address, component editing address, component access type, monitoring method, and component linkage input parameters of the component. Among them, the component name is the identification information of the component. The component configuration address is the address information when the page obtains the component when the component is configured in the page. The component editing address is the address for editing the properties and other contents of the component. The component access type includes two types: source code access and interface access. The monitoring method is the method of monitoring the component. The component linkage input parameters are parameters in the component that have an association relationship with the parameters of other components. Each data of each component in the target page has corresponding data identification information. The change of the data corresponding to the data identification information can be obtained to determine the changed data in the target page. For example, the electronic device executing this embodiment obtains the data corresponding to the data identification information once every preset time interval, and determines the changed data according to the change situation.
[0037] Exemplarily, the structures of four components in the target page are described in JavaScript (JS) as: {input_1718184770200:", datePicker_1718184770200:", bi_1718184770200:", distribution_1718184770200:"}, where the data identification information corresponding to the data of the four components is input_1718184770200, datePicker_1718184770200, bi_1718184770200, and distribution_1718184770200 respectively, and the data of the four components is empty. After the data of the components in the target page changes, the code becomes {input_1718184770200:'张三', datePicker_1718184770200:", bi_1718184770200:", distribution_1718184770200:"}. At this time, the data corresponding to input_1718184770200 changes, and it can be determined that the changed data is 张三 (Zhang San).
[0038] Exemplarily, the target page includes some components that can publish source code and some components that cannot publish component source code, such as business operation components and Business Intelligence (BI) components, etc. Among them, the components that can publish source code and the source code access components are configured in the target page by editing the source code. The components that cannot publish component source code, that is, the interface access components, are configured in the target page through the unbounded micro front-end framework. Thus, multiple components can be on the same page. The configuration of the source code access components requires component configuration addresses, component editing addresses, and component interaction parameter inputs, etc. Writing the source code access components in the form of individual component granularity can configure the source code access components in the target page, and the component configuration addresses of each component are different. For example, there are two source code access components, namely the indicator distribution component and the dimension component. The component configuration address corresponding to the indicator distribution component is / indicator / distribution, and the component configuration address corresponding to the dimension component is / dimension. When accessing / dimension, only the content of the dimension component can be obtained.
[0039] Figure 2c It is a page component distribution example diagram of the component data change method provided by this application. As Figure 2cAs shown, in the page canvas, the search box component, calendar component, and application opinion component are all source code access components, while the BI application component and indicator distribution component are all interface access components. The search box component, calendar component, and application opinion component are configured on the target page by configuring the component source code. The BI application component and indicator distribution component access the component configuration address through the boundless micro-frontend framework, thereby configuring the components on the target page. The process of accessing the component configuration address corresponding to the BI application component through the boundless micro-frontend framework is wujie: / bi1, and the process of accessing the component configuration address corresponding to the indicator distribution component through the boundless micro-frontend framework is wujie:indicator / distribution.
[0040] Optionally, after determining the changed data in the target page, steps 11 and 12 may be performed.
[0041] Step 11: If the changed component is a source code access component, determine the second data to be modified corresponding to the changed data in the second target component according to the data association relationship corresponding to the changed data.
[0042] Among them, the second target component is a source code access component, the source code access component is a component configured on the target page by introducing component source code, and the second target component is a component in the target page.
[0043] Specifically, the target page is pre-set with associations between the data of multiple components on the page. For example, if the data of component A and the data of component B represent the same information, an association is pre-set between the data of component A and the data of component B. For example, the data of component A and component B both include a set year, and the association between the data of component A and component B can be that the data of component A and component B should be consistent, or that the data of component A is greater than the data of component B and the difference is a preset value. If the changed component is a source code access component, then based on the data association corresponding to the changed data, the second data to be modified corresponding to the changed data in the second target component, which is also a source code access component, is determined.
[0044] For example, component A and component B are both source code access components, the data of component A is changed data, and the data association relationship corresponding to the data of component A is that the data of component A and the data of component B should be consistent. Therefore, the second data to be modified corresponding to the changed data in the second target component is determined to be the data of component B.
[0045] For example, data associations can be represented by a data interaction configuration array (LinkageMapping), which stores the identification information of associated components and the data corresponding to the components. Furthermore, the data interaction configuration array can be stored in a schema. A schema is a structure described in a database formal language, a collection of objects that can describe data structures, types, relationships, and component properties and configuration options. Storing the data interaction configuration array in a schema facilitates data access.
[0046] For example, Figure 2d This is an example diagram of a data association relationship for the component data change method provided in this application. The data association relationship corresponding to the search box component's data is that the name of the search box component's data should be consistent with that of the distribution component. The data association relationship corresponding to the calendar component's data is that the year of the calendar component's data should be consistent with that of the application opinion component, and the year of the calendar component's data should be consistent with that of the distribution component's index.
[0047] Optionally, the changed data includes a plurality of changed sub-data, and according to the data association relationship corresponding to the changed data, determining the second data to be modified corresponding to the changed data in the second target component can be achieved through step 1101.
[0048] Step 1101 : Determine the sub-data to be modified in the second target component corresponding to each changed sub-data according to the data association relationship corresponding to the changed data.
[0049] The component corresponding to the sub-data to be modified is a hidden sub-component in the second target component.
[0050] Specifically, the change data includes multiple change sub-data, and the multiple change sub-data are all data in the change component. When the change data includes multiple change sub-data, the data association relationship corresponding to the change data includes the sub-data association relationship corresponding to each change sub-data. According to the sub-data association relationship corresponding to each change sub-data, the sub-data to be modified in the second target component corresponding to each change sub-data is determined. Alternatively, the sub-data association relationship indicates the hidden sub-component corresponding to the sub-data, that is, the sub-data to be modified in the second target component corresponding to each change sub-data can be determined by determining the hidden sub-component corresponding to each change sub-data, and then the data corresponding to the hidden sub-component is used as the sub-data to be modified. The second target component includes multiple hidden sub-components, and the hidden sub-component is the sub-component that is not displayed in the target page. Each sub-data to be modified corresponds to a hidden sub-component, which facilitates the determination of the sub-data to be modified through the hidden sub-component.
[0051] Exemplarily, the second target component includes two hidden subcomponents, identified as input_1 and input_2. The subdata corresponding to input_1 is the region, and the subdata corresponding to input_2 is the level. The change data includes two change subdata, namely the region and the level. Based on the data association relationship corresponding to the change data, the subdata to be modified in the second target component corresponding to the change subdata region is determined to be the subdata corresponding to input_1, and the subdata to be modified in the second target component corresponding to the change subdata level is determined to be the subdata corresponding to input_2.
[0052] For example, the setting of hidden subcomponents through JS is shown in the following code: compA:{fieId:'comp_A',linkageMapping:[],propsField:{area:'input_1',grade:'input_2'}},input_1:{fieId:'input_1',linkageMapping:[{fieId:'bi',props:'areaCode'}],hidden:true},input_2:{fieId:'input_2',linkageMapping:[{fieId:'bi',props:'level'}],hidden:true}}. The change data of the component with component identification comp_A includes the area code and grade level. The corresponding subcomponents in the association relationship are the hidden subcomponents input_1 and input_2 in the second target component with component identification bi. And the association relationship is configured in the configuration information of the hidden subcomponent in the association relationship linkageMapping of the second target component. Use hidden:true to hide the subcomponent so that it does not appear on the page.
[0053] Step 12: Modify the source code of the second target component according to the changed data to achieve the change of the second data to be modified.
[0054] Specifically, the second data to be modified is the value of the variable corresponding to the second target component. For example, the second data to be modified corresponding to the second target component is the year. After determining the second data to be modified in the second target component that corresponds to the change data, the source code of the second target component is modified based on the change data. Specifically, the portion of the source code in the second target component corresponding to the second data to be modified is modified to achieve the change of the second data to be modified.
[0055] Exemplarily, after determining the second data to be modified corresponding to the change data in the second target component, the change data is transmitted to the second target component by the software development kit (SDK), and part of the source code corresponding to the second data to be modified in the second target component is modified according to the change data. For example, the value corresponding to the second target component can be modified to change the second data to be modified.
[0056] Optionally, after executing step 1101 , modifying the source code of the second target component according to the change data may be achieved through step 1201 .
[0057] Step 1201: Modify the source code of the hidden sub-component corresponding to the changed sub-data in the second target component according to each changed sub-data.
[0058] Specifically, after determining the sub-data to be modified in the second target component corresponding to each changed sub-data, the source code of the hidden sub-component corresponding to the changed sub-data in the second target component is modified according to each changed sub-data to achieve the change of the sub-data to be modified.
[0059] Exemplarily, the change data includes two change sub-data: region and level. The sub-data to be modified in the second target component corresponding to the change sub-data region is the sub-data corresponding to input_1, and the sub-data to be modified in the second target component corresponding to the change sub-data level is the sub-data corresponding to input_2. The two change sub-data are transparently transmitted to the second target component by the SDK. The component source code corresponding to input_1 and input_2 is modified based on the values of the two change sub-data, thereby changing the sub-data corresponding to input_1 and input_2.
[0060] Step 102: If the changed component is an interface access component, first data to be modified corresponding to the changed data in the first target component is determined according to the data association relationship corresponding to the changed data.
[0061] Among them, the first target component is an interface access component, and the first target component is a component in the target page. The interface access component is a component configured on the target page by calling a component interface.
[0062] Specifically, the first data to be modified is the value of a variable corresponding to the first target component. For example, the first data to be modified corresponding to the first target component is a user identifier. If the modified component is an interface access component, then based on the data association relationship corresponding to the modified data, the first data to be modified corresponding to the modified data is determined in the first target component, which is also an interface access component.
[0063] For example, component C and component D are both interface access components, the data of component C is change data, and the data association relationship corresponding to the data of component C is that the data of component C and the data of component D should be consistent. Therefore, the first data to be modified corresponding to the change data in the first target component is determined to be the data of component D.
[0064] Step 103: Obtain the component data changing method of the changed component.
[0065] The component data changing method includes changing data.
[0066] Specifically, a component data change method is a method for modifying the change data corresponding to the modified component. For example, the modified component executes a data change function internally, causing the change data to change, and the component data change method includes the change data. The data corresponding to the modified component is modified using the component data change method. Since the modified component is an interface access component, the component data change method cannot be directly read. Therefore, the component data change method is obtained by receiving the component data change method sent by the modified component to the electronic device executing this embodiment.
[0067] For example, the data corresponding to the changed component is changed by executing the component data change method. For example, the component data change method named linkage is <script>function linkage(item){const{key,value}=item;}< / script> sdk sdk.getItem().linkage({key:'year',value:'2023'}). This code shows the processing of the component variable key and value value, as well as the execution of the component data change method. The key is the change data, and the value is the value of the change data. For example, when the change data is the year, and the value corresponding to the year is 2023, the key is the year, and the value is 2023. The component data change method for obtaining the changed component is a component data change method named linkage, which is sent by the SDK to the electronic device that executes this embodiment.
[0068] Step 104 : executing a component data changing method in the first target component to change the first data to be modified according to the changed data.
[0069] Specifically, since the first target component is an interface access component, its source code cannot be modified. Therefore, after obtaining the component data modification method of the modified component, the component data modification method is executed in the first target component, allowing the first target component to complete the modification of the data corresponding to the component data modification method, thereby modifying the first data to be modified.
[0070] Exemplarily, the component data change method of the modified component is a component data change method named linkage. The linkage method is transparently transmitted to the first target component via the SDK, for example, by sending a callback function including the linkage method to the first target component. The first target component executes the callback function, which causes the linkage method to be executed in the first target component, so that the first data to be modified is changed to be consistent with the changed data.
[0071] For example, Figure 2e This is an example diagram of the data association relationship between components in the component data change method provided by this application. Figure 2e Component A is identified by fileId:comp_A_, the BI component is identified by fileld:BI, and the data associated with component A is the BI component's region code. When the changed data in component A is the region code, the SDK retrieves the corresponding relationship for component A's region code, confirms that the data associated with component A's region code is the BI component's region code, and transparently transmits the component data change method named linkage to the BI component, causing the BI component's region code to change accordingly.
[0072] For example, Figure 2f This is an example diagram of the data association relationship between a component and a subcomponent of the component data change method provided by this application. Figure 2f The identifier of component A shown is fileId:comp_A_, and the changed data of component A are the region code and level of component A. The region code of component A is associated with the region code of component 1, and the identifier of component 1 is fileId:input_1. The level of component A is associated with the level of component 2, and the identifier of component 2 is fileId:input_2. When the changed data of component A is the region code of component A, the value of the region code corresponding to the component of fileId:input_1 is modified by using the component data change method transmitted through the SDK. When the changed data of component A is the level of component A, the value of the region code corresponding to the component of fileId:input_2 is modified by using the component data change method transmitted through the SDK. For example, when you need to change the province area code 440000 to the city area code 440100 on the target page, after the component corresponding to comp_A_ changes the area code to 440100, the component with fieId input_1 associated with the area code is obtained. Then, the area code value of the input_1 component is modified to 440100 through the component data change method.
[0073] The solution of the present application determines the changed data in the target page; wherein the changed data is the data that has completed the change in the change component; if the change component is an interface access component, then according to the data association relationship corresponding to the change data, the first data to be modified corresponding to the changed data in the first target component is determined; wherein the first target component is an interface access component, and the first target component is a component in the target page, and the interface access component is a component configured on the target page by calling the component interface; obtains the component data change method of the change component; wherein the component data change method includes the changed data; executes the component data change method in the first target component to change the first data to be modified according to the changed data. That is, the solution of the present application, when the change component is an interface access component, according to the component data change method of the change component, changes the data of the first target component corresponding to the changed data of the change component, so as to solve the problem that the component that cannot publish the component source code cannot modify the component data, thereby ensuring the data consistency between multiple components in the page of the business configuration platform, thereby improving the configuration efficiency and data accuracy of the business configuration platform.
[0074] Figure 2a This is another flowchart of the component data change method provided by this application. Figure 1 Based on the embodiment shown and various optional implementation schemes, the steps of determining the changed data in the target page are described in detail. Figure 2a As shown, the method may include the following steps:
[0075] Step 201: Monitor the interface access component in the target page according to the monitoring method corresponding to the interface access component to obtain a first monitoring result.
[0076] Specifically, monitoring a component means monitoring events occurring on the component, such as obtaining information about changes in the component's internal state when the component's internal state changes. The monitoring method corresponding to the interface access component is a method for monitoring the interface of the interface access component. For example, the monitoring method corresponding to the interface access component may be monitoring changes in data corresponding to the interface access component. According to the monitoring method corresponding to the interface access component, the interface access component in the target page is monitored to obtain a first monitoring result. For example, the first monitoring result includes changes in the data of the interface access component.
[0077] Optionally, according to the monitoring method corresponding to the interface access component, monitoring the interface access component in the target page can be implemented through step 2011.
[0078] Step 2011: monitor the identification information of the interface access component in the target page according to the monitoring method corresponding to the interface access component.
[0079] Specifically, the identification information of the interface access component includes the identification information of the interface corresponding to the interface access component and the identification information of the target page configured by the interface access component. According to the monitoring method corresponding to the interface access component, the identification information of the interface access component in the target page is monitored to obtain changes in the interface access component.
[0080] Exemplarily, monitoring the identification information of the interface access component in the target page is monitoring the URL parameter of the interface access component. When the URL parameter changes, the change of the URL is used as the first monitoring result.
[0081] Optionally, the identification information of the interface access component is encrypted information, and the monitoring method corresponding to the interface access component includes a historical event information monitoring method, which is used to monitor historical event information of the interface access component. Monitoring the identification information of the interface access component in the target page can be achieved through step 2012 according to the monitoring method corresponding to the interface access component.
[0082] Step 2012: Monitor the identification information of the interface access component in the target page through the historical event information monitoring method.
[0083] Specifically, when the identification information of the interface access component is encrypted information, the identification information of the interface access component cannot be directly monitored. At this time, the monitoring method corresponding to the interface access component includes a historical event information monitoring method, and the historical event information monitoring method is used to monitor the historical event information of the interface access component. The historical event information of the interface access component is the event information obtained by copying the event information of the interface access component, that is, all events that occur in the interface access component correspond to historical events. Therefore, when the identification information of the interface access component changes, the event in which the identification information changes corresponds to a historical event. By monitoring the historical event information of the interface access component in the target page, it is achieved that the identification information of the interface access component in the target page is monitored.
[0084] Exemplarily, by copying and constructing the history.replaceState function, history.pushState function, history.back function and history.go function of the interface access component, the generation of historical event information is completed, and the identification information of the interface access component in the target page is monitored by monitoring the historical event information.
[0085] Optionally, after obtaining the first monitoring result, step 2013 to step 2014 may also be performed.
[0086] Step 2013: If the first monitoring result includes component configuration change information, then determine the associated components in the target page according to the component configuration change information.
[0087] The associated component is the component whose configuration information is to be changed.
[0088] Specifically, the first monitoring result is the monitoring result obtained after monitoring the interface access component. Therefore, when the first monitoring result includes component configuration change information, the associated components determined are all interface access components. The associated components are components whose component configuration information is to be changed. When the first monitoring result includes component configuration change information, the configuration information corresponding to the associated components is the configuration information before the change, so the configuration information of the associated components needs to be changed. If the first monitoring result includes component configuration change information, the components in the target page whose configuration information needs to be changed are determined based on the component configuration change information, that is, the associated components.
[0089] Exemplarily, the first monitoring result is that a URL address has changed, and based on the component corresponding to the URL address before the change, it is determined that the associated component in the target page is component C.
[0090] Step 2014: Change the component configuration information of the associated component according to the component configuration change information.
[0091] Specifically, according to the changed content of the component configuration in the component configuration change information, the component configuration information of the associated component is changed.
[0092] Illustratively, the first monitoring result is that the URL parameter changes from 440000 to 440100, the determined component identifier of the associated component is bi?area, and changing the component configuration information of the associated component according to the component configuration change information is to modify / bi?area=440000 to / bi?area=440100.
[0093] Step 202: Monitor the source code access component in the target page according to the monitoring method corresponding to the source code access component to obtain a second monitoring result.
[0094] Specifically, the monitoring method corresponding to the source code access component is a method for monitoring the source code of the source code access component. For example, the monitoring method corresponding to the source code access component can be monitoring changes in the data corresponding to the source code access component. According to the monitoring method corresponding to the source code access component, the source code access component in the target page is monitored to obtain a second monitoring result. For example, the second monitoring result includes changes in the data of the source code access component.
[0095] Optionally, according to the monitoring method corresponding to the source code access component, monitoring the source code access component in the target page can be implemented through step 2021.
[0096] Step 2021: monitor the variable data in the source code access component in the target page according to the monitoring method corresponding to the source code access component.
[0097] Specifically, since the source code corresponding to the source code access component can be obtained, the values corresponding to the variables in the component source code can be directly monitored. According to the monitoring method corresponding to the source code access component, the source code corresponding to the variable data in the source code access component on the target page can be monitored to achieve the monitoring of the variable data in the source code access component on the target page.
[0098] Step 203: If the first monitoring result and / or the second monitoring result includes data change information, determine the changed data according to the data change information.
[0099] Specifically, if the first monitoring result and / or the second monitoring result includes data change information, it is determined that the data corresponding to the component has changed, that is, it is determined that the data between the pages needs to interact. Interaction is the process in which other related data on the page needs to be changed accordingly. At this time, the changed data is determined based on the data change information.
[0100] Illustratively, if the second monitoring result is that the value has changed, the changed value is the changed data.
[0101] Step 204: If the changed component is an interface access component, first data to be modified corresponding to the changed data in the first target component is determined according to the data association relationship corresponding to the changed data.
[0102] Step 205: Obtain the component data changing method of the changed component.
[0103] Step 206 : executing the component data changing method in the first target component to change the first data to be modified according to the changed data.
[0104] The solution of the present application monitors the interface access component and the source code access component separately, obtains the change data in the target page based on the monitoring results, and improves the efficiency and accuracy of determining the change data. The identification information of the interface access component in the target page is monitored, and the variable data in the source code access component is monitored, which refines the monitoring content and further improves the efficiency and accuracy of determining the change data. Through the historical event information monitoring method, the encrypted identification information of the interface access component in the target page is monitored, which can effectively obtain the changes in the encrypted identification information, thereby improving the accuracy of the monitored identification information.
[0105] Figure 3This is a structural diagram of a component data changing device provided by this application, which is suitable for executing the component data changing method provided by this application. Figure 3 As shown, the device may specifically include:
[0106] The first determining module 301 is used to determine the changed data in the target page; wherein the changed data is the data that has been changed in the change component;
[0107] The second determining module 302 is configured to determine, if the changed component is an interface access component, first data to be modified in a first target component corresponding to the changed data based on a data association relationship corresponding to the changed data; wherein the first target component is an interface access component, and the first target component is a component in the target page, and the interface access component is a component configured on the target page by calling a component interface;
[0108] An acquisition module 303 is configured to acquire a component data change method of the changed component; wherein the component data change method includes the changed data;
[0109] The execution module 304 is configured to execute the component data changing method in the first target component to change the first data to be modified according to the changed data.
[0110] In one embodiment, the second determination module 302 is further used to: after the first determination module 301 determines the changed data in the target page, if the changed component is a source code access component, then according to the data association relationship corresponding to the changed data, determine the second data to be modified in the second target component corresponding to the changed data; wherein, the second target component is a source code access component, the source code access component is a component configured on the target page by introducing component source code, and the second target component is a component in the target page; according to the changed data, modify the source code of the second target component to achieve the change of the second data to be modified.
[0111] In one embodiment, the change data includes multiple change sub-data, and the second determination module 302 is specifically used to determine the second data to be modified corresponding to the change data in the second target component according to the data association relationship corresponding to the change data: determine the sub-data to be modified in the second target component corresponding to each change sub-data according to the data association relationship corresponding to the change data; wherein the component corresponding to the sub-data to be modified is a hidden sub-component in the second target component; the second determination module 302 is specifically used to modify the source code of the second target component according to the change data: modify the source code of the hidden sub-component corresponding to the change sub-data in the second target component according to each change sub-data.
[0112] In one embodiment, the first determination module 301 is specifically used to: monitor the interface access component in the target page according to the monitoring method corresponding to the interface access component to obtain a first monitoring result; monitor the source code access component in the target page according to the monitoring method corresponding to the source code access component to obtain a second monitoring result; if the first monitoring result and / or the second monitoring result include data change information, determine the changed data according to the data change information.
[0113] In one embodiment, the first determination module 301, in terms of monitoring the interface access component in the target page according to the monitoring method corresponding to the interface access component, is specifically used to: monitor the identification information of the interface access component in the target page according to the monitoring method corresponding to the interface access component; the first determination module 301, in terms of monitoring the source code access component in the target page according to the monitoring method corresponding to the source code access component, is specifically used to: monitor the variable data in the source code access component in the target page according to the monitoring method corresponding to the source code access component.
[0114] In one embodiment, the identification information of the interface access component is encrypted information, and the monitoring method corresponding to the interface access component includes a historical event information monitoring method, which is used to monitor the historical event information of the interface access component; the first determination module 301 is specifically used to monitor the identification information of the interface access component in the target page according to the monitoring method corresponding to the interface access component: monitor the identification information of the interface access component in the target page through the historical event information monitoring method.
[0115] In one embodiment, the device also includes: a component determination module, which is used to determine the associated components in the target page according to the component configuration change information after the first determination module 301 obtains the first monitoring result, if the first monitoring result includes component configuration change information; wherein the associated component is the component whose component configuration information is to be changed; and a change module, which is used to change the component configuration information of the associated component according to the component configuration change information.
[0116] The device of the present application determines the changed data in the target page; wherein the changed data is the data that has completed the change in the change component; if the change component is an interface access component, then according to the data association relationship corresponding to the change data, the first data to be modified corresponding to the changed data in the first target component is determined; wherein the first target component is an interface access component, and the first target component is a component in the target page, and the interface access component is a component configured on the target page by calling the component interface; obtains the component data change method of the change component; wherein the component data change method includes the change data; executes the component data change method in the first target component to change the first data to be modified according to the change data. That is, the solution of the present application, when the change component is an interface access component, according to the component data change method of the change component, changes the data of the first target component corresponding to the change data of the change component, so as to solve the problem that the component that cannot publish the component source code cannot modify the component data, thereby ensuring the data consistency between multiple components in the page of the business configuration platform, thereby improving the configuration efficiency and data accuracy of the business configuration platform.
[0117] The present application also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the component data changing method provided in any of the above embodiments is implemented.
[0118] The present application also provides a computer-readable medium having a computer program stored thereon, which, when executed by a processor, implements the component data changing method provided in any of the above embodiments.
[0119] Reference below Figure 4 , which shows a structural diagram of an electronic device 400 suitable for implementing the present application. Figure 4 The electronic device shown is only an example and should not bring any limitation to the function and scope of use of the present application.
[0120] like Figure 4 As shown, the electronic device 400 includes a central processing unit (CPU) 401, which can perform various appropriate actions and processes according to the program stored in the read-only memory (ROM) 402 or the program loaded from the storage part 408 into the random access memory (RAM) 403. Various programs and data required for the operation of the electronic device 400 are also stored in the RAM 403. The CPU 401, ROM 402 and RAM 403 are connected to each other via a bus 404. An input / output (I / O) interface 405 is also connected to the bus 404.
[0121] The following components are connected to the I / O interface 405: an input section 406 including a keyboard, a mouse, and the like; an output section 407 including devices such as a cathode ray tube (CRT), a liquid crystal display (LCD), and a speaker; a storage section 408 including a hard disk; and a communication section 409 including a network interface card such as a LAN card or a modem. The communication section 409 performs communication processing via a network such as the Internet. A drive 410 is also connected to the I / O interface 405 as needed. Removable media 411, such as a magnetic disk, an optical disk, a magneto-optical disk, or a semiconductor memory, is installed in the drive 410 as needed, so that computer programs read therefrom can be installed into the storage section 408 as needed.
[0122] In particular, according to the embodiments disclosed in the present application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, the embodiments disclosed in the present application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program comprising program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network via the communication section 409, and / or installed from a removable medium 411. When the computer program is executed by the central processing unit (CPU) 401, the above-mentioned functions defined in the system of the present application are executed.
[0123] It should be noted that the computer-readable medium shown in this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any combination of the above. More specific examples of computer-readable storage media can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this application, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or device. In this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. This propagated data signal can take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. Program code embodied on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wireline, optical fiber cable, RF, or any suitable combination thereof.
[0124] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present application. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the above-mentioned module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flowchart, and the combination of the boxes in the block diagram or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0125] The modules and / or units described in this application may be implemented in software or hardware. The modules and / or units described may also be provided in a processor. For example, a processor may be described as comprising a first determination module, a second determination module, an acquisition module, and an execution module. The names of these modules do not, in some cases, limit the modules themselves.
[0126] As another aspect, the present application further provides a computer-readable medium, which may be included in the device described in the above embodiments; or may exist independently without being incorporated into the device. The computer-readable medium carries one or more programs, and when the one or more programs are executed by a device, the device performs the following operations:
[0127] Determine the changed data in the target page; wherein the changed data is the data in the changed component that has completed the change; if the changed component is an interface access component, then determine the first data to be modified corresponding to the changed data in the first target component based on the data association relationship corresponding to the change data; wherein the first target component is an interface access component, and the first target component is a component in the target page, and the interface access component is a component configured on the target page by calling the component interface; obtain the component data change method of the changed component; wherein the component data change method includes the changed data; execute the component data change method in the first target component to change the first data to be modified according to the changed data.
[0128] According to the technical solution of the present application, the changed data in the target page is determined; wherein, the changed data is the data that has completed the change in the change component; if the change component is an interface access component, then according to the data association relationship corresponding to the change data, the first data to be modified corresponding to the changed data in the first target component is determined; wherein, the first target component is an interface access component, and the first target component is a component in the target page, and the interface access component is a component configured on the target page by calling the component interface; the component data change method of the change component is obtained; wherein, the component data change method includes the changed data; the component data change method is executed in the first target component to change the first data to be modified according to the changed data. That is, the solution of the present application, when the change component is an interface access component, according to the component data change method of the change component, the data of the first target component corresponding to the changed data of the change component is changed, so as to solve the problem that the component that cannot publish the component source code cannot modify the component data, thereby ensuring the data consistency between multiple components in the page of the business configuration platform, thereby improving the configuration efficiency and data accuracy of the business configuration platform.
[0129] An embodiment of the present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the component data changing method provided in any embodiment of the present application.
[0130] The computer program product, during implementation, may be written in one or more programming languages or a combination thereof, for performing the operations of the present application, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0131] It should be understood that the various forms of the processes shown above can be used to reorder, add, or delete steps. For example, the steps described in this application can be performed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution of this application can be achieved. This is not limited herein.
[0132] The above specific embodiments do not constitute a limitation on the scope of protection of this application. Those skilled in the art will appreciate that various modifications, combinations, sub-combinations, and substitutions may occur depending on design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application shall be included within the scope of protection of this application.
Claims
1. A component data changing method, characterized in that: The method comprises: Determine the changed data in the target page; wherein the changed data is the data that has been changed in the change component; If the change component is an interface access component, determining, based on the data association relationship corresponding to the change data, first data to be modified in the first target component corresponding to the change data; wherein the first target component is an interface access component, and the first target component is a component in the target page, and the interface access component is a component configured on the target page by calling a component interface; Obtaining a component data change method of the changed component; wherein the component data change method includes the changed data; executing the component data changing method in the first target component to change the first data to be modified according to the change data; After determining the changed data in the target page, the method further includes: if the changed component is a source code access component, determining second data to be modified in a second target component corresponding to the changed data based on the data association relationship corresponding to the changed data; wherein the second target component is a source code access component, the source code access component is a component configured in the target page by introducing component source code, and the second target component is a component in the target page; and according to the changed data, modifying the source code of the second target component to achieve the change of the second data to be modified; The changed data includes a plurality of changed sub-data, and determining the second data to be modified corresponding to the changed data in the second target component according to the data association relationship corresponding to the changed data includes: determining the sub-data to be modified in the second target component corresponding to each of the changed sub-data according to the data association relationship corresponding to the changed data; wherein the component corresponding to the sub-data to be modified is a hidden sub-component in the second target component; The step of modifying the source code of the second target component according to the change data includes: modifying the source code of the hidden sub-component corresponding to the change sub-data in the second target component according to each of the change sub-data.
2. The method according to claim 1, characterized in that Determining the changed data in the target page includes: Monitoring the interface access component in the target page according to the monitoring method corresponding to the interface access component to obtain a first monitoring result; monitoring the source code access component in the target page according to the monitoring method corresponding to the source code access component to obtain a second monitoring result; If the first monitoring result and / or the second monitoring result includes data change information, the changed data is determined according to the data change information.
3. The method according to claim 2, characterized in that The monitoring of the interface access component in the target page according to the monitoring method corresponding to the interface access component includes: Monitoring identification information of the interface access component in the target page according to the monitoring method corresponding to the interface access component; The monitoring of the source code access component in the target page according to the monitoring method corresponding to the source code access component includes: According to the monitoring method corresponding to the source code access component, the variable data in the source code access component in the target page is monitored.
4. The method according to claim 3, characterized in that The identification information of the interface access component is encrypted information, and the monitoring method corresponding to the interface access component includes a historical event information monitoring method, and the historical event information monitoring method is used to monitor the historical event information of the interface access component; The monitoring of the identification information of the interface access component in the target page according to the monitoring method corresponding to the interface access component includes: The identification information of the interface access component in the target page is monitored through the historical event information monitoring method.
5. The method according to claim 2, characterized in that After obtaining the first monitoring result, the method further includes: If the first monitoring result includes component configuration change information, determining the associated components in the target page according to the component configuration change information; wherein the associated components are components whose component configuration information is to be changed; The component configuration information of the associated component is changed according to the component configuration change information.
6. A component data changing device, characterized in that: The device comprises: A first determining module is used to determine the changed data in the target page; wherein the changed data is the data that has been changed in the change component; a second determining module configured to determine, if the changed component is an interface access component, first data to be modified in a first target component corresponding to the changed data based on a data association relationship corresponding to the changed data; wherein the first target component is an interface access component, and the first target component is a component in the target page, and the interface access component is a component configured on the target page by calling a component interface; An acquisition module, configured to acquire a component data change method of the changed component; wherein the component data change method includes the changed data; an execution module, configured to execute the component data changing method in the first target component to change the first data to be modified according to the change data; The second determining module is further configured to, after the first determining module determines the changed data in the target page, if the changed component is a source code access component, determine, based on the data association relationship corresponding to the changed data, second data to be modified in a second target component corresponding to the changed data; wherein the second target component is a source code access component, the source code access component being a component configured in the target page by introducing component source code, and the second target component being a component in the target page; and modifying the source code of the second target component based on the changed data to achieve the change of the second data to be modified; The changed data includes a plurality of changed sub-data, and the second determining module is specifically configured to, in determining the second data to be modified corresponding to the changed data in the second target component according to the data association relationship corresponding to the changed data, specifically to: determine the sub-data to be modified in the second target component corresponding to each of the changed sub-data according to the data association relationship corresponding to the changed data; wherein the component corresponding to the sub-data to be modified is a hidden sub-component in the second target component; The second determining module modifies the source code of the second target component according to the change data, specifically for: modifying the source code of the hidden subcomponent corresponding to the change subdata in the second target component according to each of the change subdata.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the component data changing method according to any one of claims 1 to 5 is implemented.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the component data changing method according to any one of claims 1 to 5 is implemented.
9. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the computer program implements the component data changing method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Method and device for controlling webpage
CN103345393A