A data processing method and device, electronic equipment and storage medium

By rendering the contact data of the instant messaging client in different browser environments and combining encryption and blockchain technologies, the problem of third-party application processes being unable to securely obtain contact information is solved, and the secure display and use of data is achieved.

CN113569166BActive Publication Date: 2026-05-15TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
TENCENT TECHNOLOGY (SHENZHEN) CO LTD
Filing Date
2020-04-29
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

In existing technologies, third-party application processes cannot obtain and display users' contact information without affecting the security of contact data, especially in different browser environments, which poses a risk of data leakage.

Method used

By acquiring contact list data from instant messaging clients in the first and second browser environments, the matching relationship between the browser environment and rendering requirements is determined. The data is then rendered in the third-party application process using a contact list information display component or a compatible rendering mode, while encryption and blockchain technologies are employed to ensure data security.

Benefits of technology

It enables normal use of third-party application processes in different browser environments, ensures that contact data cannot be transmitted to other third-party application processes, and guarantees the security of user data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113569166B_ABST
    Figure CN113569166B_ABST
Patent Text Reader

Abstract

The application provides a data processing method, comprising: acquiring first address book data borne by an instant messaging client in a first browser environment; acquiring second address book data borne by an instant messaging client in a second browser environment; determining a matching relationship between a browser environment where a third-party application process is located and a rendering requirement; rendering the acquired first address book data and second address book data through an address book information display component; and rendering the acquired first address book data and second address book data through a compatible rendering mode. The application also provides an apparatus, a server, a terminal, a system and a storage medium, which not only enable a third-party application process to acquire and display address book data, guaranteeing normal use of the third-party application process, but also ensure that address book data borne by an instant messaging client after rendering processing cannot be transmitted to other third-party application processes, guaranteeing data security of a user.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to information processing technology, and more particularly to data processing methods, apparatus, electronic devices, and storage media. Background Technology

[0002] Currently, the variety of third-party applications is increasing, and many communication software platforms are providing their platform capabilities for third-party applications to use, enabling these platforms to aggregate more service types. In related technologies, third-party applications need to establish a third-party account connection when integrating with various service platforms. However, during this process, if the third-party service provider application cannot access the user's contact information, it cannot use the appropriate components to display and access the user's contact information, nor can it ensure that this contact data cannot be obtained by other malicious third-party pages, thus affecting the security of the user's contact data. Summary of the Invention

[0003] In view of the above, embodiments of the present invention provide a data processing method, apparatus, electronic device, and storage medium. The technical solution of the embodiments of the present invention is implemented as follows:

[0004] This invention provides a data processing method, the method comprising:

[0005] Obtain the first contact list data carried by the instant messaging client in the first browser environment;

[0006] Obtain the second address book data carried by the instant messaging client in the second browser environment;

[0007] Determine the compatibility between the browser environment in which the third-party application process operates and the rendering requirements;

[0008] When the browser environment in which the third-party application process is located meets the rendering requirements, the first and second contact data obtained are rendered through the contact information display component.

[0009] When the browser environment in which the third-party application process is located does not meet the rendering requirements, the first and second contact data are rendered using a compatible rendering mode.

[0010] The rendered first contact data and second contact data are output through the third-party application process.

[0011] This invention also provides a data processing apparatus, characterized in that the apparatus comprises:

[0012] The information transmission module is used to obtain the first address book data carried by the instant messaging client in the first browser environment;

[0013] The information transmission module is used to acquire the second address book data carried by the instant messaging client in the second browser environment;

[0014] The information processing module is used to determine the matching relationship between the browser environment in which the third-party application process is located and the rendering requirements.

[0015] The information processing module is used to render the first contact data and the second contact data obtained through the contact information display component when the browser environment in which the third-party application process is located meets the rendering requirements.

[0016] The information processing module is used to render the first contact data and the second contact data obtained through a compatible rendering mode when the browser environment in which the third-party application process is located does not meet the rendering requirements.

[0017] The information processing module is used to output the rendered first contact data and the second contact data through the third-party application process.

[0018] In the above scheme,

[0019] The information processing module is used to inject corresponding first function code into the embedded browser component of the instant messaging client, so as to save the application interface of the first browser in the sandbox process of the instant messaging client.

[0020] The information processing module is used to detect the third-party application process and the user information corresponding to the instant messaging client;

[0021] The information processing module is used to obtain the first address book data carried by the instant messaging client when the user information corresponding to the third-party application process and the instant messaging client passes the verification.

[0022] In the above scheme,

[0023] The information processing module is used to inject a first random string into the first function code and the instant messaging client sandbox process;

[0024] The information processing module is used to determine whether the first function code and the first random string in the instant messaging client sandbox process are the same when the first function code is in the execution state, so as to determine the running state of the instant messaging client sandbox process.

[0025] In the above scheme,

[0026] The information processing module is used to inject a second random string into the first functional code;

[0027] The information processing module is used to determine whether the real-time second random string in the first function code is the same as the injected second random string when the first address book data carried by the instant messaging client is obtained, so as to determine the security status of the corresponding address book information display component.

[0028] In the above scheme,

[0029] The information processing module is used to generate a decryption key based on the user's login status information through an instant messaging client server and inject the decryption key into the second function code;

[0030] The information processing module is used to send the contact identification information to be retrieved to the communication client server through the contact information display component;

[0031] The information processing module is used by the real-time communication client server to generate an encryption key based on the user's login status information, and to encrypt the second address book data to be sent using the encryption key;

[0032] The information processing module is used by the third-party application process to decrypt the encrypted second contact data using the decryption key, so as to obtain the corresponding second contact data.

[0033] In the above scheme,

[0034] The information processing module is used to bind the third-party application process to the instant messaging client, so that the third-party application process can obtain the software development kit corresponding to the instant messaging client.

[0035] In the above scheme,

[0036] The information processing module is configured to, when the browser environment in which the third-party application process resides supports the shadow document object model...

[0037] The information processing module is used to create corresponding shadow data objects through the address book information display component;

[0038] The information processing module is used to render the first contact data and the second contact data into the shadow data object using hidden hypertext markup language, so as to display the first contact data and the second contact data through the shadow data object.

[0039] In the above scheme,

[0040] The information processing module is used to trigger the inline framework initialization process when the browser environment in which the third-party application process is located does not meet the rendering requirements.

[0041] The information processing module is used to create new inline frame elements based on the inline frame initialization process, and to determine the content that the rendering frame needs to render through the posting function of the application interface.

[0042] The information processing module is used to configure the first contact data and the second contact data in a temporary information storage object;

[0043] The information processing module is used to render the first contact data and the second contact data in the temporary information storage object through the rendering framework.

[0044] In the above scheme, the device further includes:

[0045] The storage module is used to send the first contact list data, the second contact list data, and the third-party application process identifier to the blockchain network, so that...

[0046] The nodes of the blockchain network fill the first address book data, the second address book data, and the third-party application process identifier into a new block, and when there is a consensus on the new block, the new block is appended to the end of the blockchain.

[0047] In the above scheme,

[0048] The storage module is used to receive data synchronization requests from other nodes in the blockchain network;

[0049] The storage module is used to verify the permissions of the other nodes in response to the data synchronization request;

[0050] The storage module is used to control the data synchronization between the current node and the other nodes when the permissions of the other nodes are verified, so as to enable the other nodes to obtain the first contact data, the second contact data, and the third-party application process identifier.

[0051] In the above scheme,

[0052] The storage module is used to parse the query request in response to the query request to obtain the corresponding object identifier;

[0053] The storage module is used to obtain permission information within the target block in the blockchain network based on the object identifier;

[0054] The storage module is used to verify the matching between the permission information and the object identifier;

[0055] The storage module is used to obtain the corresponding address book data and the target object that matches the filtering conditions in the blockchain network when the permission information matches the object identifier.

[0056] The storage module is used to respond to the query command by pushing the acquired resource transaction data and the target objects that match the filtering conditions to the corresponding client, so that the client can obtain the corresponding resource transaction data and the target objects that match the filtering conditions stored in the blockchain network.

