+

WO2018176814A1 - Procédé et dispositif de mise en œuvre de composant personnalisé - Google Patents

Procédé et dispositif de mise en œuvre de composant personnalisé Download PDF

Info

Publication number
WO2018176814A1
WO2018176814A1 PCT/CN2017/107053 CN2017107053W WO2018176814A1 WO 2018176814 A1 WO2018176814 A1 WO 2018176814A1 CN 2017107053 W CN2017107053 W CN 2017107053W WO 2018176814 A1 WO2018176814 A1 WO 2018176814A1
Authority
WO
WIPO (PCT)
Prior art keywords
component
code
interface
personalized
user
Prior art date
Application number
PCT/CN2017/107053
Other languages
English (en)
Chinese (zh)
Inventor
刘富龙
陈少杰
张文明
Original Assignee
武汉斗鱼网络科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 武汉斗鱼网络科技有限公司 filed Critical 武汉斗鱼网络科技有限公司
Publication of WO2018176814A1 publication Critical patent/WO2018176814A1/fr

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/38Creation or generation of source code for implementing user interfaces

Definitions

  • the present invention relates to the field of Internet technologies, and in particular, to a method and an apparatus for implementing a personalized component.
  • the present invention has been made in order to provide a method and apparatus for implementing a personalized component that overcomes the above problems or at least partially solves the above problems.
  • a personalized component implementation method including: customizing a component interface, and providing a personalized component interface to a user by exposing an API; and receiving a user input component through a personalized component interface Content code; compiles the component content code to obtain a personalized component corresponding to the component content code input by the user.
  • the personalized component interface includes one or more of an HTML interface, a CSS interface, and a Javascript interface; the component content code includes one or more of HTML code, CSS code, and Javascript code.
  • the method further comprises: scrambling the component content code input by the user into an unordered character string, thereby performing confusion confusion on the component content code; and using an encoding algorithm to perform encoding operation on the obfuscated data.
  • the method further comprises: storing the encoded data into a database, and, when generating the page, extracting the data content from the database and performing decoding processing.
  • the method further comprises: performing an exception capture on the component content code input by the user; and removing the code having the exception from the component content code.
  • a personalized component implementing apparatus including: a personalized component interface unit, configured to customize a personalized component interface, and provide a personalized component interface to the user by exposing an API;
  • the code obtaining unit is configured to receive the component content code input by the user through the personalized component interface, and the encoding processing unit is configured to compile the component content code to obtain a personalized component corresponding to the component content code input by the user.
  • the personalized component interface includes one or more of an HTML interface, a CSS interface, and a Javascript interface; the component content code includes one or more of HTML code, CSS code, and Javascript code.
  • the device further includes: a confusion scrambling processing unit, scrambling the component content code input by the user into an unordered character string, thereby performing confusion confusion on the component content code; wherein the encoding processing unit is configured to Confusing the disturbed data using an encoding algorithm for encoding operations.
  • a confusion scrambling processing unit scrambling the component content code input by the user into an unordered character string, thereby performing confusion confusion on the component content code
  • the encoding processing unit is configured to Confusing the disturbed data using an encoding algorithm for encoding operations.
  • the device further includes: the decoding processing unit is configured to: when generating the page, extract the data content from the database pre-stored with the encoded data and perform decoding processing.
  • the decoding processing unit is configured to: when generating the page, extract the data content from the database pre-stored with the encoded data and perform decoding processing.
  • the device further comprises: an exception capture unit configured to perform an exception capture on the component content code input by the user; and, culling the code having the exception from the component content code.
  • an exception capture unit configured to perform an exception capture on the component content code input by the user; and, culling the code having the exception from the component content code.
  • the embodiment of the present invention implements a solution by using a personalized component, which enables a page developer to directly input component code, and create a new personalized component (that is, a general abstract component that the platform cannot provide) anytime and anywhere, which can effectively reduce the developer's
  • a personalized component that is, a general abstract component that the platform cannot provide
  • FIG. 1 is a flowchart of a personalized page generation method according to an embodiment of the present invention
  • FIG. 2 is a schematic diagram of a method for generating a personalized page according to an embodiment of the present invention
  • FIG. 3 is a flowchart of a method for implementing a personalized component according to an embodiment of the present invention
  • FIG. 4 is a schematic structural diagram of a personalized page generating apparatus according to an embodiment of the present invention.
  • FIG. 5 is a schematic structural diagram of a personalized component implementing apparatus according to an embodiment of the present invention.
  • the present invention provides a personalized page generation method, which can effectively reduce the communication cost between developers and enhance self-service.
  • the construction efficiency of the platform is a personalized page generation method, which can effectively reduce the communication cost between developers and enhance self-service.
  • FIG. 1 is a flowchart of a method for generating a personalized page according to an embodiment of the present invention, where the method includes steps S101-S104.
  • S101 Providing a personalized component interface to the user, and receiving the component content code input by the user through the personalized component interface.
  • HTML Hyper Text Markup Language, hypertext markup language
  • CSS CSS
  • Javascript used to write the behavior of components.
  • the personalization component interface includes one or more of an HTML interface, a CSS interface, and a Javascript interface; the component content code includes one or more of HTML code, CSS code, and Javascript code.
  • the personalized component provided can enable the user (page developer) to arbitrarily input HTML, CSS, and JavaScript.
  • the page developer can use any of the personalized components provided by the present invention to perform any function development, and is not limited to the existing components of the self-service website platform.
  • the present invention aims to provide other functional components while the self-service platform is provided, and only needs to provide a personalized component (custom component), the content of the component (ie, the HTML code of the input component, CSS code). , JavaScript code) are written by the activity topic page developers, you can temporarily complete a custom personalized component. Because of the non-reusability of personalized components, component developers are not required to re-develop personalized components, and only the active topic page developers use custom code to customize the individual requirements.
  • Providing a personalized component interface to the user can be achieved by exposing the API, for example, exposing three interfaces that are custom input and configured by the active feature page developer; in one specific example, three available feature pages
  • the interfaces configured by the developer are: HTML interface, CSS interface, and JavaScript interface. Because each platform exposes component API interfaces in different ways, this article does not specifically limit this.
  • the component content code may be abnormally captured, and the abnormal code may be culled, thereby improving the accuracy of the code subsequent processing.
  • try ⁇ catch(e) ⁇ method provided by all major browser vendors to render the code input by the developer to try ⁇
  • the browser will intercept it and input the error message into catch(e) ⁇ error message ⁇ .
  • the following code can be used to achieve exception capture.
  • S102 Encode the component content code, and store the processed data content into a database.
  • the component content code input by the user may be scrambled into an unordered string to confuse the component content code; and the encoding algorithm is used to confuse the scrambled data. Perform the encoding operation.
  • SetState is a general method provided by JavaScript to save to the database.
  • htmlStr Here is the html code entered by the user.
  • S104 Render the decoded data content to the page to obtain a personalized page corresponding to the component content code input by the user.
  • Rendering the decompiled data content to the page presents a custom effect of the code entered by the developer.
  • FIG. 2 it is a schematic diagram corresponding to an example of the method of FIG. 1.
  • the user is first provided with a personalized component interface by exposing the API; then, the component content code input by the user is received through the personalized component interface, ie, the HTML code, the CSS code, and/or the JavaScript code are obtained; and then, the HTML is The code, CSS code, and/or JavaScript code are encoded and stored in the database; when the page is to be generated, the HTML code, CSS code, and/or JavaScript code are taken out for pre-rendering, and the fetched code is decoded; finally, the code is decoded The rendered data is rendered to the page to present a personalized page.
  • a typical application scenario of the solution of the present invention is: when a web developer uses a self-service website to build a platform, a simple topic page can be quickly constructed, but when it is encountered with more complicated or with the background In order to interact with some activity topic pages of data, the general self-service platform can't solve this problem.
  • page developers and platform developers need to negotiate. How to provide platform developers with a special component to complete the construction of complex topic pages is a technical requirement.
  • a special component cannot be abstracted and universally used, that is, it cannot be reused to other functions, and during the development, some communication costs, development costs of the platform developer, unnecessary operating costs, and the like are generated.
  • the platform developer provides a personalized component such as the one provided by the present invention
  • a personalized component such as the one provided by the present invention
  • the personalized page generation solution can enable the page developer to directly input the component code, and create a new personalized component (that is, a general abstract component that the platform cannot provide) anytime and anywhere, which can effectively reduce the developer's
  • the cost of communication between the two can increase the efficiency of building a self-service platform.
  • the embodiment of the invention further provides a method for implementing a personalized component.
  • a flowchart of a method for implementing a personalized component according to an embodiment of the present invention includes steps S301-S303.
  • S301 Customize the component interface and provide a personalized component interface to the user by exposing the API.
  • any functional component is composed of HTML, CSS, and JavaScript.
  • HTML Hyper Text Markup Language
  • CSS CSS
  • Javascript The behavior of writing components.
  • the personalization component interface includes one or more of an HTML interface, a CSS interface, and a Javascript interface; the component content code includes one or more of HTML code, CSS code, and Javascript code.
  • the personalized component provided can enable the user (page developer) to arbitrarily input HTML, CSS, and JavaScript.
  • the page developer can use any of the personalized components provided by the present invention to perform any function development, and is not limited to the existing components of the self-service website platform.
  • the present invention aims to provide the same functional components of the self-service platform.
  • the content of the component (that is, the HTML code of the input component, CSS code, JavaScript code) is written by the activity profile page developer, which can be temporarily fast.
  • Complete a custom personalized component Because of the non-reusability of personalized components, component developers are not required to re-develop personalized components, and only the active topic page developers use custom code to customize the individual requirements.
  • Providing a personalized component interface to the user can be achieved by exposing the API, for example, exposing three interfaces that are custom input and configured by the active feature page developer; in one specific example, three available feature pages
  • the interfaces configured by the developer are: HTML interface, CSS interface, and JavaScript interface. Because each platform exposes component API interfaces in different ways, this article does not specifically limit this.
  • S302 Receive a component content code input by a user through a personalized component interface
  • the component content code may be abnormally captured, and the abnormal code may be culled, thereby improving the accuracy of the code subsequent processing.
  • try ⁇ catch(e) ⁇ method provided by all major browser vendors to render the code input by the developer to try ⁇
  • the browser will intercept it and input the error message into catch(e) ⁇ error message ⁇ .
  • the following code can be used to achieve exception capture.
  • S303 Compile and process the component content code to obtain a personalized component corresponding to the component content code input by the user.
  • the component content code input by the user may be scrambled into an unordered string to confuse the component content code; and the encoding algorithm is used to confuse the scrambled data. Perform the encoding operation.
  • SetState is a general method provided by JavaScript to save to the database.
  • htmlStr Here is the html code entered by the user.
  • the method further comprises: storing the encoded data into the database, and, when generating the page, extracting and decoding the data content from the database. deal with.
  • the decoded data content is rendered to the page, resulting in a personalized page corresponding to the component content code entered by the user. Rendering the decompiled data content to the page presents a custom effect of the code entered by the developer.
  • the present invention also provides a personalized page generating apparatus.
  • FIG. 4 it is a schematic structural diagram of a personalized page generating apparatus.
  • the device includes:
  • the code obtaining unit 401 is configured to provide a personalized component interface to the user, and receive the component content code input by the user through the personalized component interface;
  • the encoding processing unit 402 is configured to perform encoding processing on the component content code, and store the processed data content into a database;
  • a decoding processing unit 403 configured to take out data content from a database, and perform decoding processing
  • the rendering unit 404 is configured to render the decoded data content to the page to obtain a personalized page corresponding to the component content code input by the user.
  • the personalized component interface includes one or more of an HTML interface, a CSS interface, and a Javascript interface; the component content code includes one or more of HTML code, CSS code, and Javascript code.
  • the apparatus further includes: a confusion scrambling processing unit 405, scrambling the component content code input by the user into an unordered character string, thereby performing confusion confusion on the component content code; wherein the encoding processing unit 402 is configured to: The encoding algorithm is used to encode the data after the confusion is disturbed.
  • the decoding processing unit 403 is specifically configured to perform a decoding operation on the data content extracted from the database by using a decoding algorithm corresponding to the encoding algorithm.
  • the apparatus further includes: an exception capture unit 406 for performing an exception capture on the component content code input by the user; and removing the code having the exception from the component content code.
  • an exception capture unit 406 for performing an exception capture on the component content code input by the user; and removing the code having the exception from the component content code.
  • the present invention also provides a personalized component implementing apparatus.
  • FIG. 5 a structural diagram of a device for implementing a personalized component is shown.
  • the device includes:
  • the personalization component interface unit 501 is configured to customize the personalized component interface, and provide a personalized component interface to the user by exposing the API;
  • the code obtaining unit 502 is configured to receive, by using the personalized component interface, a component content code input by the user;
  • the encoding processing unit 503 is configured to perform a compiling process on the component content code to obtain a personalized component corresponding to the component content code input by the user.
  • the personalized component interface includes one or more of an HTML interface, a CSS interface, and a Javascript interface; the component content code includes one or more of HTML code, CSS code, and Javascript code.
  • the apparatus further includes: a confusion scrambling processing unit 504, scrambling the component content code input by the user into an unordered character string, thereby performing confusion confusion on the component content code; wherein the encoding processing unit 503 is configured to: The encoding algorithm is used to encode the data after the confusion is disturbed.
  • the decoding processing unit 505 is specifically configured to: when generating the page, extract the data content from the database pre-stored with the encoded data and perform decoding processing.
  • the device further comprises: an exception capture unit 506 for performing an exception capture on the component content code input by the user; and removing the code with the exception from the component content code.
  • an exception capture unit 506 for performing an exception capture on the component content code input by the user; and removing the code with the exception from the component content code.
  • the various component embodiments of the present invention may be implemented in hardware, or in a software module running on one or more processors, or in a combination thereof.
  • a microprocessor or digital signal processor may be used in practice to implement some or all of the functionality of some or all of the components of the user morphing control system in accordance with embodiments of the present invention.
  • the invention can also be implemented as a device or device program (e.g., a computer program and a computer program product) for performing some or all of the methods described herein.
  • a program implementing the invention may be stored on a computer readable medium or may be in the form of one or more signals. Such signals may be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

