An assembly rendering method, device, storage medium and electronic equipment
Patent Information
- Application Number
- CN202310005923.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-01-03
- Publication Date
- 2026-10-20
- Estimated Expiration
- 2043-01-03
AI Technical Summary
[0002]现如今,不同的企业之间不可避免地存在业务的往来,在进行业务来往时,经常需要对企业的网站进行设计,在对网站进行设计的过程中包括有对动态前端组件进行渲染,其中涉及到数据跨域传输导致数据泄露的风险
[0014]在本申请实施例中,通过创建的数据代理模块在获取数据请求后,向与数据代理模块处于同一网络域的数据服务器中获取对应的渲染数据,将渲染数据传输至于数据服务器处于不同网络域的事务服务器中的目标组件,对目标组件进行渲染,从而实现在保证数据安全性的情况下跨域获取数据,提高了组件渲染过程中的安全性以及可靠性,还节省了人力物力,减少不必要的资源浪费。
Smart Images

Figure CN116108467B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a component rendering method, apparatus, storage medium and electronic device. Background Technology
[0002] Nowadays, business dealings between different companies are inevitable. When conducting business, it is often necessary to design the company's website. The website design process includes rendering dynamic front-end components, which involves the risk of data leakage due to cross-domain data transmission. Summary of the Invention
[0003] This application provides a component rendering method, apparatus, storage medium, and electronic device, which can ensure data security during component rendering, enable cross-domain data acquisition while ensuring data security, improve the security and reliability of component rendering, save manpower and material resources, and reduce unnecessary resource waste.
[0004] In a first aspect, embodiments of this application provide a component rendering method applied to a transaction server, comprising:
[0005] The target component obtains data requests based on the data proxy module. The data proxy module is a data proxy service created in the transaction server that is in the same network domain as the data server. The data server and the transaction server are in different network domains.
[0006] The data proxy module obtains the rendering data corresponding to the data request from the data server and transmits the rendering data to the target component.
[0007] The target component is rendered using the rendered data.
[0008] Secondly, embodiments of this application provide a component rendering apparatus applied to a transaction server, comprising:
[0009] A data request acquisition unit is used to acquire data requests transmitted by a target component based on a data proxy module. The data proxy module is a data proxy service created in the transaction server that is in the same network domain as the data server. The data server and the transaction server are in different network domains.
[0010] The data acquisition unit is used to acquire rendering data corresponding to the data request from the data server based on the data proxy module, and transmit the rendering data to the target component.
[0011] A component rendering unit is used to render the target component using the rendering data.
[0012] Thirdly, embodiments of this application provide a computer storage medium storing a plurality of instructions adapted for loading by a processor and executing the steps of the method described above.
[0013] Fourthly, embodiments of this application provide an electronic device, including: a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to execute the steps of the above-described method.
[0014] In this embodiment, after obtaining a data request, the created data proxy module obtains the corresponding rendering data from the data server in the same network domain as the data proxy module, and transmits the rendering data to the target component in the transaction server in a different network domain. The target component is then rendered, thereby achieving cross-domain data acquisition while ensuring data security. This improves the security and reliability of the component rendering process, saves manpower and resources, and reduces unnecessary resource waste. Attached Figure Description
[0015] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0016] Figure 1 A system architecture diagram of a component rendering method provided in this application embodiment;
[0017] Figure 2 A flowchart illustrating a component rendering method provided in an embodiment of this application;
[0018] Figure 3 This is an example schematic diagram of a target component display screen provided in an embodiment of this application;
[0019] Figure 4 This is an example schematic diagram of a data proxy center display screen provided in an embodiment of this application;
[0020] Figure 5 This is a schematic diagram illustrating an example of a data transmission channel provided in an embodiment of this application;
[0021] Figure 6 This is an example diagram illustrating a component rendering effect provided in an embodiment of this application;
[0022] Figure 7 A flowchart illustrating a component rendering method provided in an embodiment of this application;
[0023] Figure 8 This is an example schematic diagram of a component display screen provided in an embodiment of this application;
[0024] Figure 9 This is a schematic diagram of the structure of a component rendering apparatus provided in an embodiment of this application;
[0025] Figure 10 This is a schematic diagram of the structure of a component rendering apparatus provided in an embodiment of this application;
[0026] Figure 11 This is a schematic diagram of the structure of a component package creation unit provided in an embodiment of this application;
[0027] Figure 12 This is a schematic diagram of the structure of a data request acquisition unit provided in an embodiment of this application;
[0028] Figure 13 This is a schematic diagram of the structure of a data acquisition unit provided in an embodiment of this application;
[0029] Figure 14 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0030] To make the features and advantages of this application more apparent and understandable, the technical solutions in the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0031] In existing technologies, when rendering dynamic front-end components, the solution adopted is to send technicians to provide technical support to the client. This is to avoid data leakage during cross-domain transmission during the design process of the client's website, which would result in a large amount of manpower and material resources being wasted.
[0032] Based on this, this application provides a component rendering method. By using this application, after obtaining a data request, the created data proxy module obtains the corresponding rendering data from the data server located in the same network domain as the data proxy module. The rendering data is then transferred to the target component located in a transaction server in a different network domain, and the target component is rendered. This achieves cross-domain data acquisition while ensuring data security, improves the security and reliability of the component rendering process, saves manpower and resources, and reduces unnecessary resource waste.
[0033] Please see Figure 1 This application provides a system architecture diagram for component rendering. For example... Figure 1 As shown, the component rendering method provided in this application embodiment can be applied to a terminal to realize the process of component rendering of terminal applications in the terminal. The system structure provided in this application embodiment mainly includes a physical server 10 and a data server 20. Among them, the transaction server 10 can be a large integrated server used by an enterprise, or a microcomputer, such as a personal computer; the data server 20 can be a large database for storing data, or a small NAS, etc.
[0034] In this embodiment of the application, component rendering is the rendering of dynamic front-end components on the website display page of the transaction server. The data display of the target component is completed by updating the data of the target component. Specifically, after the data proxy module in the transaction server 10 obtains the data request of the target component, it obtains the rendering data corresponding to the data request from the data server 20. The transaction server 10 then renders the target component according to the rendering data to complete the data update of the target component.
[0035] In this embodiment, after obtaining a data request, the created data proxy module obtains the corresponding rendering data from the data server in the same network domain as the data proxy module, and transmits the rendering data to the target component in the transaction server in a different network domain. The target component is then rendered, thereby achieving cross-domain data acquisition while ensuring data security. This improves the security and reliability of the component rendering process, saves manpower and resources, and reduces unnecessary resource waste.
[0036] based on Figure 1 The system architecture shown below will be combined with... Figures 2-4 The component rendering method provided in the embodiments of this application will be described in detail.
[0037] Please see Figure 2 This is a flowchart illustrating a component rendering method provided in an embodiment of this application. Figure 2 As shown, the method may include the following steps S102-S106.
[0038] S102, Obtain the data request transmitted by the target component based on the data proxy module;
[0039] In one embodiment, the transaction server pre-creates a data proxy module, configures corresponding component tags for the target component, obtains the component resources of the target component based on the component tags, and then creates a component package corresponding to the target component based on the component resources. After creating the component package, a data transmission channel is established between the target component and the data proxy module through the component package. When the target component needs to be rendered, the target component sends a data request to the data proxy module. The data proxy module obtains the data request through the data transmission channel and configures a corresponding request tag for the data request, so that the data proxy module can subsequently obtain the rendering data required by the rendering component from the data server and can determine the target component that needs to transmit the rendering data based on the request tag.
[0040] Furthermore, the transaction server can be the server used by the client's website, while the data server can be the server that provides data support. The transaction server and the data server are located in different network domains.
[0041] Furthermore, the data proxy module can provide data proxy services for data created in the transaction server that is in the same network domain as the data server. Through the data proxy module, it is possible to ensure that the data is isolated between the data server and the transaction server, thereby reducing the possibility of data leakage.
[0042] Furthermore, the data proxy module may include a data proxy center and a message proxy center. The data proxy center is used to obtain rendering data from the data server, and the message proxy center is used to receive data requests transmitted by the target component and transmit the rendering data transmitted by the data proxy center to the corresponding target component.
[0043] Furthermore, to avoid the data proxy module affecting the user's visual experience and interfering with operation when displayed on the website's page, a feasible method is to make the data proxy module invisible, such as... Figure 3 As shown, in Figure 3 A data proxy module has been created, but to improve the user experience, it is currently invisible; only the target component 31 is displayed. This method allows rendering of the target component without impacting the user experience. If the data proxy module were made visible, the display on similar pages would look like this: Figure 4 As shown, Figure 4 In addition to the target component 41, the data proxy module 42 is also displayed, which not only affects the visual experience, but also makes it easy to accidentally click on the data proxy module during operation, resulting in unnecessary accidental touch operations.
[0044] Furthermore, the target component can be a dynamic front-end component displayed on the website display page of the transaction server. Specifically, it can be an image, or it can be a button, etc. Figure 3 As shown, Figure 3 Target component 31 is an image used to display today's weather. The text data in the image displays the specific content of today's weather, and this text data can be updated as needed. It should be noted that there is at least one dynamic front-end component on the website's display page, and the target component can be the dynamic front-end component that needs to be updated.
[0045] Furthermore, component tags can be tags pre-configured by the transaction server for the target component. Component tags are used to identify the target component, and based on the tag, the corresponding target component can be determined, as well as the corresponding component resources can be retrieved. These component resources can include the target component's key and code logic. Obtaining the target component's key allows identification of the nodes requiring data updates, and obtaining the target component's code logic allows determination of the specific execution logic, enabling encapsulation and data updates of the target component.
[0046] Furthermore, the component package can be a package created by the transaction server based on the acquired component resources. The target component is encapsulated through the component resources so that the component format of the target component is the target format. The component package establishes a data transmission channel between the target component and the data proxy module so that data can be transmitted through the data transmission channel. Because of the data transmission channel between the target component and the data proxy module, the data proxy module can determine which target component is transmitting the data.
[0047] Furthermore, the rendering data can be data used to render the target component. The rendering data can be data stored in a data server. By using the rendering data, the data of the target component can be updated, thereby completing the rendering of the target component.
[0048] Furthermore, the request tag can be a temporary tag configured for the acquired data request, used to determine the target component for transmitting the data request. The request tag can be temporarily generated and deleted after the rendering data required for this data request is transmitted to the target component, or it can be temporarily generated and retained after the rendering data required for this data request is transmitted to the target component, to be used as the request tag for the next data request. For example, when the data proxy module transmits a data request to the target component, it configures request tag A-1. After the rendering data corresponding to this data request is transmitted to the target component, request tag A-1 is deleted; or, after the rendering data corresponding to the data request is transmitted to the target component, request tag A-1 is saved in the data proxy module, waiting for the target component to transmit a data request again, when request tag A-1 will be used as the request tag for that data request.
[0049] Furthermore, the data transmission channel can be a fixed transmission channel between the target component and the message broker center. By determining which data transmission channel the acquired data was transmitted through, the message broker center can then determine which target component transmitted the acquired data. For example, ... Figure 5 As shown, Figure 5 The system comprises three components: A, B, and C, which transmit data to the message broker center via data transmission channels a, b, and c, respectively. When component A transmits data to the message broker center 51 via data generation channel a, the message broker center 51 determines that the data was transmitted from component A by confirming that the data was obtained through data transmission channel a. It should be noted that the data transmission channels are created by component packages; this creation by component packages ensures better security and improves the reliability of data transmission.
[0050] S104, Based on the data proxy module, obtain the rendering data corresponding to the data request from the data server, and transmit the rendering data to the target component;
[0051] In one embodiment, after the transaction server obtains the data request sent by the target component based on the data proxy module, the data proxy module obtains the corresponding rendering data from the data server according to the data request, determines the target component based on the request tag, and transmits the rendering data to the target component through the data transmission channel between the data proxy module and the target component.
[0052] Furthermore, the data proxy module includes a data proxy center and a message proxy center. The message proxy center obtains the data request transmitted by the target component through the data transmission channel, configures a request tag for the data request, and then transmits the data request and request tag to the data proxy center. The data proxy center queries the data server for the corresponding rendering data based on the data request and retrieves the rendering data to the transaction server. The data proxy center then transmits the rendering data and request tag to the message proxy center. The message proxy center determines the target component corresponding to the rendering data based on the request tag and transmits the rendering data to the target component through the data transmission channel between the target component and the message proxy center.
[0053] S106, The target component is rendered using the rendering data;
[0054] In one embodiment, after receiving the rendering data transmitted by the data proxy module, the target component renders the target component according to the rendering data, thereby updating the data information of the target component and completing the rendering process of the target component.
[0055] Furthermore, the process of rendering a target component based on rendering data can involve replacing the data in the target component that needs updating with the rendered data, thereby updating the target component's data and completing the rendering process. For example, for Figure 3 The target component 31 shown is rendered. Figure 3 The target component 31 is used to display today's weather. The data that needs to be updated is the specific weather text data "Sunny 24-28℃". After obtaining the rendering data "Sunny 25-28℃", the original data is replaced with the rendering data. After updating the data of the target component, the following result is obtained: Figure 6 The updated data is shown on the target component 61 as displayed on the right.
[0056] Furthermore, when the target component functions as a button, and clicking the target component displays the corresponding content on the website's display page, the target component is rendered based on rendering data. Clicking the target component then displays the updated data information on the website.
[0057] In this embodiment, after obtaining a data request, the created data proxy module obtains the corresponding rendering data from the data server in the same network domain as the data proxy module, and transmits the rendering data to the target component in the transaction server in a different network domain. The target component is then rendered, thereby achieving cross-domain data acquisition while ensuring data security. This improves the security and reliability of the component rendering process, saves manpower and resources, and reduces unnecessary resource waste.
[0058] Please see Figure 7 This is a flowchart illustrating a component rendering method provided in an embodiment of this application. Figure 7 As shown, the method may include the following steps S202-S224.
[0059] S202, Create a data brokerage center and a message brokerage center;
[0060] In one embodiment, the transaction server creates a data broker module, which includes a data broker center and a message broker center, to obtain the required rendering data from the data server.
[0061] Furthermore, the transaction server can be the server used by the client's website, while the data server can be the server that provides data support. The transaction server and the data server are located in different network domains, which allows the data server and the transaction server to be well isolated, thereby ensuring that the possibility of data leakage in the data server is low.
[0062] Furthermore, the data proxy center can provide data proxy services for obtaining the required rendering data from the data server. The data proxy center and the data server are in the same network domain, which can ensure that the data is isolated between the data server and the transaction server, thereby reducing the possibility of data leakage.
[0063] Furthermore, the message broker center can provide proxy services for obtaining data requests and transmitting rendering data to target components. Through the efficiency broker center, rendering data can be transmitted to the corresponding target components, thereby ensuring that rendering data is not transmitted to the wrong component and improving the accuracy of rendering data transmission.
[0064] Furthermore, to avoid the data proxy module affecting the user's visual experience and interfering with operation when displayed on the website's page, a feasible method is to make the data proxy module invisible, such as... Figure 3 As shown, in Figure 3 A data proxy module has been created, but to improve the user experience, it is currently invisible; only the target component 31 is displayed. This method allows rendering of the target component without impacting the user experience. If the data proxy module were made visible, the display on similar pages would look like this: Figure 4 As shown, Figure 4 In addition to the target component 41, the data proxy module 42 is also displayed, which not only affects the visual experience, but also makes it easy to accidentally click on the data proxy module 42 during operation, resulting in unnecessary accidental touch operations.
[0065] S204, Obtain the component tag corresponding to the target component, and obtain the component resource corresponding to the target component based on the component tag;
[0066] In one embodiment, the transaction server pre-configures the corresponding component tag for the target component, and then obtains the component resource corresponding to the target component based on the component tag for subsequent encapsulation of the target component.
[0067] Furthermore, the target component can be a dynamic front-end component displayed on the website display page of the transaction server. Specifically, it can be an image, or it can be a button, etc. Figure 3 As shown, Figure 3 Target component 31 is an image used to display today's weather. The text data within the image displays the specific details of today's weather, and this text data can be updated as needed. It should be noted that there is at least one dynamic front-end component on the website's display page, and the target component can be the dynamic front-end component that currently needs to be updated. For example... Figure 8 As shown, when the target component is a button, clicking... Figure 8 The target component 81 can obtain the display content corresponding to the target component, and obtain the pop-up content 82 on the display page.
[0068] Furthermore, component tags can be labels used to identify target components. Based on the component tags, the target component corresponding to the component tag can be determined. Component tags can be represented by letters, such as "A", "B", "C", etc., or they can be labeled according to the actual function of the target component, such as "time" "weather", etc.
[0069] Furthermore, component resources can include the target component's key and code logic. By obtaining the target component's key, the node that needs to be updated with data can be determined. By obtaining the target component's code logic, the specific execution logic of the target component can be determined, thereby enabling the target component to be encapsulated, updated with data, and processed.
[0070] S206, Based on the component resources, the target component is encapsulated using the target encapsulation format to obtain the component package corresponding to the target component;
[0071] In one embodiment, after obtaining the component resources of the target component, the target component is encapsulated using the target encapsulation format to obtain a component package with the component format being the target encapsulation format.
[0072] Furthermore, the component package can be a package created by the transaction server based on the acquired component resources. The target component is encapsulated through the component resources so that the component format of the target component is the target format. The component package establishes a data transmission channel between the target component and the data proxy module so that data can be transmitted through the data transmission channel. Because of the data transmission channel between the target component and the data proxy module, the data proxy module can determine which target component is transmitting the data.
[0073] Furthermore, the target encapsulation format can be any desired format, such as one with stronger adaptability and better data protection. A specific example is Web Components. Using Web Components results in lower memory consumption compared to the commonly used iframe, more thorough isolation between servers in different network domains, and, due to its superior adaptability, it solves compatibility issues between different technology stacks, allowing for more harmonious integration with the website and reducing user discomfort and incongruity when browsing web pages.
[0074] S208, Establish a data transmission channel between the target component and the message brokerage center based on the component package;
[0075] In one embodiment, after obtaining the component package corresponding to the target component in the target encapsulation format, a data transmission channel between the target component and the message broker center is established through the component package to facilitate data transmission between the target component and the message broker center.
[0076] Furthermore, the data transmission channel can be a fixed transmission channel between the target component and the message broker center. By determining which data transmission channel the acquired data was transmitted through, the message broker center can then determine which target component transmitted the acquired data. For example, ... Figure 5 As shown, Figure 5 It includes three components, A, B, and C, which transmit data to the message broker center 51 through data transmission channels a, b, and c, respectively. When A transmits data to the message broker center 51 through data generation channel a, the message broker center 51 determines that the data was transmitted from component A to the message broker center 51 by confirming that the data was obtained through data transmission channel a.
[0077] It should be noted that the data transmission channel is created by the component package. Creating the channel through the component package ensures better security and improves the reliability of data transmission.
[0078] S210, Obtain the data request transmitted by the target component based on the message broker center;
[0079] In one embodiment, the message broker center obtains the data request transmitted by the target component through the data transmission channel, determines which data transmission channel the data request is transmitted through, and then determines the target component that transmitted the data request.
[0080] For example, with Figure 8 Taking the content shown as an example, if the message broker center obtains... Figure 8 If a data request is transmitted via channel a, then by determining that the data request is transmitted from channel a to the message broker center, it can be determined that the data is transmitted from target component A to the message broker center.
[0081] S212, Generate a request tag corresponding to the data request based on the message broker center, and transmit the request tag and the data request to the data broker center;
[0082] In one embodiment, after the message broker center receives a data request, it generates a request tag corresponding to the data request, saves the request tag in the message broker center, and sends the request tag and the data request to the data broker center to obtain the rendering data corresponding to the data request.
[0083] Furthermore, the request tag can be a temporary tag configured for the acquired data request, used to determine the target component for transmitting the data request. The request tag can be temporarily generated and deleted after the rendering data required for this data request is transmitted to the target component, or it can be temporarily generated and retained after the rendering data required for this data request is transmitted to the target component, to be used as the request tag for the next data request. For example, when the data proxy module transmits a data request to the target component, it configures request tag A-1. After the rendering data corresponding to this data request is transmitted to the target component, request tag A-1 is deleted; or, after the rendering data corresponding to the data request is transmitted to the target component, request tag A-1 is saved in the data proxy module, waiting for the target component to transmit a data request again, when request tag A-1 will be used as the request tag for that data request.
[0084] Furthermore, the message broker center can generate request tags corresponding to data requests in the following ways: it can configure the request tags according to the target component of the data request. For example, if the data request is transmitted by the target component "A", then the component tag of the data request is "A-1". Alternatively, it can be configured according to the actual function of the target component. For example, if the target component is used to display the weather status of the day, then the component tag of the target component is "Weather-1", etc.
[0085] Furthermore, the rendering data can be data used to render the target component. The rendering data can be data stored in a data server. By using the rendering data, the data of the target component can be updated, thereby completing the rendering of the target component.
[0086] S214, Based on the data proxy center, obtain the request tag and the data request transmitted by the message proxy center;
[0087] In one embodiment, the data broker center obtains the request tag and data request transmitted by the message broker center, saves the request tag in the data broker center, parses the data request, and determines which specific data corresponds to the data request, so as to be queried in the data server.
[0088] S216, Based on the data proxy center, obtain the rendering data corresponding to the data request from the data server;
[0089] In one embodiment, the data brokerage center parses the obtained data request, determines the corresponding rendering data in the data request, queries the rendering data in the data server, and after finding the rendering data, retrieves the rendering data from the data server and downloads it to the data brokerage center of the transaction server.
[0090] It should be noted that since the data proxy center and the data server are located in the same network domain, when the data proxy center retrieves data from the data server, compared to data transmission across network domains, the possibility of data leakage is reduced, thereby improving data security and ensuring the security of data on the data server when different enterprises cooperate.
[0091] S218, Based on the data proxy center, the rendering data and the request tag are transmitted to the message proxy center;
[0092] In one embodiment, after the data broker center obtains the rendering data corresponding to the data request from the data server, the rendering data and the request tag are transmitted to the message broker center so that the message broker center can transmit the rendering data to the corresponding target component according to the request tag.
[0093] Furthermore, after the data proxy center obtains the rendering data, since the data proxy center obtains the corresponding rendering data from the data server after parsing the data request, it transmits the data request and the corresponding request tag to the message proxy center together after obtaining the rendering data.
[0094] Furthermore, when the data brokerage center cannot find the corresponding rendering data in the data server, or when the time taken reaches the preset time, a feasible method is to display a prompt message on the website display page of the transaction server. This prompt message is used to indicate that the component information of the target component has not been rendered. A pop-up window can also be displayed on the website administrator's display page to prompt for manual updating of the rendering data of the target component.
[0095] S220, Based on the message broker center, obtain the request tag and the rendering data transmitted by the data broker center;
[0096] S222, based on the target component indicated by the request tag obtained from the message broker center, the rendering data is transmitted to the target component through the data transmission channel;
[0097] In one embodiment, after obtaining the request tag and corresponding rendering data transmitted by the data proxy center, the message broker center determines the corresponding target component based on the request tag, and transmits the rendering data to the corresponding target component through the data transmission channel between the message broker center and the target component.
[0098] Furthermore, since the message broker center stores the request tags corresponding to the data requests, when the rendering data and request tags transmitted by the data broker center are received, the stored request tags are queried in the message broker center, and the target component corresponding to the rendering data is determined based on the stored request tags.
[0099] Furthermore, one method for querying stored request tags in a message brokerage center is to query the group class name of the request tag. For example, the group class name of the request tag "A-1" generated in step S212 is "A". Then, the specific request tag is queried among request tags with the same group class name, thereby improving the efficiency of request tag querying in the message brokerage center. It should be noted that, to improve the query efficiency of request tags using this method, when configuring request tags for data requests, a regular grouping method can be used. For example, a data request transmitted by target component "A" corresponds to the group class name "A". Alternatively, time can be used for configuration. For example, the third data request initiated at 13:00 on June 23, 2022, corresponds to the request tag "2022062313-003". Therefore, when querying request tags, it is only necessary to query within the group class name "2022062313", thus shortening the query time. The request tag configuration method can be set according to the actual situation.
[0100] S224, The target component is rendered using the rendering data;
[0101] In one embodiment, after receiving the rendering data transmitted by the data proxy module, the target component renders the target component according to the rendering data, thereby updating the data information of the target component and completing the rendering process of the target component.
[0102] Furthermore, the process of rendering a target component based on rendering data can involve replacing the data in the target component that needs updating with the rendered data, thereby updating the target component's data and completing the rendering process. For example, for Figure 3 The target component shown is rendered. Figure 3 The target component 31 is used to display today's weather. The data that needs to be updated is the specific weather text data "Sunny 24-28℃". After obtaining the rendering data "Sunny 25-28℃", the original data is replaced with the rendering data. After updating the data of the target component, the following result is obtained: Figure 6 The updated data is shown on the target component 61 as displayed on the right.
[0103] Furthermore, when the target component functions as a button, and clicking the target component displays the corresponding content on the website's display page, the target component is rendered based on rendering data. Clicking the target component then displays the updated data information on the website.
[0104] In this embodiment, by pre-establishing a data proxy center and a message proxy center, configuring tags on the target component, and acquiring the component resources of the target component before encapsulating the target component, the target component can be more thoroughly isolated from the transaction server, solving the component compatibility problem and data security. A data transmission channel is established between the message proxy center and the target component, thereby avoiding transmission errors during the rendering data transmission process and ensuring the reliability of the target component rendering process. By pre-encapsulating the target component and creating the data proxy center and message proxy center, cross-domain data acquisition is achieved while ensuring data security, improving the security and reliability of the component rendering process, saving manpower and resources, and reducing unnecessary resource waste.
[0105] based on Figure 1 The system architecture shown below will be combined with... Figures 9-13 This application provides a detailed description of the component rendering apparatus provided in its embodiments. It should be noted that... Figures 9-13 The component rendering apparatus in the application is used to execute the present application. Figures 2-8 The methods shown in the embodiments are for illustrative purposes only, illustrating the parts relevant to the embodiments of this application. For specific technical details not disclosed, please refer to this application. Figures 2-8 The example shown.
[0106] Please see Figure 9 This is a schematic diagram of the structure of a component rendering device provided in an embodiment of this application. Figure 9 As shown, the component rendering apparatus 1 in this application embodiment may include: a data request acquisition unit 11, a data acquisition unit 12, and a component rendering unit 13.
[0107] The data request acquisition unit 11 is used to acquire the data request transmitted by the target component based on the data proxy module. The data proxy module is a data proxy service created in the transaction server that is in the same network domain as the data server. The data server and the transaction server are in different network domains.
[0108] Data acquisition unit 12 is used to acquire rendering data corresponding to the data request from the data server based on the data proxy module, and transmit the rendering data to the target component;
[0109] The component rendering unit 13 is used to render the target component using the rendering data.
[0110] Optional, such as Figure 10 As shown, the component rendering device 1 further includes:
[0111] The central creation unit 14 is used to create a data proxy center and a message proxy center, wherein the data proxy center is invisible on the display page;
[0112] The component package creation unit 15 is used to obtain the component resources corresponding to the target component and create the component package corresponding to the target component based on the component resources.
[0113] Channel establishment unit 16 is used to establish a data transmission channel between the target component and the message broker center based on the component package.
[0114] Optional, such as Figure 11 As shown, the component package creation unit 15 includes:
[0115] Resource acquisition subunit 151 is used to acquire the component tag corresponding to the target component, and acquire the component resource corresponding to the target component based on the component tag;
[0116] The component encapsulation subunit 152 is used to encapsulate the target component based on the component resource and using the target encapsulation format to obtain the component package corresponding to the target component.
[0117] Optional, such as Figure 12 As shown, the data request acquisition unit 11 includes:
[0118] The request acquisition subunit 111 is used to acquire the data request transmitted by the target component based on the message broker center, and the data request is transmitted through the data transmission channel;
[0119] Tag generation subunit 112 is used to generate a request tag corresponding to the data request based on the message broker center, and transmit the request tag and the data request to the data broker center;
[0120] The tag transmission subunit 113 is used to obtain the request tag and the data request transmitted by the message broker center based on the data broker center.
[0121] Optional, such as Figure 13 As shown, the data acquisition unit 12 includes:
[0122] The data acquisition subunit 121 is used to acquire the rendering data corresponding to the data request from the data server based on the data proxy center, and transmit the rendering data to the message proxy center.
[0123] The data transmission subunit 122 is used to obtain the rendering data transmitted by the data proxy center based on the message proxy center, and transmit the rendering data to the target component through the data transmission channel.
[0124] Optionally, the data acquisition subunit 121 is further configured to:
[0125] Based on the data proxy center, the rendering data corresponding to the data request is obtained from the data server;
[0126] The data broker center transmits the rendering data and the request tag to the message broker center.
[0127] Optionally, the data transmission subunit 122 is further configured to:
[0128] The message broker center obtains the request tag and the rendering data transmitted by the data broker center.
[0129] Based on the target component indicated by the request tag obtained from the message broker center, the rendering data is transmitted to the target component through the data transmission channel.
[0130] In this embodiment, by pre-establishing a data proxy center and a message proxy center, configuring tags on the target component, and acquiring the component resources of the target component before encapsulating the target component, the target component can be more thoroughly isolated from the transaction server, solving the component compatibility problem and data security. A data transmission channel is established between the message proxy center and the target component, thereby avoiding transmission errors during the rendering data transmission process and ensuring the reliability of the target component rendering process. By pre-encapsulating the target component and creating the data proxy center and message proxy center, cross-domain data acquisition is achieved while ensuring data security, improving the security and reliability of the component rendering process, saving manpower and resources, and reducing unnecessary resource waste.
[0131] This application also provides a computer storage medium that can store multiple program instructions, which are adapted to be loaded and executed by a processor as described above. Figures 1-8 The method steps of the illustrated embodiment can be found in the following documentation for detailed execution. Figures 1-8 The specific details of the illustrated embodiments will not be elaborated here.
[0132] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.
[0133] This application also provides a computer program product storing at least one instruction, which is loaded and executed by the processor as described above. Figures 1 to 8 The component rendering method of the illustrated embodiment can be found in the following document for a detailed execution process. Figures 1 to 8 The specific details of the illustrated embodiments will not be elaborated here.
[0134] Please see Figure 14 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 14 As shown, the electronic device 1000 may include: at least one processor 1001, such as a CPU; at least one network interface 1004; an input / output interface 1003; a memory 1005; and at least one communication bus 1002. The communication bus 1002 is used to enable communication between these components. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 1005 may be high-speed RAM or non-volatile memory, such as at least one disk drive. Optionally, the memory 1005 may also be at least one storage device located remotely from the aforementioned processor 1001. Figure 14 As shown, the memory 1005, which serves as a computer storage medium, may include an operating system, a network communication module, an input / output interface module, and a component rendering application.
[0135] exist Figure 14 In the electronic device 1000 shown, the input / output interface 1003 is mainly used to provide an input interface for the user and to obtain the user input data.
[0136] In one embodiment, processor 1001 can be used to invoke a component rendering application stored in memory 1005, and specifically perform the following operations:
[0137] The target component obtains data requests based on the data proxy module. The data proxy module is a data proxy service created in the transaction server that is in the same network domain as the data server. The data server and the transaction server are in different network domains.
[0138] The data proxy module obtains the rendering data corresponding to the data request from the data server and transmits the rendering data to the target component.
[0139] The target component is rendered using the rendered data.
[0140] Optionally, the data proxy module includes a data proxy center and a message proxy center. Before executing the data request obtained from the target component based on the data proxy module, the processor 1001 also performs the following operations:
[0141] Create a data broker center and a message broker center, wherein the data broker center is invisible on the display page;
[0142] Obtain the component resources corresponding to the target component, and create a component package corresponding to the target component based on the component resources;
[0143] A data transmission channel is established between the target component and the message broker center based on the component package.
[0144] Optionally, when the processor 1001 executes the process of obtaining the component resources corresponding to the target component and creating the component package corresponding to the target component based on the component resources, it specifically performs the following operations:
[0145] Obtain the component tag corresponding to the target component, and obtain the component resource corresponding to the target component based on the component tag;
[0146] Based on the component resources, the target component is encapsulated using the target encapsulation format to obtain the component package corresponding to the target component.
[0147] Optionally, when the processor 1001 executes a data request based on the data proxy module to obtain data transmitted by the target component, it specifically performs the following operations:
[0148] The data request transmitted by the target component is obtained based on the message broker center, and the data request is transmitted through the data transmission channel;
[0149] Based on the message broker center, a request tag corresponding to the data request is generated, and the request tag and the data request are transmitted to the data broker center.
[0150] The request tag and data request transmitted by the message broker center are obtained based on the data broker center.
[0151] Optionally, when the processor 1001 executes the following operations to obtain the rendering data corresponding to the data request from the data server based on the data proxy module and transmit the rendering data to the target component:
[0152] Based on the data proxy center obtaining the rendering data corresponding to the data request from the data server, the rendering data is transmitted to the message proxy center;
[0153] The rendering data transmitted by the data proxy center is obtained from the message proxy center, and the rendering data is transmitted to the target component through the data transmission channel.
[0154] Optionally, when the processor 1001 executes the operation of retrieving the rendering data corresponding to the data request from the data server based on the data proxy center and transmitting the rendering data to the message proxy center, it specifically performs the following operations:
[0155] Based on the data proxy center, the rendering data corresponding to the data request is obtained from the data server;
[0156] The data broker center transmits the rendering data and the request tag to the message broker center.
[0157] Optionally, when the processor 1001 executes the operation of obtaining the rendering data transmitted by the data proxy center based on the message proxy center and transmitting the rendering data to the target component through the data transmission channel, it specifically performs the following operations:
[0158] The message broker center obtains the request tag and the rendering data transmitted by the data broker center.
[0159] Based on the target component indicated by the request tag obtained from the message broker center, the rendering data is transmitted to the target component through the data transmission channel.
[0160] In this embodiment, by pre-establishing a data proxy center and a message proxy center, configuring tags on the target component, and acquiring the component resources of the target component before encapsulating the target component, the target component can be more thoroughly isolated from the transaction server, solving the component compatibility problem and data security. A data transmission channel is established between the message proxy center and the target component, thereby avoiding transmission errors during the rendering data transmission process and ensuring the reliability of the target component rendering process. By pre-encapsulating the target component and creating the data proxy center and message proxy center, cross-domain data acquisition is achieved while ensuring data security, improving the security and reliability of the component rendering process, saving manpower and resources, and reducing unnecessary resource waste.
[0161] The above-disclosed embodiments are merely preferred embodiments of this application and should not be construed as limiting the scope of this application. Therefore, any equivalent variations made in accordance with the claims of this application shall still fall within the scope of this application.
Claims
1. A component rendering method, applied to a transaction server, comprising: The target component obtains data requests based on the data proxy module. The data proxy module is a data proxy service created in the transaction server that is in the same network domain as the data server. The data server and the transaction server are in different network domains. The data proxy module obtains the rendering data corresponding to the data request from the data server and transmits the rendering data to the target component. The target component is rendered using the rendering data; The data proxy module includes a data proxy center and a message proxy center. The data proxy center is used to obtain rendering data from the data server, and the data proxy center and the data server are in the same network domain. The message proxy center is used to receive data requests transmitted by the target component and to transmit the rendering data transmitted by the data proxy center to the corresponding target component. The message proxy center and the transaction server are in the same network domain.
2. The method according to claim 1, further comprising, before obtaining the data request transmitted by the target component based on the data proxy module: Create a data broker center and a message broker center, wherein the data broker center is invisible on the display page; Obtain the component resources corresponding to the target component, and create a component package corresponding to the target component based on the component resources; A data transmission channel is established between the target component and the message broker center based on the component package.
3. The method according to claim 2, wherein obtaining the component resources corresponding to the target component and creating the component package corresponding to the target component based on the component resources includes: Obtain the component tag corresponding to the target component, and obtain the component resource corresponding to the target component based on the component tag; Based on the component resources, the target component is encapsulated using the target encapsulation format to obtain the component package corresponding to the target component.
4. The method according to claim 2, wherein obtaining the data request transmitted by the target component based on the data proxy module includes: The data request transmitted by the target component is obtained based on the message broker center, and the data request is transmitted through the data transmission channel; Based on the message broker center, a request tag corresponding to the data request is generated, and the request tag and the data request are transmitted to the data broker center. The request tag and data request transmitted by the message broker center are obtained based on the data broker center.
5. The method according to claim 4, wherein obtaining the rendering data corresponding to the data request from the data server based on the data proxy module and transmitting the rendering data to the target component comprises: Based on the data proxy center obtaining the rendering data corresponding to the data request from the data server, the rendering data is transmitted to the message proxy center; The rendering data transmitted by the data proxy center is obtained from the message proxy center, and the rendering data is transmitted to the target component through the data transmission channel.
6. The method according to claim 5, wherein obtaining the rendering data corresponding to the data request from the data server based on the data proxy center and transmitting the rendering data to the message proxy center comprises: Based on the data proxy center, the rendering data corresponding to the data request is obtained from the data server; The data broker center transmits the rendering data and the request tag to the message broker center.
7. The method according to claim 5, wherein obtaining the rendering data transmitted by the data proxy center based on the message proxy center and transmitting the rendering data to the target component through the data transmission channel comprises: The message broker center obtains the request tag and the rendering data transmitted by the data broker center. Based on the target component indicated by the request tag obtained from the message broker center, the rendering data is transmitted to the target component through the data transmission channel.
8. A component rendering apparatus, applied to a transaction server, comprising: A data request acquisition unit is used to acquire data requests transmitted by a target component based on a data proxy module. The data proxy module is a data proxy service created in the transaction server that is in the same network domain as the data server. The data server and the transaction server are in different network domains. The data acquisition unit is used to acquire rendering data corresponding to the data request from the data server based on the data proxy module, and transmit the rendering data to the target component. A component rendering unit is used to render the target component using the rendering data; The data proxy module includes a data proxy center and a message proxy center. The data proxy center is used to obtain rendering data from the data server, and the data proxy center and the data server are in the same network domain. The message proxy center is used to receive data requests transmitted by the target component and to transmit the rendering data transmitted by the data proxy center to the corresponding target component. The message proxy center and the transaction server are in the same network domain.
9. A computer storage medium, characterized in that, The computer storage medium stores a plurality of instructions adapted for loading by a processor and executing the steps of the method as described in any one of claims 1 to 7.
10. A computer program product storing at least one instruction, said at least one instruction being loaded by a processor and executing the method steps of any one of claims 1 to 7.
11. An electronic device, characterized in that, include: A processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and to execute the steps of the method as claimed in any one of claims 1 to 7.
Citation Information
Patent Citations
Web page and service security control method and device
CN111143828A
Anti-DDOS one-time cross-domain information full-life-cycle secret-state security system and method
CN115001830A