[0057] This invention also provides a terminal, the terminal comprising:

[0058] Memory, used to store executable instructions;

[0059] A processor, when executing executable instructions stored in the memory, implements a preceding data processing method.

[0060] This invention also provides a computer-readable storage medium storing executable instructions, which, when executed by a processor, implement a preceding data processing method.

[0061] The embodiments of the present invention have the following beneficial effects:

[0062] This invention, through its embodiments, acquires first contact data carried by an instant messaging client in a first browser environment; acquires second contact data carried by the same instant messaging client in a second browser environment; determines the matching relationship between the browser environment of the third-party application process and the rendering requirements; when the browser environment of the third-party application process meets the rendering requirements, it renders the acquired first and second contact data through a contact information display component; when the browser environment of the third-party application process does not meet the rendering requirements, it renders the acquired first and second contact data through a compatible rendering mode; and outputs the rendered first and second contact data through the third-party application process. Thus, not only can the third-party application process obtain and display contact data carried by instant messaging clients in different browser environments, ensuring the normal use of the third-party application process, but also the contact data carried by the rendered instant messaging client cannot be transmitted to other third-party application processes, ensuring user data security. Attached Figure Description

[0063] Figure 1 This is a schematic diagram illustrating a use case of the data processing method provided in an embodiment of the present invention;

[0064] Figure 2 This is a schematic diagram of the composition structure of the data processing device provided in an embodiment of the present invention;

[0065] Figure 3 An optional flowchart illustrating the data processing method provided in an embodiment of the present invention;

[0066] Figure 4 An optional flowchart illustrating the data processing method provided in an embodiment of the present invention;

[0067] Figure 5 This is a schematic diagram of the architecture of the target object determination device 100 provided in an embodiment of the present invention;

[0068] Figure 6 This is a schematic diagram of the blockchain structure in the blockchain network 200 provided in this embodiment of the invention;

[0069] Figure 7 This is a schematic diagram of the functional architecture of the blockchain network 200 provided in an embodiment of the present invention;

[0070] Figure 8 This is a schematic diagram illustrating the usage environment of WeChat for Business and third-party application processes in an embodiment of the present invention;

[0071] Figure 9A This is a schematic diagram illustrating the binding of WeChat Work and third-party application processes in an embodiment of the present invention;

[0072] Figure 9B This is a schematic diagram illustrating data exchange between WeChat Work and third-party application processes in an embodiment of the present invention;

[0073] Figure 10 This is a schematic diagram illustrating the working process of the data processing method provided in the embodiments of the present invention;

[0074] Figure 11 This is a schematic diagram of the enterprise WeChat browser environment display interface provided in an embodiment of the present invention;

[0075] Figure 12 This is a schematic diagram illustrating the working process of the data processing method in WeChat for Enterprise provided in an embodiment of the present invention;

[0076] Figure 13 This is a schematic diagram illustrating the working process of the data processing method in WeChat for Enterprise provided in an embodiment of the present invention;

[0077] Figure 14 This is a schematic diagram illustrating the rendering of contact information in the third-party application process of WeChat for Enterprise, as provided in this embodiment of the invention. Detailed Implementation

[0078] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings. The described embodiments should not be regarded as limitations on this invention. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.

[0079] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0080] Before providing a further detailed description of the embodiments of the present invention, the nouns and terms involved in the embodiments of the present invention will be explained, and the nouns and terms involved in the embodiments of the present invention shall be interpreted as follows.

[0081] 1) Contact data: Data saved in the contact list of the user in the instant messaging client, including contact names (nicknames), instant messaging identifiers, and other information.

[0082] 2) Terminals, including but not limited to: ordinary terminals and dedicated terminals, wherein the ordinary terminals maintain a long connection and / or a short connection with the transmission channel, and the dedicated terminals maintain a long connection with the transmission channel.

[0083] 3) Client: The carrier that implements specific functions in the terminal. For example, a mobile client (APP) is a carrier of specific functions in a mobile terminal, such as performing online live streaming or playing online videos.

[0084] 4) In response to, used to indicate the conditions or states on which the operation performed depends. When the conditions or states on which it depends are met, one or more operations performed may be performed in real time or with a set delay. Unless otherwise specified, there is no restriction on the order in which the multiple operations are performed.

[0085] 5) A mini program is a type of application developed using a front-end-oriented language (such as JavaScript) and running services within Hyper Text Markup Language (HTML) pages. It is downloaded by a client (such as a browser or any client with an embedded browser engine) via a network (such as the internet) and interpreted and executed within the client's browser environment, saving the steps of installation on the client side. For example, mini programs that provide various services such as airline ticket purchases and transit QR codes can be downloaded and run on social networking clients.

[0086] 6) Runtime environment, the engine used to interpret and execute code. For example, for the runtime environment of a mini-program, it could be JavaScript Core on the iOS platform or X5 JS Core on the Android platform.

[0087] 7) Rendering environment, which is the control used to render the view. For example, for the rendering environment of a mini program, it can be WKWebView on the iOS platform or X5 (based on Chrome 53 / 57 kernel) on the Android platform.

[0088] 8) Components are functional modules of the view in a mini-program, also known as front-end components. They include buttons, titles, tables, sidebars, content, and footers on the page. Components include modular code so that they can be reused in different pages of the mini-program.

[0089] 9) Third-party application processes are components developed for instant messaging clients based on third-party development frameworks (such as the Vue framework) and that can be used by instant messaging clients.

[0090] 10) Transaction, equivalent to the computer term "transaction", includes operations that need to be submitted to the blockchain network for execution. It does not refer solely to transactions in a business context. Given that the term "transaction" is conventionally used in blockchain technology, this embodiment of the invention follows this convention.

[0091] For example, a Deploy transaction is used to install a specified smart contract on a node in the blockchain network and prepare it for invocation; an Invoke transaction is used to append a record of a transaction to the blockchain by invoking a smart contract and to operate on the blockchain's state database, including update operations (including adding, deleting, and modifying key-value pairs in the state database) and query operations (i.e., querying key-value pairs in the state database).

[0092] 11) Blockchain is an encrypted, chain-like storage structure for transactions formed by blocks.

[0093] For example, the header of each block can include the hash values ​​of all transactions in the block, as well as the hash values ​​of all transactions in the previous block, thereby preventing tampering and forgery of transactions in the block based on hash values; newly generated transactions are filled into the block and, after consensus among nodes in the blockchain network, are appended to the tail of the blockchain, thus forming a chain-like growth.

[0094] 12) A blockchain network is a collection of nodes that incorporate new blocks into a blockchain through consensus.

[0095] 13) Ledger is a collective term for blockchain (also known as ledger data) and the state database synchronized with the blockchain.

[0096] In this context, the blockchain records transactions in the form of files in a file system; the state database records transactions in the blockchain in the form of key-value pairs of different types, which is used to support fast querying of transactions in the blockchain.

[0097] 14) Smart Contracts, also known as chain code or application code, are programs deployed in nodes of a blockchain network. Nodes execute smart contracts called in received transactions to update or query key-value pairs in the ledger database.

[0098] 15) Consensus is a process in a blockchain network used to reach an agreement on transactions in a block among multiple involved nodes. A block that reaches an agreement is appended to the end of the blockchain. Mechanisms for achieving consensus include Proof of Work (PoW), Proof of Stake (PoS), Delegated Proof-of-Stake (DPoS), and Proof of Elapsed Time (PoET).

[0099] Figure 1 This is a schematic diagram illustrating a use case of the data processing method provided in an embodiment of the present invention. See also: Figure 1 The terminals (including terminals 10-1 and 10-2) are equipped with software clients capable of performing instant messaging functions, such as WeChat for Business, WeChat for Personal Use, or the client or plugin of the chat software QQ. Users can perform corresponding communication functions through the corresponding clients, and trigger different third-party application processes during the operation of the instant messaging client (such as WeChat Pay or the process of purchasing items using funds in WeChat). The terminals are connected to the server 200 through network 300, which can be a wide area network, a local area network, or a combination of both, and data transmission is achieved using a wireless link.