L'invention concerne un procédé et un dispositif de mise en œuvre de composant personnalisé. Le procédé consiste à : personnaliser une interface de composant personnalisé, et fournir l'interface de composant personnalisé à un utilisateur par exposition d'une API (S301) ; recevoir, au moyen de l'interface de composant personnalisé, un code de contenu de composant entré par l'utilisateur (S302) ; et effectuer un traitement de compilation sur le code de contenu de composant pour obtenir un composant personnalisé correspondant au code de contenu de composant entré par l'utilisateur (S303). Le procédé et le dispositif peuvent améliorer l'efficacité de la construction d'une page personnalisée et d'un site Web.
PCT/CN2017/107053 2017-03-30 2017-10-20 Procédé et dispositif de mise en œuvre de composant personnalisé WO2018176814A1 (fr)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710202608.6A CN107133029A (zh) 2017-03-30 2017-03-30 个性化组件实现方法及装置
CN201710202608.6 2017-03-30

Publications (1)

Publication Number Publication Date
WO2018176814A1 true WO2018176814A1 (fr) 2018-10-04

Family

ID=59716791

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/107053 WO2018176814A1 (fr) 2017-03-30 2017-10-20 Procédé et dispositif de mise en œuvre de composant personnalisé

Country Status (2)

Country Link
CN (1) CN107133029A (fr)
WO (1) WO2018176814A1 (fr)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107133029A (zh) * 2017-03-30 2017-09-05 武汉斗鱼网络科技有限公司 个性化组件实现方法及装置
CN107085515A (zh) * 2017-03-30 2017-08-22 武汉斗鱼网络科技有限公司 个性化页面生成方法及装置
CN109343856A (zh) * 2018-10-24 2019-02-15 北京奇虎科技有限公司 自定义算法组件的生成方法及装置
CN110597516B (zh) * 2019-08-27 2023-10-20 贝壳技术有限公司 插件化代码的混淆方法、装置、电子设备和存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090199163A1 (en) * 2008-01-31 2009-08-06 International Business Machines Corporation Debugger assistance for locating values at runtime
CN101526942A (zh) * 2008-03-05 2009-09-09 徐邦勇 在线、实时及自动生成动态网页的组件实现技术
CN104123133A (zh) * 2014-07-01 2014-10-29 曾安里 DragonVVP-VBF组件化开发框架平台工具系统
CN104699519A (zh) * 2015-04-03 2015-06-10 四川效率源信息安全技术有限责任公司 基于GDI+实现的结合C#类库的JavaScript脚本编辑器
CN107133029A (zh) * 2017-03-30 2017-09-05 武汉斗鱼网络科技有限公司 个性化组件实现方法及装置

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090199163A1 (en) * 2008-01-31 2009-08-06 International Business Machines Corporation Debugger assistance for locating values at runtime
CN101526942A (zh) * 2008-03-05 2009-09-09 徐邦勇 在线、实时及自动生成动态网页的组件实现技术
CN104123133A (zh) * 2014-07-01 2014-10-29 曾安里 DragonVVP-VBF组件化开发框架平台工具系统
CN104699519A (zh) * 2015-04-03 2015-06-10 四川效率源信息安全技术有限责任公司 基于GDI+实现的结合C#类库的JavaScript脚本编辑器
CN107133029A (zh) * 2017-03-30 2017-09-05 武汉斗鱼网络科技有限公司 个性化组件实现方法及装置

