Item request has been placed! ×
Item request cannot be made. ×
loading  Processing Request

Method and apparatus for generating dependence graph, device, storage medium and program product

Item request has been placed! ×
Item request cannot be made. ×
loading   Processing Request
  • Publication Date:
    August 06, 2024
  • معلومة اضافية
    • Patent Number:
      12056,492
    • Appl. No:
      17/780940
    • Application Filed:
      August 27, 2021
    • نبذة مختصرة :
      A method of generating a dependence graph, an apparatus, a device, a storage medium and a program product are provided. The method includes: obtaining a hook API used by a function component; obtaining a parameter value of the hook API used by the function component; and generating a dependence graph. The hook API corresponds to a hook node in the dependence graph, the parameter value corresponds to a value node in the dependence graph, and there is a connection relationship between the value node and a corresponding hook node.
    • Inventors:
      Beijing Baidu Netcom Science Technology Co., Ltd. (Beijing, CN)
    • Assignees:
      Beijing Baidu Netcom Science Technology Co., Ltd. (Beijing, CN)
    • Claim:
      1. A method of generating a dependence graph, comprising: obtaining a hook application programming interface (API) used by a function component; obtaining a parameter value of the hook API used by the function component; and generating the dependence graph, wherein the hook API corresponds to a hook node in the dependence graph, the parameter value of the hook API corresponds to a value node in the dependence graph, and there is a connection relationship between the value node and a corresponding hook node; wherein the method further comprises: in a case that the hook API used by the function component comprises a customized hook API, performing a recursive analysis on the customized hook API to obtain an atomic hook API directly; and in a case that there is a further hook API in addition to the atomic hook API obtained through the recursive analysis, obtaining a parameter value of the atomic hook API, and obtaining a parameter value of the further hook API in addition to the atomic hook API obtained through the recursive analysis, wherein the dependence graph further comprises: a hook node corresponding to the atomic hook API, a hook node corresponding to the further hook API, a value node corresponding to the parameter value of the atomic hook API and a value node corresponding to the parameter value of the further hook API, and there is a connection relationship between each value node and a corresponding hook node.
    • Claim:
      2. The method according to claim 1 , further comprising: in a case that the dependence graph comprises a target value node of a new identifier capable of being obtained through an expression, generating a value node corresponding to the new identifier in the dependence graph, and establishing a connection relationship between the target value node and the value node of the new identifier.
    • Claim:
      3. The method according to claim 1 , further comprising: obtaining an extensible markup language (XML) expression of a top level of the function component; generating a component node corresponding to the XML expression of the top level in the dependence graph; and in a case that the XML expression of the top level comprises a target XML expression referring to an identifier of a value node in the dependence graph, establishing a connection relationship between the target XML expression and a corresponding value node in the dependence graph.
    • Claim:
      4. The method according to claim 3 , wherein generating the component node corresponding to the XML expression of the top level in the dependence graph comprises: simplifying a syntax tree of the XML expression of the top level to obtain an XML expression of at least one predetermined level, and generating a component node corresponding to the XML expression of the at least one predetermined level in the dependence graph.
    • Claim:
      5. An electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor, wherein the memory is configured to store instructions executable by the at least one processor, and the instructions, when being executed by the at least one processor, cause the at least one processor to perform: obtaining a hook application programming interface (API) used by a function component; obtaining a parameter value of the hook API used by the function component; and generating the dependence graph, wherein the hook API corresponds to a hook node in the dependence graph, the parameter value of the hook API corresponds to a value node in the dependence graph, and there is a connection relationship between the value node and a corresponding hook node; wherein the instructions, when being executed by the at least one processor, cause the at least one processor to further perform: in a case that the hook API used by the function component comprises a customized hook API, performing a recursive analysis on the customized hook API to obtain an atomic hook API directly; and in a case that there is a further hook API in addition to the atomic hook API obtained through the recursive analysis, obtaining a parameter value of the atomic hook API, and obtaining a parameter value of the further hook API in addition to the atomic hook API obtained through the recursive analysis, wherein the dependence graph further comprises: a hook node corresponding to the atomic hook API, a hook node corresponding to the further hook API, a value node corresponding to the parameter value of the atomic hook API and a value node corresponding to the parameter value of the further hook API, and there is a connection relationship between each value node and a corresponding hook node.
    • Claim:
      6. The electronic device according to claim 5 , wherein the instructions, when being executed by the at least one processor, cause the at least one processor to further perform: in a case that the dependence graph comprises a target value node of a new identifier capable of being obtained through an expression, generating a value node corresponding to the new identifier in the dependence graph, and establishing a connection relationship between the target value node and the value node of the new identifier.
    • Claim:
      7. The electronic device according to claim 5 , wherein the instructions, when being executed by the at least one processor, cause the at least one processor to further perform: obtaining an extensible markup language (XML) expression of a top level of the function component; generating a component node corresponding to the XML expression of the top level in the dependence graph; and in a case that the XML expression of the top level comprises a target XML expression referring to an identifier of a value node in the dependence graph, establishing a connection relationship between the target XML expression and a corresponding value node in the dependence graph.
    • Claim:
      8. The electronic device according to claim 7 , wherein generating the component node corresponding to the XML expression of the top level in the dependence graph comprises: simplifying a syntax tree of the XML expression of the top level to obtain an XML expression of at least one predetermined level, and generating a component node corresponding to the XML expression of the at least one predetermined level in the dependence graph.
    • Claim:
      9. A non-transitory computer-readable storage medium, storing computer instructions, wherein the computer instructions, when being executed by a computer, cause the computer to perform: obtaining a hook application programming interface (API) used by a function component; obtaining a parameter value of the hook API used by the function component; and generating the dependence graph, wherein the hook API corresponds to a hook node in the dependence graph, the parameter value of the hook API corresponds to a value node in the dependence graph, and there is a connection relationship between the value node and a corresponding hook node; wherein the computer instructions, when being executed by the computer, cause the computer to further perform: in a case that the hook API used by the function component comprises a customized hook API, performing a recursive analysis on the customized hook API to obtain an atomic hook API directly; and in a case that there is a further hook API in addition to the atomic hook API obtained through the recursive analysis, obtaining a parameter value of the atomic hook API, and obtaining a parameter value of the further hook API in addition to the atomic hook API obtained through the recursive analysis, wherein the dependence graph further comprises: a hook node corresponding to the atomic hook API, a hook node corresponding to the further hook API, a value node corresponding to the parameter value of the atomic hook API and a value node corresponding to the parameter value of the further hook API, and there is a connection relationship between each value node and a corresponding hook node.
    • Claim:
      10. The storage medium according to claim 9 , wherein the computer instructions, when being executed by the computer, cause the computer to further perform: in a case that the dependence graph comprises a target value node of a new identifier capable of being obtained through an expression, generating a value node corresponding to the new identifier in the dependence graph, and establishing a connection relationship between the target value node and the value node of the new identifier.
    • Claim:
      11. The storage medium according to claim 9 , wherein the computer instructions, when being executed by the computer, cause the computer to further perform: obtaining an extensible markup language (XML) expression of a top level of the function component; generating a component node corresponding to the XML expression of the top level in the dependence graph; and in a case that the XML expression of the top level comprises a target XML expression referring to an identifier of a value node in the dependence graph, establishing a connection relationship between the target XML expression and a corresponding value node in the dependence graph.
    • Claim:
      12. The storage medium according to claim 11 , wherein generating the component node corresponding to the XML expression of the top level in the dependence graph comprises: simplifying a syntax tree of the XML expression of the top level to obtain an XML expression of at least one predetermined level, and generating a component node corresponding to the XML expression of the at least one predetermined level in the dependence graph.
    • Patent References Cited:
      5689711 November 1997 Bardasz et al.
      20140304305 October 2014 Hui
      20170242837 August 2017 Bauchot
      20200409780 December 2020 Balasubramanian
      20210026756 January 2021 Magnezi
      114637891 June 2002
      102054149 May 2011
      108037913 May 2018
      110928550 March 2020
      111045678 April 2020
      112925522 June 2021














    • Other References:
      English Translation of Japanese Office Action corresponding to Japanese Patent Application No. 2022-520829, dated Jul. 4, 2023 (3 pages). cited by applicant
      Japanese Office Action corresponding to Japanese Patent Application No. 2022-520829, dated Jul. 4, 2023 (3 pages). cited by applicant
      McFarlane, Timo. “Managing State in React Applications with Redux.” (2019). cited by applicant
      Extended European Search Report corresponding to European Patent Application No. 21893117.8, dated May 24, 2023 (10 pages). cited by applicant
      English Translation of International Search Report and Written Opinion corresponding to International Patent Application No. PCT/CN2021/115006, dated Dec. 2, 2021 (5 pages). cited by applicant
      International Search Report corresponding to International Patent Application No. PCT/CN2021/115006, dated Dec. 2, 2021 (9 pages). cited by applicant
      English Machine Translation of CN102054149A. (21 Pages). cited by applicant
      English Machine Translation of CN112925522A. (22 Pages). cited by applicant
      Zuo-Sai, You and Yong-Jun, Wang. (2012). The Research and Implementation of Mining Technology of Malware Behavior Dependence Graph Based on Dynamic Taint Analysis. A Thesis Submitted in Partial Fulfuillment of the Requirements for the Professional Degree of Master of Engineering in Software Engineering Graduate School of National University of Defense Technology. (63 Pages). cited by applicant
      English Translation of Zuo-Sai, You and Yong-Jun, Wang. (2012). The Research and Implementation of Mining Technology of Malware Behavior Dependence Graph Based on Dynamic Taint Analysis. A Thesis Submitted in Partial Fulfuillment of the Requirements for the Professional Degree of Master of Engineering in Software Engineering Graduate School of National University of Defense Technology. (63 Pages). cited by applicant
      English Machine Translation of CN108037913A. (26 Pages). cited by applicant
      English Machine Translation of CN110928550A. (18 Pages). cited by applicant
      English Machine Translation of CN111045678A. (21 Pages). cited by applicant
      English Translation of Korean Office Action corresponding to Korean Patent Application No. 10-2022-7029703, dated Jun. 28, 2024 (6 pages). cited by applicant
      Korean Office Action corresponding to Korean Patent Application No. 10-2022-7029703, dated Jun. 28, 2024 (5 pages). cited by applicant
    • Primary Examiner:
      Wu, Daxin
    • Attorney, Agent or Firm:
      Maginot, Moore & Beck LLP
    • الرقم المعرف:
      edspgr.12056492