[0100] As an example, server 200 is used to deploy the data processing device to implement the data processing method provided by the present invention, which involves: acquiring first contact data carried by an instant messaging client in a first browser environment; acquiring second contact data carried by the instant messaging client in a second browser environment; determining the matching relationship between the browser environment of the third-party application process and the rendering requirements; when the browser environment of the third-party application process meets the rendering requirements, rendering the acquired first contact data and second contact data through a contact information display component; when the browser environment of the third-party application process does not meet the rendering requirements, rendering the acquired first contact data and second contact data through a compatible rendering mode; and outputting the rendered first contact data and second contact data through the third-party application process.

[0101] Of course, the data processing device provided by the present invention can be applied to environments where virtual resources are used for financial activities or payment through virtual resources (including but not limited to various types of virtual resource change environments) or information interaction through social software. In the process of social communication activities, financial activities or payment through virtual resources, different third-party application processes are usually used to process the contact data obtained in different browser environments. Finally, the processing results based on the contact data are presented on the user interface (UI) through the third-party application process.

[0102] The process of outputting rendered first and second contact data via a data processing device specifically includes: acquiring the first contact data carried by an instant messaging client in a first browser environment; acquiring the second contact data carried by the instant messaging client in a second browser environment; determining the matching relationship between the browser environment of the third-party application process and the rendering requirements; when the browser environment of the third-party application process meets the rendering requirements, rendering the acquired first and second contact data through a contact information display component; when the browser environment of the third-party application process does not meet the rendering requirements, rendering the acquired first and second contact data through a compatible rendering mode; and outputting the rendered first and second contact data through the third-party application process.

[0103] The structure of the data processing device according to an embodiment of the present invention will be described in detail below. The data processing device can be implemented in various forms, such as a dedicated terminal with data processing device processing function, or a server equipped with data processing device processing function, for example, the preceding... Figure 1 Server 200. Figure 2 This is a schematic diagram of the composition structure of the data processing device provided in the embodiments of the present invention. It can be understood that... Figure 2 Only an exemplary structure of the data processing device is shown, not the entire structure; it can be implemented as needed. Figure 2 The structure shown may be part or all of the structure.

[0104] The data processing apparatus provided in this embodiment of the invention includes at least one processor 201, a memory 202, a user interface 203, and at least one network interface 204. The various components in the data processing apparatus are coupled together via a bus system 205. It is understood that the bus system 205 is used to implement communication between these components. In addition to a data bus, the bus system 205 also includes a power bus, a control bus, and a status signal bus. However, for clarity, in… Figure 2 The general labeled all buses as Bus System 205.

[0105] The user interface 203 may include a monitor, keyboard, mouse, trackball, click wheel, buttons, touchpad, or touch screen.

[0106] It is understood that memory 202 can be volatile memory or non-volatile memory, or both. In this embodiment of the invention, memory 202 is capable of storing data to support the operation of a terminal (such as 10-1). Examples of this data include any computer programs used to operate on the terminal (such as 10-1), such as operating systems and applications. The operating system includes various system programs, such as the framework layer, core library layer, driver layer, etc., used to implement various basic services and handle hardware-based tasks. Applications can include various applications.

[0107] In some embodiments, the data processing apparatus provided by the present invention can be implemented using a combination of hardware and software. For example, the data processing apparatus provided by the present invention can be a processor in the form of a hardware decoding processor, which is programmed to execute the data processing method provided by the present invention. For instance, the processor in the form of a hardware decoding processor can employ one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), or other electronic components.

[0108] As an example of the data processing device provided in this embodiment of the invention, which is implemented by combining software and hardware, the data processing device provided in this embodiment of the invention can be directly embodied as a combination of software modules executed by processor 201. The software modules can be located in a storage medium, which is located in memory 202. Processor 201 reads the executable instructions included in the software modules in memory 202 and combines them with necessary hardware (e.g., including processor 201 and other components connected to bus 205) to complete the data processing method provided in this embodiment of the invention.

[0109] As an example, processor 201 can be an integrated circuit chip with signal processing capabilities, such as a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc., wherein the general-purpose processor can be a microprocessor or any conventional processor, etc.

[0110] As an example of the hardware implementation of the data processing device provided in the embodiments of the present invention, the device provided in the embodiments of the present invention can be directly executed by a processor 201 in the form of a hardware decoding processor. For example, it can be executed by one or more application specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), or other electronic components to implement the data processing method provided in the embodiments of the present invention.

[0111] In this embodiment of the invention, the memory 202 is used to store various types of data to support the operation of the data processing device. Examples of such data include: any executable instructions for operation on the data processing device, such as executable instructions, in which a program implementing the data processing method of this embodiment of the invention may be included.

[0112] In other embodiments, the data processing apparatus provided in this invention can be implemented in software. Figure 2A data processing device stored in memory 202 is shown. This device can be software in the form of programs and plug-ins, and includes a series of modules. As an example of a program stored in memory 202, it may include the data processing device. The data processing device includes the following software modules: an information transmission module 2081 and an information processing module 2082. When the software modules in the data processing device are read into RAM and executed by processor 201, the data processing method provided in this embodiment of the invention will be implemented. The functions of each software module in the data processing device include:

[0113] Information transmission module 2081 is used to obtain the first address book data carried by the instant messaging client in the first browser environment;

[0114] The information transmission module 2081 is used to obtain the second address book data carried by the instant messaging client in the second browser environment.

[0115] Information processing module 2082 is used to determine the matching relationship between the browser environment in which the third-party application process is located and the rendering requirements;

[0116] The information processing module 2082 is used to render the first contact data and the second contact data obtained through the contact information display component when the browser environment in which the third-party application process is located meets the rendering requirements.

[0117] The information processing module 2082 is used to render the acquired first contact data and second contact data through a compatible rendering mode when the browser environment in which the third-party application process is located does not meet the rendering requirements.

[0118] The information processing module 2082 is used to output the rendered first contact data and the second contact data through the third-party application process.

[0119] Combination Figure 2 The data processing apparatus 20 shown illustrates the data processing method provided in the embodiments of the present invention. See also: Figure 3 , Figure 3 This is an optional flowchart illustrating the data processing method provided in an embodiment of the present invention. It can be understood that... Figure 3 The steps shown can be performed by various electronic devices running the data processing device 20, such as mobile phones or tablets with data processing capabilities.

[0120] Before introducing the data processing method provided by this invention, the relevant data processing process of instant messaging clients (such as WeChat for Business) will first be introduced. In instant messaging clients, address book data is the core data of the platform, and the relevant technologies include the following processing strategies:

[0121] 1) Distinguish between sensitive and non-sensitive data. Sensitive data is not allowed to be accessed by third parties, and no other means are provided for third parties to use it externally; non-sensitive data is allowed to be accessed, with the security of data usage only emphasized in the access specifications. For example, in early third-party enterprise WeChat platforms, user phone numbers were sensitive data, and third parties could not access or use this information; while usernames, as non-sensitive data, were allowed to be accessed by third-party interfaces and saved to local servers. The drawback is that if data access is restricted but third-party use is not allowed, especially when commonly used fields are restricted, the functionality of third parties will be limited, thus affecting the user experience. For example, user name access may be restricted, but almost all third-party applications use this field for display.

[0122] 2) Allowing third parties to access data while requiring storage on a designated server, and imposing network policy restrictions on that server to prevent data leakage. For example, service providers integrating with DingTalk require all their services to be deployed on DingTalk Cloud. The drawback is that requiring data to be deployed on a designated server raises the barrier to entry for third parties, especially those already providing services, as it involves data migration and other related tasks. Furthermore, network policy restrictions on the server are insufficient to effectively prevent data leakage; for instance, a third-party page could directly upload the data to other external servers.