Also Published As

Publication number Publication date
CN107133029A (zh) 2017-09-05

Similar Documents

Publication Publication Date Title
US9582666B1 (en) Computer system for improved security of server computers interacting with client computers
RU2610254C2 (ru) Система и способ определения измененных веб-страниц
US10325097B2 (en) Static detection of context-sensitive cross-site scripting vulnerabilities
US10216488B1 (en) Intercepting and injecting calls into operations and objects
US8090959B2 (en) Method and apparatus for protecting .net programs
US9813440B1 (en) Polymorphic treatment of annotated content
Lin et al. Automated forensic analysis of mobile applications on Android devices
US9058489B2 (en) Marking documents with executable text for processing by computing systems
WO2018176814A1 (fr) Procédé et dispositif de mise en œuvre de composant personnalisé
EP2575069A2 (fr) Correction de la vulnérabilité de sécurité
US20140359586A1 (en) Programming Language with Extensions using a Strict Meta-Model
TW201003438A (en) Method and system to selectively secure the display of advertisements on web browsers
CN105580384A (zh) 触摸屏上显示的可操作内容
CN102663296A (zh) 面向网页JavaScript恶意代码的智能检测方法
KR20110087193A (ko) 실행 가능 텍스트를 포함하는 문서의 처리 장치 및 방법
US11301357B1 (en) Method to check application programming interface correctness in software
CN111753302B (zh) 检测代码漏洞的方法、装置、计算机可读介质及电子设备
US20170111431A1 (en) Methods for transforming a server side template into a client side template and devices thereof
WO2018176813A1 (fr) Procédé et dispositif de génération de page personnalisée
US20170300305A1 (en) Executable guidance experiences based on implicitly generated guidance models
WO2021120538A1 (fr) Appareil et procédé de balayage de code d'applet
CN102693238B (zh) Widget应用方法、系统及多媒体终端
CN111783019A (zh) 浏览器子页面创建方法、装置、计算机设备和存储介质
US8806457B2 (en) Deferred constant pool generation
CN110457869B (zh) 程序编译加密方法、装置、存储介质及电子设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17903036

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17903036

Country of ref document: EP

Kind code of ref document: A1

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载