[0123] 3) While disallowing third-party access to the data, it provides components for third-party display. For example, WeChat Mini Programs offer the `open-data` component to display data open to WeChat. Its drawback is that it must be built on the Mini Program framework, and most service provider applications on WeChat Work are currently H5 applications, which doesn't cover the required scenarios. Therefore, neither method allows third-party application processes to access users' contact information while simultaneously ensuring the data security of that information.

[0124] The following is about Figure 3 The steps shown are explained.

[0125] Step 301: Obtain the first address book data carried by the instant messaging client in the first browser environment.

[0126] Specifically, by acquiring the first contact list data carried by the communication client, the third-party application process can be bound to the instant messaging client. This allows the third-party application process to access the software development kit (SDK) corresponding to the instant messaging client, reducing the detection time for the third-party application process when it is triggered. Specifically, based on the contact list usage scope and permissions authorized by the instant messaging client, the third-party application process can obtain this information through the instant messaging client's API interface. The third-party application process can establish a link with the instant messaging client in the form of a mini-program. Therefore, when a user triggers the third-party application process through the instant messaging client, they can log in using their current user identifier without entering an account and password.

[0127] In some embodiments of the present invention, obtaining the first contact data carried by the instant messaging client in the first browser environment can be achieved in the following ways:

[0128] A first functional code is injected into the embedded browser component of the instant messaging client to store the application programming interface (API) of the first browser in the instant messaging client sandbox process. The user information corresponding to the third-party application process and the instant messaging client is detected. When the user information corresponding to the third-party application process and the instant messaging client passes verification, the first contact data carried by the instant messaging client is obtained. Specifically, when obtaining the first contact data carried by the instant messaging client, a first random string is also injected into the first functional code and the instant messaging client sandbox process. When the first functional code is in the execution state, it is determined whether the first random string in the first functional code and the instant messaging client sandbox process are the same, thereby determining the running state of the instant messaging client sandbox process. Taking the instant messaging client of WeChat Work as an example, before the third-party application process page loads, JS code wwsandbox.js is injected into the embedded browser component. This JS saves the browser API to be used by the contact information display component to a read-only global object, WeChat Sandbox (WeixinSandBox), to ensure the isolation of the runtime environment and improve the security of data processing.

[0129] Furthermore, in some embodiments of the present invention, the data processing method further includes:

[0130] A second random string is injected into the first functional code. When the first contact data carried by the instant messaging client is obtained, it is determined whether the real-time second random string in the first functional code is the same as the injected second random string to determine the security status of the corresponding contact information display component. Since contact data can only be returned by calling a global JS callback, the terminal needs to inject a new random string before injecting wwopendata.js. During data callback, it is necessary to determine whether the random string on the component and the injected random string are equal. If they are equal, it is considered that the component has not been hijacked or replaced, and the data callback function can be called to further ensure user data security.

[0131] Step 302: Obtain the second address book data carried by the instant messaging client in the second browser environment.

[0132] In some embodiments of the present invention, obtaining the second contact data carried by the instant messaging client in the second browser environment can be achieved in the following ways:

[0133] The instant messaging client server generates a decryption key based on the user's login status information and injects the decryption key into the second function code. The address book information display component sends the address book identification information to be retrieved to the instant messaging client server. The instant messaging client server generates an encryption key based on the user's login status information and encrypts the second address book data to be sent using the encryption key. The third-party application process decrypts the encrypted second address book data based on the decryption key to obtain the corresponding second address book data. Since the user identity verification method differs from that in a browser environment not built into an instant messaging client, and the data retrieval is not supported by the client, the data security risk is higher. Therefore, encrypting the user's address book data effectively ensures that user data cannot be obtained by malicious third-party application processes.

[0134] Step 303: Determine the matching relationship between the browser environment in which the third-party application process is located and the rendering requirements.

[0135] Step 304: When the browser environment where the third-party application process is located meets the rendering requirements, the first contact data and the second contact data are rendered through the contact information display component.

[0136] Step 305: When the browser environment in which the third-party application process is located does not meet the rendering requirements, the first contact data and the second contact data are rendered using a compatible rendering mode.

[0137] The compatible rendering mode is configured to support different types of browsers in rendering data in the environment. Specifically, due to differences in browser versions and compilation languages, not all browsers can support the shadow document object model. Through the compatible rendering mode, data can be rendered even for browsers that cannot support the shadow document object model, without needing to insert a DOM element subtree into the DOM structure when the browser renders the document or data. This ensures that the data processing method proposed in this application can be applied in different browser environments.

[0138] In some embodiments of the present invention, when the browser environment in which the third-party application process resides meets the rendering requirements, the first and second contact data obtained are rendered through the contact information display component. This can be achieved in the following ways:

[0139] When the browser environment in which the third-party application process resides supports the Shadow Document Object Model, a corresponding shadow data object is created through the address book information display component; the first address book data and the second address book data are rendered into the shadow data object through the hidden hypertext markup language, so as to display the first address book data and the second address book data through the shadow data object.

[0140] Step 306: Output the rendered first contact data and second contact data through the third-party application process.

[0141] Continue to combine Figure 2 The data processing apparatus 20 shown illustrates the data processing method provided in the embodiments of the present invention. See also: Figure 4 , Figure 4 This is an optional flowchart illustrating the data processing method provided in an embodiment of the present invention. It can be understood that... Figure 4 The steps shown can be performed by various electronic devices running the data processing device 20, such as mobile phones or tablets with data processing capabilities. The following section addresses... Figure 4 The steps shown are explained.

[0142] Step 401: When the browser environment in which the third-party application process is located does not meet the rendering requirements, the inline frame initialization process is triggered;

[0143] Step 402: Create new inline frame elements based on the inline frame initialization process, and determine the content to be rendered by the rendering frame through the posting function of the application interface.

[0144] Step 403: Configure the first contact data and the second contact data in a temporary information storage object;

[0145] Step 404: Render the first contact data and the second contact data in the temporary information storage object using the rendering framework.

[0146] In some embodiments of the present invention, the data processing method further includes:

[0147] The first contact list data, the second contact list data, and the third-party application process identifier are sent to the blockchain network so that the nodes of the blockchain network fill the first contact list data, the second contact list data, and the third-party application process identifier into a new block, and when there is a consensus on the new block, the new block is appended to the end of the blockchain.

[0148] In this invention, embodiments can be implemented using cloud technology. Cloud technology refers to a hosting technology that unifies hardware, software, and network resources within a wide area network (WAN) or local area network (LAN) to achieve data computation, storage, processing, and sharing. It can also be understood as a general term for network technologies, information technologies, integration technologies, management platform technologies, and application technologies based on cloud computing business models. The backend services of network systems require substantial computing and storage resources, such as video websites, image websites, and many portal websites; therefore, cloud technology needs cloud computing as its support.

[0149] It's important to note that cloud computing is a computing model that distributes computing tasks across a resource pool comprised of numerous computers, enabling various application systems to access computing power, storage space, and information services as needed. The network providing these resources is called the "cloud." From the user's perspective, resources in the "cloud" are infinitely scalable, readily available, and can be used on demand, expanded at any time, and paid for based on usage. As the foundational providers of cloud computing capabilities, they establish cloud resource pool platforms, often referred to as cloud platforms or Infrastructure as a Service (IaaS). These platforms deploy various types of virtual resources within the resource pool for external customers to choose from. The cloud resource pool primarily includes: computing devices (which can be virtualized machines containing operating systems), storage devices, and network devices.

[0150] Combined with the preceding sequence Figure 1As shown, the data processing method provided in this embodiment of the invention can be implemented through corresponding cloud devices. For example, terminals (including terminals 10-1 and 10-2) connect to a server 200 located in the cloud via a network 300. The network 300 can be a wide area network (WAN), a local area network (LAN), or a combination of both. It is worth noting that the server 200 can be a physical device or a virtualized device.

[0151] In some embodiments of the present invention, the data processing method further includes:

[0152] Receive data synchronization requests from other nodes in the blockchain network; in response to the data synchronization requests, verify the permissions of the other nodes; when the permissions of the other nodes are verified, control the current node to synchronize data with the other nodes, so that the other nodes can obtain the first address book data, the second address book data, and the third-party application process identifier.

[0153] In some embodiments of the present invention, the data processing method further includes:

[0154] In response to a query request, the system parses the query request to obtain the corresponding object identifier; based on the object identifier, it obtains the permission information within the target block in the blockchain network; it verifies the matching between the permission information and the object identifier; when the permission information matches the object identifier, it obtains the corresponding address book data and the target object matching the filtering conditions in the blockchain network; in response to the query instruction, it pushes the obtained corresponding resource transaction data and the target object matching the filtering conditions to the corresponding instant messaging client, so that the instant messaging client can obtain the corresponding resource transaction data and the target object matching the filtering conditions stored in the blockchain network, and realize the data migration of the same user's address book data between different terminals (instant messaging clients).

[0155] See Figure 5 , Figure 5 This is a schematic diagram of the architecture of the target object determination device 100 provided in the embodiment of the present invention, including a blockchain network 200 (consensus nodes 210-1 to 210-3 are shown as examples), an authentication center 300, a business entity 400 and a business entity 500, which will be described below.

[0156] The types of blockchain networks 200 are flexible and diverse, and can be any of the following: public blockchain, private blockchain, or consortium blockchain. Taking a public blockchain as an example, electronic devices of any business entity, such as user terminals and servers, can access the blockchain network 200 without authorization. Taking a consortium blockchain as an example, after obtaining authorization, the electronic devices (such as terminals / servers) under the business entity can access the blockchain network 200, at which point they become client nodes in the blockchain network 200.

[0157] In some embodiments, client nodes may act only as observers of the blockchain network 200, providing support for business entities to initiate transactions (e.g., for storing data on-chain or querying on-chain data). For the functions of the consensus nodes 210 of the blockchain network 200, such as sorting, consensus services, and ledger functions, client nodes may implement them by default or selectively (e.g., depending on the specific business needs of the business entity). This allows for the maximum migration of business entity data and business processing logic to the blockchain network 200, achieving trustworthiness and traceability of data and business processing through the blockchain network 200.

[0158] Consensus nodes in blockchain network 200 receive data from different business entities (e.g.) Figure 1 The client nodes of business entities 400 and 500 shown in the figure (e.g., Figure 1 Transactions submitted by client node 410 belonging to business entity 400 and client node 510 belonging to system 500 of electronic device (shown in the figure) are executed to update or query the ledger. Various intermediate or final results of the execution of the transactions can be returned to the client node of the business entity for display.

[0159] For example, client nodes 410 / 510 can subscribe to events of interest in the blockchain network 200, such as transactions occurring in a specific organization / channel within the blockchain network 200. Consensus node 210 then pushes the corresponding transaction notifications to client nodes 410 / 510, thereby triggering the corresponding business logic in client nodes 410 / 510.

[0160] The following example illustrates an exemplary application of blockchain networks, using the example of multiple business entities accessing a blockchain network to manage the determination of target objects.

[0161] See Figure 5The management process involves multiple business entities, such as business entity 400 (which could be an AI-based target object determination device) and business entity 500 (which could be a display system with target object determination functionality). Each entity registers with certification authority 300 to obtain its own digital certificate. The digital certificate includes the business entity's public key and a digital signature from certification authority 300 on the business entity's public key and identity information. This digital signature, along with the business entity's digital signature for the transaction, is attached to the transaction and sent to the blockchain network. The blockchain network retrieves the digital certificate and signature from the transaction to verify the message's reliability (i.e., whether it has been tampered with) and the identity information of the business entity that sent the message. The blockchain network verifies the identity, such as whether the entity has the authority to initiate the transaction. Clients running on electronic devices (e.g., terminals or servers) under the business entities can request access to the blockchain network 200 and become client nodes.

[0162] The client node 410 of the business entity 400 is used to acquire resource transaction data corresponding to different objects; determine the level information of the different objects based on the resource transaction data, and determine the base object among the different objects based on the level information; determine the difference feature vector matching the different objects based on the resource transaction data; determine the association network between the different objects based on the difference feature vector matching the different objects; determine the clustering result of the association network between the different objects in response to the base object; determine the target object matching the base object among the different objects based on the clustering result of the association network between the different objects and the corresponding level information, and send the first address book data, the second address book data and the third-party application process identifier to the blockchain network 200.

[0163] The process of sending the first contact list data, the second contact list data, and the third-party application process identifier to the blockchain network 200 can be pre-configured on the client node 410 using business logic. When a corresponding target object determination result is formed, the client node 410 automatically sends the first contact list data, the second contact list data, and the third-party application process identifier to the blockchain network 200. Alternatively, business personnel from the business entity 400 can log in to the client node 410 and manually package the first contact list data, the second contact list data, and the third-party application process identifier, and send them to the blockchain network 200. During transmission, the client node 410 generates a corresponding update operation transaction based on the first contact list data, the second contact list data, and the third-party application process identifier. The transaction specifies the smart contract to be invoked to implement the update operation and the parameters to be passed to the smart contract. The transaction also carries the client node 410's digital certificate and a signed digital signature (e.g., obtained by encrypting the transaction digest using the private key in the client node 410's digital certificate), and broadcasts the transaction to the consensus node 210 in the blockchain network 200.

[0164] When consensus node 210 in blockchain network 200 receives a transaction, it verifies the digital certificate and digital signature carried in the transaction. If the verification is successful, it confirms whether business entity 400 has the authority to conduct the transaction based on the identity of the business entity 400 carried in the transaction. Either verification of the digital signature or the authorization will cause the transaction to fail. After successful verification, node 210 signs its own digital signature (e.g., by encrypting the transaction digest using node 210-1's private key) and continues broadcasting it within blockchain network 200.

[0165] After receiving a successfully verified transaction, consensus node 210 in blockchain network 200 populates the transaction into a new block and broadcasts it. When broadcasting a new block, consensus node 210 in blockchain network 200 performs a consensus process on the new block. If the consensus is successful, the new block is appended to the end of its stored blockchain, and the state database is updated according to the transaction results. The transactions in the new block are then executed: for transactions that submit updates to the first contact list data, the second contact list data, and the third-party application process identifier, key-value pairs including the first contact list data, the second contact list data, and the third-party application process identifier are added to the state database.

[0166] Business personnel of business entity 500 log in to client node 510, input the target object determination result or target object query request, and client node 510 generates a corresponding update operation / query operation transaction based on the target object determination result or target object query request. The transaction specifies the smart contract to be called to implement the update operation / query operation, as well as the parameters to be passed to the smart contract. The transaction also carries the digital certificate of client node 510, the signed digital signature (for example, obtained by encrypting the transaction digest using the private key in the digital certificate of client node 510), and broadcasts the transaction to consensus node 210 in blockchain network 200.

[0167] When a consensus node 210 in the blockchain network 200 receives a transaction, verifies the transaction, fills in the block, and reaches consensus, it appends the new block to the end of its stored blockchain and updates the state database according to the transaction result. It then executes the transactions in the new block: for a transaction that updates a first address book, a second address book, and a third-party application process identifier, it updates the key-value pair corresponding to the determination result of the target object in the state database according to the manual identification result; for a transaction that queries the determination result of a target object, it queries the key-value pair corresponding to the determination result of the target object in the state database and returns the transaction result.

[0168] It is worth noting that, in Figure 5 The example illustrates the process of directly uploading first contact data, second contact data, and third-party application process identifiers to the blockchain. However, in other embodiments, when the amount of data for the target object determination result is large, client node 410 can upload the hash of the target object determination result and the corresponding target object determination result to the blockchain in pairs, and store the original target object determination result and the corresponding target object determination result in a distributed file system or database. After client node 510 obtains the target object determination result and the corresponding target object determination result from the distributed file system or database, it can verify them by combining them with the corresponding hash in the blockchain network 200, thereby reducing the workload of the uploading operation.

[0169] As an example of blockchain, see Figure 6 , Figure 6 This is a schematic diagram of the blockchain structure in the blockchain network 200 provided in this embodiment of the invention. The header of each block can include the hash values ​​of all transactions in the block, as well as the hash values ​​of all transactions in the previous block. The record of a newly generated transaction is filled into the block and, after consensus among the nodes in the blockchain network, is appended to the tail of the blockchain to form a chain-like growth. The chain structure between blocks based on hash values ​​ensures the tamper-proof and anti-forgery properties of the transactions in the block.

[0170] The following describes an exemplary functional architecture of the blockchain network provided in the embodiments of the present invention. See also... Figure 7 , Figure 7 This is a functional architecture diagram of the blockchain network 200 provided in an embodiment of the present invention, including an application layer 201, a consensus layer 202, a network layer 203, a data layer 204, and a resource layer 205, which will be described below.

[0171] Resource layer 205 encapsulates the computing resources, storage resources, and communication resources of each node 210 in the blockchain network 200.

[0172] Data layer 204 encapsulates various data structures that implement the ledger, including blockchains implemented as files in a file system, key-value state databases, and proof of existence (such as hash trees of transactions in blocks).

[0173] Network layer 203 encapsulates the functions of point-to-point (P2P) network protocols, data propagation and verification mechanisms, access authentication mechanisms, and business entity identity management.

[0174] Among them, the P2P network protocol enables communication between nodes 210 in the blockchain network 200, the data propagation mechanism ensures the propagation of transactions in the blockchain network 200, the data verification mechanism is used to ensure the reliability of data transmission between nodes 210 based on cryptographic methods (such as digital certificates, digital signatures, public / private key pairs), the access authentication mechanism is used to authenticate the identity of business entities joining the blockchain network 200 according to the actual business scenario, and grant the business entities access to the blockchain network 200 when the authentication is successful, and the business entity identity management is used to store the identity and permissions (such as the types of transactions that can be initiated) of the business entities allowed to access the blockchain network 200.

[0175] The consensus layer 202 encapsulates the mechanisms (i.e., consensus mechanisms) for nodes 210 in the blockchain network 200 to reach consensus on blocks, as well as the functions of transaction management and ledger management. The consensus mechanisms include consensus algorithms such as POS, POW, and DPOS, and support pluggable consensus algorithms.

[0176] Transaction management is used to verify the digital signature carried in the transaction received by node 210, verify the identity information of the business entity, and determine whether it has the authority to conduct the transaction based on the identity information (reading relevant information from the business entity identity management); for business entities that have been authorized to access the blockchain network 200, they all have digital certificates issued by the certification center. The business entity uses the private key in its digital certificate to sign the submitted transaction, thereby declaring its legitimate identity.

[0177] Ledger management is used to maintain the blockchain and state database. For blocks that have reached consensus, they are appended to the end of the blockchain; transactions within consensus-reaching blocks are executed. When a transaction includes an update operation, the key-value pairs in the state database are updated; when a transaction includes a query operation, the key-value pairs in the state database are queried, and the query results are returned to the client nodes of the business entity. Multiple query operations on the state database are supported, including: querying blocks based on block vector numbers (e.g., transaction hashes); querying blocks based on block hashes; querying blocks based on transaction vector numbers; querying transactions based on transaction vector numbers; querying account data of the business entity based on its account (vector number); and querying the blockchain within a channel based on its channel name.

[0178] The application layer 201 encapsulates various business functions that a blockchain network can implement, including transaction tracing, notarization, and verification.

[0179] The following description uses the WeChat enterprise application as an example to illustrate the data processing method provided in this embodiment of the invention. Figure 8 This is a schematic diagram illustrating the usage environment of WeChat for Business and third-party application processes in an embodiment of the present invention. See [link / reference] Figure 8 The terminal 80-1 is equipped with the ability to display the corresponding enterprise WeChat client and third-party application processes. Users can obtain and display different social information through the corresponding client, and save different contact information in the client. The terminal connects to the server 200 through network 300. Network 300 can be a wide area network, a local area network, or a combination of both, and data transmission is achieved using a wireless link.

[0180] Among them, reference Figure 9A and Figure 9B , Figure 9A This is a schematic diagram illustrating the binding of WeChat Work and third-party application processes in an embodiment of the present invention. Figure 9B This diagram illustrates data exchange between WeChat Work and a third-party application process in an embodiment of the present invention. WeChat Work, as discussed in this invention, is a basic enterprise-level office communication tool, enabling enterprises to achieve basic management and efficient communication functions. For numerous customized or specific domain-specific functional requirements, third-party service providers are introduced to provide rich application service capabilities. The matching between WeChat Work and third-party applications can be achieved in the following ways:

[0181] 1) Find a suitable third-party application in the WeChat Work app market or through service provider promotion channels; 2) Authorize the scope and permissions of the contact list usage, and install the application; 3) Access the application service from the WeChat Work App / WeChat Work Web client / third-party service website; 4) Enter the application page and access the application's business functions. Based on the scope and permissions of the contact list authorized by the enterprise, the third-party application can obtain the information within that scope through the WeChat Work API interface and establish the enterprise's stored data on the third-party server. When a user accesses the third-party application through WeChat Work, the third party can identify the user without requiring an account and password, and display the business page according to the logic.

[0182] During this process, due to the openness of the WeChat Work third-party platform, any willing service provider can become a service provider on the platform by following the interface access standards. However, the platform cannot guarantee the sensitivity of third parties to data or whether there is adequate business protection for that data. Therefore, the design restricts third-party service providers to only obtaining basic fields from the address book, such as member userid / department ID, and they cannot obtain additional information from the enterprise address book, such as member names / phone numbers.

[0183] Because third-party service providers cannot access contact information, numerous user experience issues arise in business applications. For example, users may not receive a welcome message based on their name on the homepage, or third-party business data management may only display records using the userid, which is not always directly associated with a name for the visitor. Therefore, this component provides a contact information display feature. This feature is referenced by third-party pages, which input the userid / department ID to display the corresponding name information, thus balancing data security and user experience.

[0184] The contact list display component runs on a third-party page. To ensure security, three aspects need to be considered:

[0185] 1) Legitimacy of Identity Source. Only trusted third-party applications and user identities are allowed to call the component to display corresponding contact information. This can be understood on two levels: First, third parties without enterprise authorization cannot construct requests to display information through the component; second, when enterprise users access third-party applications, only contact information under that enterprise can be displayed. This limitation is to prevent third parties or enterprises from displaying contact information without authorization.

[0186] 2) Data transmission security. The component's display of contact information requires the component to retrieve the information from the WeChat Work backend and display it in plaintext. The security of this plaintext data transmission must be ensured to prevent hijacking by third parties and subsequent information leakage.

[0187] 3) Data display security. Since the component runs on a third-party page, it's necessary to restrict the page from obtaining the final displayed data through JavaScript operations.

[0188] However, in the relevant technologies, no component can simultaneously meet the above constraints. Therefore, if a third-party application process obtains the user's contact list data, it can easily affect the user's data security.

[0189] To address the aforementioned shortcomings, Figure 10 This is a schematic diagram illustrating the working process of the data processing method provided in this embodiment of the invention, specifically including the following steps:

[0190] Step 1001: Obtain data in the WeChat Work environment.

[0191] refer to Figure 11 and Figure 12 ,in, Figure 11 This is a schematic diagram of the enterprise WeChat browser environment display interface provided in an embodiment of the present invention. Figure 12 This is a schematic diagram illustrating the working process of the data processing method in WeChat for Enterprise provided in this embodiment of the invention, specifically including:

[0192] 1201: Periodically retrieve the wwsandbox.js file.

[0193] 1202: Inject wwsandbox.js before loading the page to generate a secure sandbox environment and provide WeixinSandBox objects.

[0194] 1203: Initialize the user identity.

[0195] 1204: Get wwopendata.js.

[0196] 1205: Replace the string identifier for client-side injection credentials, inject JavaScript into the page, and generate a wwopendata object.

[0197] 1206: The component calls the JSAPI to obtain the target user's WeChat contact data.

[0198] 1207: Output a list of identifiers to obtain the target user's WeChat Work contact list data.

[0199] 1208: Outputs rendered contact information through the contact display component.

[0200] In the built-in browser environment of WeChat Work, the terminal needs to inject the JS code wwsandbox.js into the WebView before the page loads. This JS code wwsandbox.js can save the browser APIs that the component will use next to a read-only global object WeChat Work Sandbox Environment (WeixinSandBox).

[0201] Subsequently, when the page calls the wx.config / wx.agentConfig interface to verify the identity of the third-party application and the identity of the user, the terminal injects the component JS code wwopendata.js, which provides the component method that triggers rendering for the page.

[0202] When a component method is called on the page, passing in the contact ID information to be rendered, wwopendata calls its internal JSAPI to request data from the terminal. Subsequently, the terminal returns the contact data to the front-end page via a JS callback, which is then rendered onto the page by the component.

[0203] To ensure data security between components during the above process, the following safeguards are in place:

[0204] First, to ensure that the browser APIs called in wwopendata.js are not hijacked by third-party pages, it is possible to restrict wwopendata.js to only calling API interfaces stored in WeixinSandBox.

[0205] Secondly, to handle scenarios where wwsandbox.js fails to execute, the terminal needs to inject the same random string A into the two JS files mentioned above before injecting them. When wwopendata.js executes, it needs to check if the random string in WeixinSandBox is equal to its own random string A. If they are equal, it indicates that wwsandbox has executed successfully, and the subsequent logic can continue.

[0206] Finally, because the terminal can only return contact data by calling a global JS callback, a new random string B needs to be injected before injecting wwopendata.js. During the data callback, the terminal needs to determine whether the random string on the component is equal to the injected random string B. If they are equal, it is assumed that the component has not been hijacked or replaced, and the data callback function can be called.

[0207] Step 1002: Obtain data from other browser environments.

[0208] Specifically, refer to Figure 13 , Figure 13 This is a schematic diagram illustrating the working process of the data processing method in WeChat for Enterprise provided in this embodiment of the invention, specifically including:

[0209] 1301: Guides users to log in by scanning a QR code using WeChat Work, triggering the process of a third-party application.

[0210] 1302: A link that redirects to a third-party application process.

[0211] 1303: Referencing the Enterprise WeChat JSSDK component.

[0212] 1304: Verify Cookie Session and randomly generate an encrypted key to replace variables in the file.

[0213] 1305: Fill in the contact ID field to be displayed in the contact list display component on the page.

[0214] 1306: The address book display component performs aggregation processing and initiates the retrieval of the corresponding address book information.

[0215] 1307: Check cookies and only allow access to the current target user's WeChat contact information when accessing the system.

[0216] 1308: Contacts data encrypted by a third-party application process.

[0217] 1309: Data is decrypted by a third-party application process and displayed through the address book via component rendering.

[0218] Users access third-party systems through the single sign-on function provided by WeChat Work. Simultaneously, the user's current login state information is recorded in a cookie on the open.work.weixin.qq.com domain.

[0219] It should be noted that the method of verifying user identity differs between environments outside of the WeChat Work built-in browser and within the WeChat Work browser. Furthermore, because data acquisition lacks client-side support, the security risks are higher, necessitating encryption of the acquired data.

[0220] Furthermore, when a third-party application includes the SDK file provided by WeChat Work on the page, the web backend will generate a decryption key based on the user's current login status and inject the key into the JS file.

[0221] When a component method is called on the page, passing in the contact ID information to be displayed, the SDK sends a request to the WeChat Work web backend to retrieve the contact information. The WeChat Work web backend generates an encryption key based on the login status information, encrypts the returned data, and returns it. After obtaining the encrypted data, the component uses the decryption key to decrypt the data, obtains the original data, and finally renders it on the page.

[0222] Meanwhile, in certain browser environments, due to security policies, the WeChat Work web backend cannot obtain cookie data for cross-domain requests. In this case, the following compatibility solution is provided:

[0223] When the SDK file is included in the page, if the request does not include cookies, an empty login state is generated and the corresponding ID is injected into the JS file. Subsequent requests initiated by the SDK will include this ID as the user identifier. When the page calls `wx.agentConfig` to verify the application's identity, the identity information is recorded in the login state corresponding to the request. The SDK will then use this identity to request data in the future.

[0224] Step 1003: Render the contact list data.

[0225] After the component receives the data to be rendered, it calls the `Element.attachShadow` method on the target element, passing in `{ mode: 'closed'}` to create a closed `ShadowRoot` object. The data is then rendered onto the `ShadowRoot` using innerHTML.

[0226] In closed mode, third-party scripts within the page cannot access the ShadowRoot object on the target element, and therefore cannot access the contact data rendered within ShadowRoot.

[0227] Step 1004: Determine the data compatibility method that matches the browser and complete the rendering and display of all contact data.

[0228] refer to Figure 14 , Figure 14 This is a schematic diagram illustrating the display interface of rendered contact information in a third-party application process of WeChat for Enterprise, provided in an embodiment of the present invention. Since different users have different browser versions, rendering cannot be performed using the preceding steps for browsers that do not support the ShadowDOM feature. Therefore, a compatibility solution using an iframe version is required.

[0229] Specifically, the component first determines at runtime whether the current runtime environment supports ShadowDOM; if not, it switches to iframe rendering mode.

[0230] During initialization, a hidden iframe (mainFrame) is created to initialize components and load data.

[0231] When a component method is called on the page, passing in the contact ID information to be displayed, the SDK creates a new iframe element (renderFrame) on the specified element. At the same time, it notifies the mainFrame to request the specified contact data via postMessage, and also notifies the renderFrame of the content to be rendered.

[0232] Upon receiving the notification, the mainFrame retrieves the contact list data from the WeChat Work web backend via an AJAX request and stores the returned data in a temporary information object storage (sessionStorage) under the WeChat Work domain. At this time, all renderFrames on the page will receive the storage event triggered by the browser. They can then combine the received rendering notification with the data in sessionStorage to render the target contact list data onto the page.

[0233] After the renderframe successfully renders the contact data, the width and height information of the rendering result is reported to the component SDK located on the third-party page through the postMessage function of the application interface. The SDK will set the corresponding renderframe to the target size according to the reported width and height information.

[0234] This compatibility solution requires creating a large number of iframes on the page. To reduce the overhead of page loading, an Application Cache manifest is set within the page loaded by iframes. After the browser detects this configuration, it will cache the static files in the page to avoid reloading static resources.

[0235] With the data processing method provided by this invention, third-party service providers can display the contact information of the accessing user's enterprise through the Enterprise WeChat contact information display component when they are unable to obtain the contact information, while ensuring that the data cannot be obtained by third-party pages, effectively improving the user experience.

[0236] The above description is merely an embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A data processing method, characterized in that, The method includes: Inject first functional code into the embedded browser component of the instant messaging client in the first browser environment to save the application programming interface of the first browser in the sandbox process of the instant messaging client. The process of the third-party application and the user information corresponding to the instant messaging client are detected. When the third-party application process and the user information corresponding to the instant messaging client pass the detection, the first address book data carried by the instant messaging client is obtained; Obtain the second address book data carried by the instant messaging client in the second browser environment, wherein the second browser environment is not the browser environment built into the instant messaging client; Determine the compatibility between the browser environment in which the third-party application process operates and the rendering requirements; When the browser environment in which the third-party application process is located meets the rendering requirements, the first and second contact data obtained are rendered through the contact information display component. When the browser environment in which the third-party application process is located does not meet the rendering requirements, the first contact data and the second contact data are rendered using a compatible rendering mode. The compatible rendering mode is configured to support different types of browsers to render data in the environment. The rendered first contact data and second contact data are output through the third-party application process.

2. The method according to claim 1, characterized in that, The method further includes: Inject a first random string into the first functional code and the instant messaging client sandbox process; When the first function code is in the execution state, it is determined whether the first function code and the first random string in the instant messaging client sandbox process are the same, so as to determine the running state of the instant messaging client sandbox process.

3. The method according to claim 1, characterized in that, The method further includes: Inject a second random string into the first functional code; When the first address book data carried by the instant messaging client is obtained, it is determined whether the real-time second random string in the first function code is the same as the injected second random string, so as to determine the security status of the corresponding address book information display component.

4. The method according to claim 1, characterized in that, The step of obtaining the second contact data carried by the instant messaging client in the second browser environment includes: The instant messaging client server generates a decryption key based on the user's login status information and injects the decryption key into the second function code; The contact information display component sends the contact identification information to be retrieved to the instant messaging client server. The instant messaging client server generates an encryption key based on the user's login status information, and uses the encryption key to encrypt the second address book data to be sent; The third-party application process decrypts the encrypted second contact data using the decryption key to obtain the corresponding second contact data.

5. The method according to claim 1, characterized in that, The method further includes: The third-party application process is bound to the instant messaging client so that the third-party application process can obtain the software development kit corresponding to the instant messaging client.

6. The method according to claim 1, characterized in that, When the browser environment in which the third-party application process resides meets the rendering requirements, the first and second contact data are rendered through the contact information display component, including: When the browser environment in which the third-party application process resides supports the shadow document object model. The corresponding shadow data object is created through the address book information display component; By using hidden hypertext markup language, the first contact data and the second contact data are rendered into the shadow data object, so as to display the first contact data and the second contact data through the shadow data object.

7. The method according to claim 1, characterized in that, When the browser environment in which the third-party application process resides does not meet the rendering requirements, the first and second contact data are rendered using a compatible rendering mode, including: When the browser environment in which the third-party application process is located does not meet the rendering requirements, the inline frame initialization process is triggered. The inline frame initialization process creates new inline frame elements and determines the content to be rendered by the rendering frame through the posting function of the application interface. Configure the first contact data and the second contact data in a temporary information storage object; The rendering framework is used to render the first contact data and the second contact data in the temporary information storage object.

8. The method according to any one of claims 1-7, characterized in that, The method further includes: Send the first contact list data, the second contact list data, and the third-party application process identifier to the blockchain network, so that... The nodes of the blockchain network fill the first address book data, the second address book data, and the third-party application process identifier into a new block, and when there is a consensus on the new block, the new block is appended to the end of the blockchain.

9. The method according to claim 8, characterized in that, The method further includes: Receive data synchronization requests from other nodes in the blockchain network; In response to the data synchronization request, the permissions of the other nodes are verified; When the permissions of the other nodes are verified, the current node is controlled to synchronize data with the other nodes, so that the other nodes can obtain the first contact data, the second contact data, and the third-party application process identifier.

10. The method according to claim 8, characterized in that, The method further includes: In response to a query request, the query request is parsed to obtain the corresponding object identifier; Based on the object identifier, obtain the permission information within the target block in the blockchain network; The matching between the permission information and the object identifier is verified; When the permission information matches the object identifier, the corresponding address book data and the target object that matches the filtering conditions are obtained in the blockchain network. In response to the query request, the obtained resource transaction data and target objects matching the filtering conditions are pushed to the corresponding client, so that the client can obtain the corresponding resource transaction data and target objects matching the filtering conditions stored in the blockchain network.

11. A data processing apparatus, characterized in that, The device includes: The information processing module is used to inject first functional code into the embedded browser component of the instant messaging client in the first browser environment, so as to save the application interface of the first browser in the sandbox process of the instant messaging client. The information processing module is also used to detect the third-party application process and the user information corresponding to the instant messaging client; The information processing module is also used to obtain the first address book data carried by the instant messaging client when the user information corresponding to the third-party application process and the instant messaging client passes the detection. The information transmission module is used to acquire the second address book data carried by the instant messaging client in the second browser environment, wherein the second browser environment is not the browser environment built into the instant messaging client. The information processing module is also used to determine the matching relationship between the browser environment and rendering requirements of the third-party application process. The information processing module is also used to render the first contact data and the second contact data obtained through the contact information display component when the browser environment in which the third-party application process is located meets the rendering requirements. The information processing module is also used to render the first contact data and the second contact data obtained through a compatible rendering mode when the browser environment in which the third-party application process is located does not meet the rendering requirements. The information processing module is also used to output the rendered first contact data and second contact data through the third-party application process.

12. The apparatus according to claim 11, characterized in that, The information processing module is also used to inject a first random string into the first function code and the instant messaging client sandbox process; When the first function code is in the execution state, it is determined whether the first function code and the first random string in the instant messaging client sandbox process are the same, so as to determine the running state of the instant messaging client sandbox process.

13. The apparatus according to claim 11, characterized in that, The information processing module is also used to inject a second random string into the first functional code; When the first address book data carried by the instant messaging client is obtained, it is determined whether the real-time second random string in the first function code is the same as the injected second random string, so as to determine the security status of the corresponding address book information display component.

14. The apparatus according to claim 11, characterized in that, The information processing module is also used to generate a decryption key based on the user's login status information through the instant messaging client server and inject the decryption key into the second function code; The contact information display component sends the contact identification information to be retrieved to the instant messaging client server. The instant messaging client server generates an encryption key based on the user's login status information, and uses the encryption key to encrypt the second address book data to be sent; The third-party application process decrypts the encrypted second contact data using the decryption key to obtain the corresponding second contact data.

15. The apparatus according to claim 11, characterized in that, The information processing module is also used to bind the third-party application process to the instant messaging client, so that the third-party application process can obtain the software development kit corresponding to the instant messaging client.

16. The apparatus according to claim 11, characterized in that, The information processing module is further configured to, when the browser environment in which the third-party application process resides supports the shadow document object model, The corresponding shadow data object is created through the address book information display component; By using hidden hypertext markup language, the first contact data and the second contact data are rendered into the shadow data object, so as to display the first contact data and the second contact data through the shadow data object.

17. The apparatus according to claim 11, characterized in that, The information processing module is also used to trigger the inline framework initialization process when the browser environment in which the third-party application process is located does not meet the rendering requirements. The inline frame initialization process creates new inline frame elements and determines the content to be rendered by the rendering frame through the posting function of the application interface. Configure the first contact data and the second contact data in a temporary information storage object; The rendering framework is used to render the first contact data and the second contact data in the temporary information storage object.

18. The apparatus according to any one of claims 11-17, further comprising: The storage module is used to send the first contact list data, the second contact list data, and the third-party application process identifier to the blockchain network, so that... The nodes of the blockchain network fill the first address book data, the second address book data, and the third-party application process identifier into a new block, and when there is a consensus on the new block, the new block is appended to the end of the blockchain.

19. The apparatus according to claim 18, characterized in that, The storage module is also used to receive data synchronization requests from other nodes in the blockchain network; In response to the data synchronization request, the permissions of the other nodes are verified; When the permissions of the other nodes are verified, the current node is controlled to synchronize data with the other nodes, so that the other nodes can obtain the first contact data, the second contact data, and the third-party application process identifier.

20. The apparatus according to claim 18, characterized in that, The storage module is also used to respond to a query request and parse the query request to obtain the corresponding object identifier; Based on the object identifier, obtain the permission information within the target block in the blockchain network; The matching between the permission information and the object identifier is verified; When the permission information matches the object identifier, the corresponding address book data and the target object that matches the filtering conditions are obtained in the blockchain network. In response to the query request, the obtained resource transaction data and target objects matching the filtering conditions are pushed to the corresponding client, so that the client can obtain the corresponding resource transaction data and target objects matching the filtering conditions stored in the blockchain network.

21. An electronic device, characterized in that, The electronic device includes: Memory, used to store executable instructions; A processor, when executing executable instructions stored in the memory, implements the data processing method according to any one of claims 1 to 10.

22. A computer-readable storage medium storing executable instructions, characterized in that, When the executable instructions are executed by the processor, they implement the data processing method according to any one of claims 1 to 10.