CN106844061B - Shared resource processing method and device - Google Patents

Shared resource processing method and device Download PDF

Info

Publication number
CN106844061B
CN106844061B CN201510882222.5A CN201510882222A CN106844061B CN 106844061 B CN106844061 B CN 106844061B CN 201510882222 A CN201510882222 A CN 201510882222A CN 106844061 B CN106844061 B CN 106844061B
Authority
CN
China
Prior art keywords
resource
message
social application
identifier
module
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201510882222.5A
Other languages
Chinese (zh)
Other versions
CN106844061A (en
Inventor
陈奋
黄泽丰
彭威
胡晶晶
陈猛
刘慧�
陈闯锋
杨珣镛
谭健明
杨启波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201510882222.5A priority Critical patent/CN106844061B/en
Publication of CN106844061A publication Critical patent/CN106844061A/en
Application granted granted Critical
Publication of CN106844061B publication Critical patent/CN106844061B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/543User-generated data transfer, e.g. clipboards, dynamic data exchange [DDE], object linking and embedding [OLE]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L51/00User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail
    • H04L51/52User-to-user messaging in packet-switching networks, transmitted according to store-and-forward or real-time protocols, e.g. e-mail for supporting social networking services

Abstract

The invention relates to a method and a device for processing shared resources, wherein the method comprises the following steps: injecting a preset code into a process of the social application; acquiring a message generated in a social conversation through the preset code in the process; if the acquired message is a resource sharing message, acquiring a resource identifier in the message; generating a resource acquisition request according to the user identifier currently logging in the social application and the resource identifier; and sending the resource acquisition request to a social application server to which the social application belongs, so that the social application server allocates resources corresponding to the resource identification to the user identification. The shared resource processing method and the device provided by the invention have the advantages that the use scene is not limited by the notification function of the system notification bar, and the efficiency of acquiring the shared resource by the process is higher than that of acquiring the shared resource by detecting the message of the system notification bar.

Description

Shared resource processing method and device
Technical Field
The present invention relates to the field of network technologies, and in particular, to a method and an apparatus for processing shared resources.
Background
Sharing resources refers to an action of sharing resources through a social application, and if the resources bear users, corresponding operations need to be performed on the shared resources to obtain corresponding resources. With the continuous upgrade of terminal configuration, the types of resource sharing operations that can be completed on the terminal at present are also increasing. The shared resources include, for example, sending a virtual red packet, sharing points, or sharing electronic vouchers, and the like, where the values of the virtual red packet, the shared points, and the values of the electronic vouchers are all resources.
Resource bearing users need to operate on resources shared through social application to obtain corresponding resources, but resource sharing is unpredictable for the resource bearing users, and the cost is too high when the resources are always waited to be shared, so that an auxiliary application program capable of automatically obtaining the shared resources is derived. By the aid of the auxiliary application program, operation of a user can be simulated, and shared resources can be automatically acquired when resource sharing occurs in social application. For example, the auxiliary application may detect a message belonging to the social application appearing in the system notification bar, so as to locate a conversation page of the corresponding contact, and operate the shared resource, so that the user obtains the corresponding resource.
However, currently, an auxiliary application for automatically acquiring shared resources requires that a system notification bar notification function must be started, and the social application itself must be notified through the system notification bar, otherwise, the auxiliary application cannot detect the shared resources and cannot automatically acquire the shared resources. Therefore, the current usage scenarios are limited in the manner of automatically acquiring shared resources by the auxiliary application, and the efficiency of acquiring resources in actual application is not high.
Disclosure of Invention
Therefore, it is necessary to provide a method and an apparatus for processing shared resources, which are used for solving the problems of limited usage scenarios and low efficiency in the current manner of automatically acquiring shared resources through an auxiliary application.
A method of shared resource processing, the method comprising:
injecting a preset code into a process of the social application;
acquiring a message generated in a social conversation through the preset code in the process;
if the acquired message is a resource sharing message, then
Acquiring a resource identifier in the message;
generating a resource acquisition request according to the user identifier currently logging in the social application and the resource identifier;
and sending the resource acquisition request to a social application server to which the social application belongs, so that the social application server allocates resources corresponding to the resource identification to the user identification.
A shared resource processing apparatus, the apparatus comprising:
the code injection module is used for injecting preset codes into the process of the social application;
the message acquisition module is used for acquiring messages generated in the social conversation through the preset codes in the process;
the message analysis module is used for acquiring a resource identifier in the message if the acquired message is a resource sharing message;
the request generation module is used for generating a resource acquisition request according to the user identifier currently logged in the social application and the resource identifier;
and the request sending module is used for sending the resource obtaining request to a social application server to which the social application belongs, so that the social application server allocates resources corresponding to the resource identifiers for the user identifiers.
According to the method and the device for processing the shared resources, the preset codes are injected into the process of the social application, the messages generated in the social application can be acquired in the process through the preset codes, and if the messages are resource sharing messages, the resource identifiers can be obtained through analysis and combined with the user identifiers to generate the resource acquisition requests. The resource acquisition request is sent to the social application server through the process of the social application, so that the social application server can automatically allocate resources corresponding to the resource identification to the user identification. The shared resource can be automatically acquired through the process of the social application, the process is irrelevant to whether the notification function of the system notification bar is started or not, the use scene is not limited by the notification function of the system notification bar, and the process can acquire the shared resource more efficiently than the process which detects the message of the system notification bar.
Drawings
FIG. 1 is a diagram of an application environment for a shared resource processing system in one embodiment;
fig. 2 is a schematic structural diagram of a terminal for implementing a shared resource processing method in an embodiment;
FIG. 3 is a flowchart illustrating a method for processing shared resources according to one embodiment;
FIG. 4 is a flowchart illustrating steps in a process for injecting pre-defined code into a social application, in one embodiment;
FIG. 5 is a flowchart illustrating steps of obtaining and displaying resource allocation results according to an embodiment;
FIG. 6 is a diagram of a statistics page provided by an auxiliary application in one embodiment;
FIG. 7 is a flowchart illustrating the steps of adaptively configuring default code based on version information of a social application, in one embodiment;
FIG. 8 is a flowchart illustrating a method for processing shared resources in a specific application scenario;
FIG. 9 is a block diagram of an apparatus for processing shared resources according to an embodiment;
FIG. 10 is a block diagram of a code injection module of the shared resource processing apparatus in one embodiment;
FIG. 11 is a block diagram showing the structure of a shared resource processing apparatus according to another embodiment;
FIG. 12 is a block diagram showing a configuration of a shared resource processing apparatus according to still another embodiment;
FIG. 13 is a block diagram of a shared resource processing apparatus in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
As shown in fig. 1, in one embodiment, a shared resource processing system is provided, comprising a terminal 101, a social application server 102 and an auxiliary application server 103. The terminal 101 may be connected to the social application server 102 and the secondary application server 103 via a network. The terminal 101 runs a social application and an auxiliary application, which are different application programs. The terminal 101 may communicate with the social application server through the social application and may also communicate with the secondary application server through the secondary application.
As shown in fig. 2, in one embodiment, a terminal 101 for implementing a method for processing shared resources is provided, which includes a processor, a non-volatile storage medium, an internal memory, a network interface, a display screen, and an input device connected through a system bus. Wherein the processor has a computing function and a function of controlling the operation of the terminal 101, the processor being configured to perform a shared resource processing method. The non-volatile storage medium includes at least one of a magnetic storage medium, an optical storage medium, and a flash memory storage medium, and stores an operating system and a shared resource processing device. The shared resource processing device is used for realizing a shared resource processing method. The network interface is used to connect to a network to communicate with either social application server 102 or secondary application server 103. The display screen comprises at least one of a liquid crystal display screen, a flexible display screen and an electronic ink display screen. The input device comprises at least one of a physical button, a track ball, a touch pad and a touch layer overlapped with the display screen, wherein the touch layer and the display screen are combined to form the touch screen.
As shown in fig. 3, in an embodiment, a method for processing shared resources is provided, and this embodiment is illustrated by applying the method to the terminal 101 in the shared resource processing system in fig. 1 and fig. 2. The method specifically comprises the following steps:
step 302, injecting a preset code into a process of the social application.
Specifically, the preset code is a pre-written code for implementing the shared resource processing method, and may be written in C language or C + + language. The injection refers to a process of adding executable code in a process, the injection can be remote injection, and the injection refers to a process of adding the executable code in another process by calling a remote injection system function in one process. The remote injection can be realized by using different remote injection system functions under different operating systems, for example, the remote injection can be realized by using a remote injection system function ptrace () under an Android (Android) operating system, the remote injection can be realized by using a remote injection system function dtrace () under a Solaris operating system, and the remote injection can be realized by using a remote injection system function dtrun () under a Mac operating system. The social application generally has a contact search function and an instant messaging function, and may further have a UGC (User Generated Content) sharing function and a UGC comment function.
Step 304, obtaining the message generated in the social session through the preset code in the process.
Specifically, the terminal executes a preset code through a process of the social application, and acquires a message generated in a social session in the social application through a logic of the preset code. A social session refers to a session between a user and a contact to interact with a message. The contact may be a social networking friend, a group member, an enterprise account, or a stranger, which refers to a user who has not established a social networking relationship with the current user.
The social session may be a one-to-one two-person session or a group session. A two-person session may originate from any one of the user and the contact, a group session may originate from any group member in the corresponding group in which both the user and the contact are present. The group may be an instant messaging group, a temporarily established discussion group, or a discussion group established based on an existing group, etc.
The messages generated in the social session may be messages sent by the user, messages from contacts of the user, or system messages. The message may be generated by instant editing or may be a forwarded message.
Step 306, if the acquired message is a resource sharing message, acquiring a resource identifier in the message.
Specifically, the message is a structured message, and includes several fields, at least including a message type field and a message content field, and the data of the message content field includes a resource identifier. After the terminal acquires the message through the preset code in the process, the terminal calls a message analysis interface appointed by the preset code to analyze the message to acquire the data of the message type field, and judges whether the message is a resource sharing message or not according to the data of the message type field. If the message is a resource sharing message, the terminal acquires a resource identifier in the message through a preset code in the process; if the message is not the resource sharing message, the preset code in the process stops processing the message. The process itself may also process the message according to the logic of the process itself, for example, parsing the message to obtain the message content and displaying the message content, etc., which is not affected by the logic of the preset code.
In one embodiment, step 306 includes: and if the acquired message is a resource sharing message and the resource sharing user to which the resource corresponding to the resource identifier belongs is configured to allow the shared resource to be acquired, acquiring the resource identifier in the message.
Specifically, the terminal obtains the data of the message type field and the data of the resource sharing user field through a preset code parsing message in the process, so as to determine that the message is a resource sharing message according to the data of the message type field, determine that the corresponding resource sharing user is configured to allow to acquire the resource shared by the resource sharing user according to the data of the resource sharing user field, acquire the resource identifier in the message, and execute the subsequent steps 308 and 310.
The resource sharing users are configured to allow the shared resources to be acquired, and may be that the corresponding resource sharing users exist in a user list allowing the shared resources to be acquired, and/or the corresponding resource sharing users do not exist in a user list prohibiting the shared resources to be acquired. The resource sharing user refers to a user initiating resource sharing or a user forwarding the shared resource, the user of the current terminal is a resource recipient user, and the resource sharing user and the resource recipient user may be the same user.
In this embodiment, the user may configure the resource that is allowed or not allowed to be acquired, which is shared by a specific user, so that the policy for acquiring the resource may be flexibly adjusted.
And 308, generating a resource acquisition request according to the user identifier and the resource identifier of the current login social application.
Specifically, the terminal calls a resource acquisition request generation interface specified by a preset code through the preset code in the process to generate a resource acquisition request according to the user identifier and the resource identifier currently logged in the social application. The user identifier is a character string uniquely representing the user, and may include at least one of a number, a letter, and a punctuation mark. The user identification may be a user account that logs into the social application. When the terminal generates a resource acquisition request according to the user identifier and the resource identifier of the current login social application through a preset code in the process, the user identifier and the resource identifier can be encrypted, and at the moment, the resource acquisition request is a string of encrypted character strings.
Step 310, sending a resource obtaining request to a social application server to which the social application belongs, so that the social application server allocates a resource corresponding to the resource identifier to the user identifier.
Specifically, the social application server is a server of the social application, and the terminal calls a communication interface specified by a preset code through the preset code of the process to communicate with the social application server so as to send a resource acquisition request to the social application server to which the social application belongs. And the social application server extracts the user identification and the resource identification from the resource acquisition request, so that the resource corresponding to the resource identification is allocated to the user identification. And allocating the resources enables all resources or part of resources corresponding to the resource identifications to be allocated to the user identifications. The resource corresponding to the resource identifier may be a numerical resource, such as a numerical resource of a virtual red packet.
According to the method for processing the shared resources, the preset codes are injected into the process of the social application, the messages generated in the social application can be acquired in the process through the preset codes, and if the messages are the resource sharing messages, the resource identifiers can be obtained through analysis and combined with the user identifiers to generate the resource acquisition requests. The resource acquisition request is sent to the social application server through the process of the social application, so that the social application server can automatically allocate resources corresponding to the resource identification to the user identification. The shared resource can be automatically acquired through the process of the social application, the process is irrelevant to whether the notification function of the system notification bar is started or not, the use scene is not limited by the notification function of the system notification bar, and the process can acquire the shared resource more efficiently than the process which detects the message of the system notification bar.
As shown in fig. 4, in an embodiment, the step 302 specifically includes the following steps:
in step 402, a system call function of a process of the social application for allocating the storage space is remotely called to allocate the storage space, and a path of the dynamic link library is written in the storage space.
Specifically, the terminal may obtain a Process Identification (PID) of the social application through the auxiliary application, thereby identifying a process connected to the social application through the process. And the terminal acquires and stores the register value of the process through the auxiliary application so as to restore the original state of the process after injection is completed. The terminal acquires, through the auxiliary application, a call address of a system call function (mmap) of the process for allocating the memory space, a call address of a system call function (dlopen) for loading the dynamic link library, and a call address of a system call function (dlsym) for operating the dynamic link library. And calling a corresponding system call function (mmap) according to the call address of the system call function for allocating the memory space of the process to allocate a section of memory space, and writing a path of a dynamic link library (SO) and a function call parameter into the allocated memory space, wherein the dynamic link library is preset code to be injected.
In step 404, a system call function of the process for loading the dynamic link library is remotely called to load the dynamic link library according to the path.
Specifically, the terminal calls a corresponding system call function (dlopen) through the auxiliary application according to a call address of the system call function for loading the dynamic link library, so as to load the corresponding dynamic link library according to a path written in the storage space.
In step 406, the system call function of the remote call process for operating the dynamically linked library obtains the function address of the function in the dynamically linked library for processing the shared resource.
Specifically, the terminal calls a corresponding system call function (dlsym) through the auxiliary application according to a call address of a system call function for operating the dynamic link library to acquire a function address from the loaded dynamic link library according to a function call parameter written in the storage space.
And step 408, executing the corresponding function according to the acquired function address.
Specifically, the function of the obtained function address is used for processing shared resources, and is mainly used for obtaining messages generated in social sessions; if the acquired message is a resource sharing message, acquiring a resource identifier in the message; generating a resource acquisition request according to the user identifier and the resource identifier of the current login social application; and sending a resource acquisition request to a social application server to which the social application belongs, so that the social application server allocates resources corresponding to the resource identifiers for the user identifiers.
In this embodiment, the dynamic link library is injected into the process of the social application in a remote injection manner to execute a corresponding function in the dynamic link library, so that the process can automatically process the resource sharing message after acquiring the resource sharing message.
As shown in FIG. 5, in one embodiment, the pre-set code is injected into the process of the social application through the secondary application; the shared resource processing method also comprises the step of obtaining and displaying the resource allocation result, and specifically comprises the following steps:
step 502, receiving a resource allocation result fed back by the social application server through the process.
Specifically, after the social application server performs resource allocation according to the resource acquisition request, the social application server feeds back a resource allocation result to the terminal. The resource allocation result includes a result of successful resource allocation and a result of failed resource allocation.
Step 504, the resource allocation result from the process is obtained by the auxiliary application.
Specifically, the terminal may actively obtain the resource allocation result fed back by the application server through an interface provided by the preset code in the process through the auxiliary application, or passively receive the resource allocation result transmitted to the auxiliary application by the process through the preset code therein.
And 506, displaying the resource allocation result, and/or displaying the statistical result after performing statistics according to the acquired resource allocation result.
The terminal can display the resource allocation result through the auxiliary application, specifically can display the resource allocation result through the notification message of the system notification bar, and can also display the resource allocation result in the resource allocation result display page of the auxiliary application.
The terminal counts the obtained resource allocation result through the auxiliary application, and specifically can count the number of successful resource allocation or the total amount of the obtained numerical resource and other information. The counted time period may be a time period from the injection of the preset code to the current time, or may be a time period of the day, the week, or the month.
The terminal can simultaneously display the resource allocation result and the statistical result through the auxiliary application, and can also display only one of the resource allocation result and the statistical result. In one embodiment, the terminal may further share the resource allocation result and/or the statistical result to the social friend through the auxiliary application.
For example, the terminal may provide a statistics page as shown in fig. 6 through the auxiliary application, and the statistics result is displayed in the statistics page. The statistics displayed on the statistics page in fig. 6 include the total amount of the numerical resources of the virtual red packet acquired in the last 30 days, and further include information on the numerical resources of the virtual red packet acquired in a single time.
In this embodiment, the resource allocation result fed back by the social application server after the process of the social application triggers the resource acquisition request can be acquired through the auxiliary application and displayed, so that the user can know the resource acquisition condition through the social application in time through the auxiliary application.
As shown in FIG. 7, in one embodiment, the pre-set code is injected into the process of the social application through the secondary application; the shared resource processing method further comprises the step of self-adaptively configuring the preset code according to the version information of the social application, and specifically comprises the following steps:
step 702, obtaining version information of the social application through the auxiliary application.
The version information of the social application is information that can uniquely identify the version of the social application, and is typically a string of characters, which may include at least one of numbers, punctuation marks, and characters. After the terminal installs the social application with the updated version, the corresponding version information is also updated.
In step 704, configuration information matching the version information is downloaded from the secondary application server.
Specifically, the auxiliary application server is a server of the auxiliary application, and the terminal downloads configuration information matched with the acquired version information from the auxiliary application server through the auxiliary application, wherein the configuration information is used for configuring preset codes in the process, so that the preset codes in the process are executed according to the configuration information when being executed.
If the terminal does not download the configuration information matched with the version information through the auxiliary application, which indicates that the corresponding configuration information is not stored in the auxiliary application server, the terminal can suspend the downloading task through the auxiliary application and download the configuration information matched with the version information again after the preset time length; or the terminal may wait after suspending the downloading task until receiving the corresponding configuration information pushed by the secondary application server after updating the configuration information matched with the version information.
In one embodiment, the terminal can periodically obtain the version information of the social application through the auxiliary application and compare the version information with the version information corresponding to the configuration information transmitted to the process last time, and if the version information is not matched with the version information, the configuration information matched with the version information is downloaded from the auxiliary application server.
Step 706, the configuration information is transmitted to the process, so that the process executes according to the configuration information when at least one of the resource identifier in the acquisition message is executed through a preset code, the resource acquisition request is generated according to the user identifier and the resource identifier of the current login social application, and the resource acquisition request is sent to the social application server to which the social application belongs.
Specifically, the terminal transfers the downloaded configuration information to the process through the auxiliary application, so that the process updates the configuration according to the transferred configuration information. The configuration information may include at least one of information specifying an interface called by the parsing message, information specifying an interface called when the resource acquisition request is generated, and information of an interface called when the resource acquisition request is transmitted. And the terminal executes at least one of acquiring the resource identifier in the message, generating a resource acquisition request and sending the resource acquisition request to the social application server according to the interface specified in the configuration information through a preset code in the process.
In this embodiment, the auxiliary application server stores the configuration information matched with the version information of the social application, so that the auxiliary application can download corresponding configuration information according to the version information of the social application to perform corresponding configuration on the preset code in the social application, so that the preset code injected in the process can be applicable to the social application of the latest version, and the situation that the preset code is unavailable due to version update is avoided.
In one embodiment, the shared resource processing method further includes: acquiring a random delay time length within a preset delay time length range, and performing one of the following steps according to the random delay time length: judging whether the acquired message is a resource sharing message; acquiring a resource identifier in a message; generating a resource acquisition request according to the user identifier and the resource identifier of the current login social application; and sending a resource acquisition request to a social application server to which the social application belongs.
Specifically, the preset delay time length range, which may have a minimum value and a maximum value, is a range in which a random delay time length is randomly generated so that a specific step is delayed according to the random delay time length, and is a range in which a random delay time length is desirable. Delaying execution by a random delay time length means not executing immediately but executing after waiting for the random delay time length. The step of delaying execution is one of the steps of determining whether the acquired message is a resource sharing message, 306, 308, and 310.
For example, the preset delay time length range may be (0, 1 second), then randomly generating a random delay time length may be 0.5 second, then the terminal may delay 0.5 second through a preset code in the process to determine whether the acquired message is a resource sharing message, or delay 0.5 second to acquire a resource identifier in the message, or delay 0.5 second to perform a step of generating a resource acquisition request according to a user identifier currently logged in to the social application and the resource identifier, or delay 0.5 second to perform a step of sending the resource acquisition request to a social application server to which the social application belongs.
In the embodiment, a certain step executed for acquiring the shared resources is executed by randomly delaying the execution of the preset code, so that the phenomenon that the social application server is mistakenly judged to use the plug-in through statistical analysis can be avoided, and the method is safer and more reliable.
In one embodiment, step 310 includes: and sending a resource acquisition request to a social application server to which the social application belongs, so that the social application server divides the numerical resource from the residual numerical resource corresponding to the resource identifier and distributes the numerical resource to the numerical resource account corresponding to the user identifier.
Specifically, in this embodiment, the resource corresponding to the resource identifier is a numerical resource, and after receiving the resource acquisition request, the social application server may divide the numerical resource from the remaining numerical resources corresponding to the resource identifier and allocate the numerical resource to the numerical resource account corresponding to the user identifier until the remaining numerical resources corresponding to the resource identifier are 0. The value resource account can be a bank account or a third party payment account, and can be stored in a bank server or a third party payment platform.
Wherein, the value resource is the value of virtual red envelope, the value of electronic voucher or other shareable value resource. After receiving the resource acquisition request, the social application server may first determine whether the remaining numerical resource corresponding to the resource identifier is 0, and if the remaining numerical resource is 0, may directly generate a resource allocation result of the resource allocation failure; if the remaining value resource is not 0, the value resource can be divided from the remaining value resource corresponding to the resource identifier and allocated to the value resource account corresponding to the user identifier.
Further, if the resource corresponding to the resource identifier is not acquired, the corresponding remaining numerical resource is all the numerical resources corresponding to the resource identifier; if the resource corresponding to the resource identifier is acquired and has a residue, the corresponding residue numerical resource is obtained by subtracting the acquired numerical resource from all numerical resources; if the resources corresponding to the resource identifiers have been completely acquired, the corresponding remaining numerical resources are 0, and a failure in allocating the numerical resources may occur.
In this embodiment, when the resource acquisition request is processed by the social application server, the numerical resource is divided from the remaining numerical resources corresponding to the resource identifier and allocated to the numerical resource account corresponding to the user identifier, and the numerical resource is stored in the numerical resource account, so that the security of the numerical resource can be guaranteed.
In one embodiment, the resource corresponding to the resource identifier is a numerical resource of a virtual red packet; and the social application server divides the numerical resources from the residual numerical resources corresponding to the resource identifiers according to one of a random dividing mode and an equal dividing mode.
Specifically, the virtual red envelope is a virtual object having a numerical resource representing the amount of funds, and the numerical resource of the virtual red envelope can be transferred, but the numerical resource of the virtual red envelope is reduced after the transfer.
Dividing the numerical resource from the residual numerical resource corresponding to the resource identifier according to a random division mode means dividing the total amount of the numerical resource of the virtual red packet according to the number of the division parts corresponding to the resource identifier, wherein each part of the numerical resource is random, and the social application server allocates one part of the numerical resource to the corresponding user identifier each time the social application server processes the resource acquisition request. For example, if the total amount of the numerical resources of the virtual red envelope is 100 and the corresponding number of divided parts is 50, the social application server divides 100 into 50, each number of numerical resources is random, but the sum of all 50 numbers of numerical resources is 100, and the social application server allocates one of the 50 numbers of numerical resources to a corresponding user identifier each time the social application server processes a resource acquisition request. The equal dividing mode is different from the random dividing mode, and is divided equally when the number of the parts is divided, namely, the numerical value resources of each part are equal.
In this embodiment, the social application server divides the resource into the remaining resource based on the resource identifier in a random or equal division manner, so that users can select a richer interaction manner when the resource is shared.
As shown in fig. 8, a specific application scenario is used below to describe the principle of the shared resource processing method, where the resource shared in the application scenario is a virtual red packet, and the shared resource processing method includes the following steps:
s801, acquiring the version information of the social application through the auxiliary application, and requesting to download the configuration information matched with the version information from the auxiliary application server.
S802, the configuration information returned by the auxiliary application server is received through the auxiliary application.
And S803, injecting the preset code into the process of the social application through the auxiliary application.
And S804, receiving the result of successful injection returned by the process through the auxiliary application.
S805, sending the configuration information to the process through the auxiliary application.
And S806, receiving a configuration success result returned by the process through the auxiliary application.
S807, after the message generated by the social conversation of the social application is obtained through the process of the social application, if the message is a virtual red envelope message, obtaining a virtual red envelope identifier of the virtual red envelope message, and generating a red envelope removing request according to the user identifier currently logging in the social application and the virtual red envelope identifier.
S808, sending a request for tearing the red envelope to the social application server through the process of the social application.
And S809, dividing the fund amount from the residual fund amount corresponding to the virtual red packet identifier and distributing the fund amount to the fund account corresponding to the user identifier by the social application server according to the red packet tearing request.
And S810, receiving the red packet removing result returned by the social application server through the process of the social application.
And S811, receiving the result of red packet removal returned by the process through the auxiliary application.
And S812, displaying and recording the red packet removing result.
As shown in fig. 9, in one embodiment, a shared resource processing apparatus 900 is provided and includes a code injection module 901, a message acquisition module 902, a message parsing module 903, a request generation module 904, and a request sending module 905.
A code injection module 901, configured to inject a preset code into a process of the social application.
Specifically, the preset code is a pre-written code for implementing the shared resource processing method, and may be written in C language or C + + language. The injection refers to a process of adding executable code in a process, the injection can be remote injection, and the injection refers to a process of adding the executable code in another process by calling a remote injection system function in one process. The code injection module 901 may be configured to implement remote injection using different remote injection system functions under different operating systems, for example, a remote injection system function ptrace () may be used to implement remote injection under an Android operating system, a remote injection system function dtrace () may be used to implement remote injection under a Solaris operating system, and a remote injection system function dtrun () may be used to implement remote injection under a Mac operating system. The social application generally has a contact search function and an instant messaging function, and may further have a UGC (User Generated Content) sharing function and a UGC comment function.
A message obtaining module 902, configured to obtain, through a preset code in a process, a message generated in a social session.
Specifically, the message obtaining module 902 is configured to execute a preset code through a process of the social application, and obtain, through logic of the preset code, a message generated in a social session in the social application. A social session refers to a session between a user and a contact to interact with a message. The contact may be a social networking friend, a group member, an enterprise account, or a stranger, which refers to a user who has not established a social networking relationship with the current user.
The social session may be a one-to-one two-person session or a group session. A two-person session may originate from any one of the user and the contact, a group session may originate from any group member in the corresponding group in which both the user and the contact are present. The group may be an instant messaging group, a temporarily established discussion group, or a discussion group established based on an existing group, etc.
The messages generated in the social session may be messages sent by the user, messages from contacts of the user, or system messages. The message may be generated by instant editing or may be a forwarded message.
A message parsing module 903, configured to, if the obtained message is a resource sharing message, obtain a resource identifier in the message.
Specifically, the message is a structured message, and includes a plurality of fields, at least a message type field and a message content field, after the data in the message content field includes the resource identifier, the message obtaining module 902 obtains the message through a preset code in a process, the message parsing module 903 may invoke a message parsing interface specified by the preset code to parse the message to obtain the data in the message type field, and determine whether the message is a resource sharing message according to the data in the message type field. If the message is a resource sharing message, the message analysis module 903 obtains a resource identifier in the message through a preset code in the process; if the message is not the resource sharing message, the preset code in the process stops processing the message. The process itself may also process the message according to the logic of the process itself, for example, parsing the message to obtain the message content and displaying the message content, etc., which is not affected by the logic of the preset code.
In an embodiment, the message parsing module 903 is specifically configured to obtain the resource identifier in the message if the obtained message is a resource sharing message and a resource sharing user to which a resource corresponding to the resource identifier belongs is configured to allow obtaining of the shared resource.
Specifically, the message parsing module 903 parses the message through a preset code in the process to obtain data in a message type field and data in a resource sharing user field, so as to determine that the message is a resource sharing message according to the data in the message type field, and determine that a corresponding resource sharing user is configured to allow to obtain a resource shared by the resource sharing user according to the data in the resource sharing user field, and then obtain a resource identifier in the message.
The resource sharing users are configured to allow the shared resources to be acquired, and may be that the corresponding resource sharing users exist in a user list allowing the shared resources to be acquired, and/or the corresponding resource sharing users do not exist in a user list prohibiting the shared resources to be acquired. The resource sharing user refers to a user initiating resource sharing or a user forwarding the shared resource, the user of the current terminal is a resource recipient user, and the resource sharing user and the resource recipient user may be the same user.
In this embodiment, the user may configure the resource that is allowed or not allowed to be acquired, which is shared by a specific user, so that the policy for acquiring the resource may be flexibly adjusted.
A request generating module 904, configured to generate a resource obtaining request according to the user identifier and the resource identifier currently logged in the social application.
Specifically, the request generating module 904 is configured to invoke a resource obtaining request generating interface specified by a preset code through the preset code in the process to generate a resource obtaining request according to a user identifier and a resource identifier currently logged in the social application. The user identifier is a character string uniquely representing the user, and may include at least one of a number, a letter, and a punctuation mark. The user identification may be a user account that logs into the social application. The request generating module 904 may encrypt the user identifier and the resource identifier when generating the resource obtaining request according to the user identifier and the resource identifier currently logged in the social application through a preset code in the process, where the resource obtaining request is a string of encrypted character strings.
The request sending module 905 is configured to send a resource obtaining request to a social application server to which the social application belongs, so that the social application server allocates a resource corresponding to the resource identifier to the user identifier.
Specifically, the social application server is a server of a social application, and the request sending module 905 calls a communication interface specified by a preset code through the preset code of the process to communicate with the social application server, so as to send the resource acquisition request to the social application server to which the social application belongs. And the social application server extracts the user identification and the resource identification from the resource acquisition request, so that the resource corresponding to the resource identification is allocated to the user identification. And allocating the resources enables all resources or part of resources corresponding to the resource identifications to be allocated to the user identifications. The resource corresponding to the resource identifier may be a numerical resource, such as a numerical resource of a virtual red packet.
The shared resource processing apparatus 900 described above may inject the preset code into the process of the social application, and may obtain the message generated in the social application in the process through the preset code, and if the message is the resource sharing message, may analyze the obtained resource identifier and combine with the user identifier to generate the resource obtaining request. The resource acquisition request is sent to the social application server through the process of the social application, so that the social application server can automatically allocate resources corresponding to the resource identification to the user identification. The shared resource can be automatically acquired through the process of the social application, the process is irrelevant to whether the notification function of the system notification bar is started or not, the use scene is not limited by the notification function of the system notification bar, and the process can acquire the shared resource more efficiently than the process which detects the message of the system notification bar.
As shown in FIG. 10, in one embodiment, the code injection module 901 includes: a storage space allocation module 901a, a dynamic link library loading module 901b, a function address acquisition module 901c and a function execution module 901 d.
The storage space allocation module 901a is configured to remotely call a system call function of a process of the social application, which is used for allocating a storage space, to allocate the storage space, and write a path of the dynamic link library in the storage space.
Specifically, the code injection module 901 may obtain a Process Identification (PID) of the social application through the secondary application, thereby identifying a process connected to the social application through the process. The code injection module 901 obtains and saves the register value of the process through the auxiliary application, so as to restore the original state of the process after injection is completed. The terminal acquires, through the auxiliary application, a call address of a system call function (mmap) of the process for allocating the memory space, a call address of a system call function (dlopen) for loading the dynamic link library, and a call address of a system call function (dlsym) for operating the dynamic link library. The storage space allocation module 901a thus calls a corresponding system call function (mmap) to allocate a segment of storage space according to the call address of the system call function of the process for allocating the storage space, and writes a path and a function call parameter of a dynamic link library (SO) in the allocated storage space, where the dynamic link library is a preset code that needs to be injected.
A dynamically linked library loading module 901b, configured to remotely call a system call function of the process for loading the dynamically linked library to load the dynamically linked library according to the path.
Specifically, the dynamic link library loading module 901b calls a corresponding system call function (dlopen) through the auxiliary application according to a call address of the system call function for loading the dynamic link library, so as to load the corresponding dynamic link library according to a path written in the storage space.
A function address obtaining module 901c, configured to obtain, by a system call function of the remote call process, a function address of a function in the dynamic link library, where the function is used for processing the shared resource.
Specifically, the function address obtaining module 901c calls a corresponding system call function (dlsym) according to a call address of a system call function for operating the dynamic link library through the secondary application to obtain a function address from the loaded dynamic link library according to a function call parameter written in the storage space.
A function executing module 901d, configured to execute a corresponding function according to the obtained function address.
Specifically, the function of the obtained function address is used for processing shared resources, and is mainly used for obtaining messages generated in social sessions; if the acquired message is a resource sharing message, acquiring a resource identifier in the message; generating a resource acquisition request according to the user identifier and the resource identifier of the current login social application; and sending a resource acquisition request to a social application server to which the social application belongs, so that the social application server allocates resources corresponding to the resource identifiers for the user identifiers.
In this embodiment, the dynamic link library is injected into the process of the social application in a remote injection manner to execute a corresponding function in the dynamic link library, so that the process can automatically process the resource sharing message after acquiring the resource sharing message.
As shown in fig. 11, in an embodiment, the preset code is injected into the process of the social application through the auxiliary application, and the shared resource processing apparatus 900 further includes: a resource allocation result receiving module 906, a resource allocation result obtaining module 907, and a resource allocation result processing module 908.
A resource allocation result receiving module 906, configured to receive, through the process, a resource allocation result fed back by the social application server.
Specifically, after the social application server performs resource allocation according to the resource acquisition request, the social application server feeds back a resource allocation result to the terminal. The resource allocation result includes a result of successful resource allocation and a result of failed resource allocation.
A resource allocation result obtaining module 907, configured to obtain a resource allocation result from the process through the secondary application.
Specifically, the resource allocation result obtaining module 907 may obtain the resource allocation result fed back by the application server through an interface provided by the preset code in the process actively by the auxiliary application, or may passively receive the resource allocation result transmitted to the auxiliary application by the process through the preset code therein.
The resource allocation result processing module 908 is configured to display the resource allocation result, and/or display the statistical result after performing statistics according to the obtained resource allocation result.
The resource allocation result processing module 908 may display the resource allocation result through the auxiliary application, specifically, may display the resource allocation result through the notification message of the system notification bar, or may display the resource allocation result in a resource allocation result display page of the auxiliary application.
The resource allocation result processing module 908 performs statistics on the obtained resource allocation result through the auxiliary application, and may specifically perform statistics on the number of successful resource allocation times or the total amount of the obtained numerical resource. The counted time period may be a time period from the injection of the preset code to the current time, or may be a time period of the day, the week, or the month.
The resource allocation result processing module 908 may display the resource allocation result and the statistical result at the same time through the auxiliary application, or may display only one of the resource allocation result and the statistical result. In one embodiment, the terminal may further share the resource allocation result and/or the statistical result to the social friend through the auxiliary application.
In this embodiment, the resource allocation result fed back by the social application server after the process of the social application triggers the resource acquisition request can be acquired through the auxiliary application and displayed, so that the user can know the resource acquisition condition through the social application in time through the auxiliary application.
As shown in fig. 12, in an embodiment, the preset code is injected into the process of the social application through the auxiliary application, and the shared resource processing apparatus 900 further includes: a version information acquisition module 909, a configuration information download module 910, and a configuration information transmission module 911.
A version information obtaining module 909, configured to obtain version information of the social application through the auxiliary application. The version information of the social application is information that can uniquely identify the version of the social application, and is typically a string of characters, which may include at least one of numbers, punctuation marks, and characters. After the terminal installs the social application with the updated version, the corresponding version information is also updated.
A configuration information downloading module 910, configured to download configuration information matching the version information from the secondary application server. Specifically, the auxiliary application server is a server of the auxiliary application, and the configuration information downloading module 910 downloads, from the auxiliary application server, configuration information matching the acquired version information through the auxiliary application, where the configuration information is used to configure preset code in a process, so that the preset code in the process is executed according to the configuration information when executed.
If the configuration information downloading module 910 does not download the configuration information matched with the version information through the auxiliary application, which indicates that the corresponding configuration information is not stored on the auxiliary application server, the configuration information downloading module 910 may suspend the downloading task through the auxiliary application, and download the configuration information matched with the version information again after a preset duration; or the configuration information downloading module 910 may wait after suspending the downloading task until receiving the corresponding configuration information pushed by the secondary application server after updating the configuration information matching with the version information.
In one embodiment, the version information obtaining module 909 may obtain the version information of the social application periodically through the auxiliary application and compare the version information with the version information corresponding to the configuration information that was last transferred to the process, and if the version information does not match the version information, the configuration information downloading module 910 downloads the configuration information that matches the version information from the auxiliary application server.
A configuration information sending module 911, configured to transmit the configuration information to the process, so that the process is executed according to the configuration information when at least one of acquiring the resource identifier in the message through a preset code, generating a resource acquisition request according to the user identifier and the resource identifier currently logged in the social application, and sending the resource acquisition request to the social application server to which the social application belongs.
Specifically, the configuration information sending module 911 transfers the downloaded configuration information to the process through the auxiliary application, so that the process updates the configuration according to the transferred configuration information. The configuration information may include at least one of information specifying an interface called by the parsing message, information specifying an interface called when the resource acquisition request is generated, and information of an interface called when the resource acquisition request is transmitted.
In this embodiment, the auxiliary application server stores the configuration information matched with the version information of the social application, so that the auxiliary application can download corresponding configuration information according to the version information of the social application to perform corresponding configuration on the preset code in the social application, so that the preset code injected in the process can be applicable to the social application of the latest version, and the situation that the preset code is unavailable due to version update is avoided.
As shown in fig. 13, in one embodiment, the shared resource processing apparatus 900 further includes: a random delay time length obtaining module 912, configured to obtain a random delay time length within a preset delay time length range; one of the message parsing module 903, the request generating module 904 and the request sending module 905 is configured to perform the corresponding function according to the random delay time length delay.
Specifically, the preset delay time length range is a range in which a random delay time length is desirable, and the preset delay time length range may have a minimum value and a maximum value, and a random delay time length is randomly generated within the range, so that one of the message parsing module 903, the request generating module 904, and the request sending module 905 performs a corresponding function according to the random delay time length delay.
In the embodiment, a certain step executed for acquiring the shared resources is executed by randomly delaying the execution of the preset code, so that the phenomenon that the social application server is mistakenly judged to use the plug-in through statistical analysis can be avoided, and the method is safer and more reliable.
In an embodiment, the request sending module 904 is specifically configured to send a resource obtaining request to a social application server to which the social application belongs, so that the social application server divides the numerical resource from the remaining numerical resources corresponding to the resource identifier and allocates the divided numerical resource to the numerical resource account corresponding to the user identifier.
Specifically, in this embodiment, the resource corresponding to the resource identifier is a numerical resource, and after receiving the resource acquisition request, the social application server may divide the numerical resource from the remaining numerical resources corresponding to the resource identifier and allocate the numerical resource to the numerical resource account corresponding to the user identifier until the remaining numerical resources corresponding to the resource identifier are 0. The value resource account can be a bank account or a third party payment account, and can be stored in a bank server or a third party payment platform.
Wherein, the value resource is the value of virtual red envelope, the value of electronic voucher or other shareable value resource. After receiving the resource acquisition request, the social application server may first determine whether the remaining numerical resource corresponding to the resource identifier is 0, and if the remaining numerical resource is 0, may directly generate a resource allocation result of the resource allocation failure; if the remaining value resource is not 0, the value resource can be divided from the remaining value resource corresponding to the resource identifier and allocated to the value resource account corresponding to the user identifier.
Further, if the resource corresponding to the resource identifier is not acquired, the corresponding remaining numerical resource is all the numerical resources corresponding to the resource identifier; if the resource corresponding to the resource identifier is acquired and has a residue, the corresponding residue numerical resource is obtained by subtracting the acquired numerical resource from all numerical resources; if the resources corresponding to the resource identifiers have been completely acquired, the corresponding remaining numerical resources are 0, and a failure in allocating the numerical resources may occur.
In this embodiment, when the resource acquisition request is processed by the social application server, the numerical resource is divided from the remaining numerical resources corresponding to the resource identifier and allocated to the numerical resource account corresponding to the user identifier, and the numerical resource is stored in the numerical resource account, so that the security of the numerical resource can be guaranteed.
In one embodiment, the resource corresponding to the resource identifier is a numerical resource of a virtual red packet; and the social application server divides the numerical resources from the residual numerical resources corresponding to the resource identifiers according to one of a random dividing mode and an equal dividing mode.
Specifically, the virtual red envelope is a virtual object having a numerical resource representing the amount of funds, and the numerical resource of the virtual red envelope can be transferred, but the numerical resource of the virtual red envelope is reduced after the transfer.
Dividing the numerical resource from the residual numerical resource corresponding to the resource identifier according to a random division mode means dividing the total amount of the numerical resource of the virtual red packet according to the number of the division parts corresponding to the resource identifier, wherein each part of the numerical resource is random, and the social application server allocates one part of the numerical resource to the corresponding user identifier each time the social application server processes the resource acquisition request. The equal dividing mode is different from the random dividing mode, and is divided equally when the number of the parts is divided, namely, the numerical value resources of each part are equal.
In this embodiment, the social application server divides the resource into the remaining resource based on the resource identifier in a random or equal division manner, so that users can select a richer interaction manner when the resource is shared.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a non-volatile storage medium such as a magnetic disk, an optical disk, a Read-Only Memory (ROM), or a Random Access Memory (RAM).
The technical features of the embodiments described above may be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the embodiments described above are not described, but should be considered as being within the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (18)

1. A method of shared resource processing, the method comprising:
injecting a preset code into a process of the social application;
acquiring a message generated in a social session through the preset code in the process, calling a message analysis interface specified by the preset code through the preset code to analyze the message to acquire data of a message type field, and judging whether the message is a resource sharing message or not according to the data of the message type field;
if the acquired message is a resource sharing message, then
Acquiring a resource identifier in the message;
calling a resource acquisition request generation interface specified by the preset code through the preset code so as to generate a resource acquisition request according to a user identifier currently logging in the social application and the resource identifier;
and calling a communication interface appointed by a preset code through the preset code so as to send the resource acquisition request to a social application server to which the social application belongs, so that the social application server allocates resources corresponding to the resource identification for the user identification.
2. The method of claim 1, wherein the injecting the preset code into the social application process comprises:
remotely calling a system call function of a process of the social application for allocating a storage space to allocate the storage space, and writing a path of a dynamic link library in the storage space;
remotely calling a system call function of the process for loading a dynamic link library to load the dynamic link library according to the path;
remotely calling a system calling function of the process for operating the dynamic link library to obtain a function address of a function for processing the shared resource in the dynamic link library;
and executing the corresponding function according to the acquired function address.
3. The method of claim 1, wherein the preset code is injected into the process of the social application through an auxiliary application; the method further comprises the following steps:
receiving a resource allocation result fed back by the social application server through the process;
obtaining, by the secondary application, the resource allocation result from the process;
and displaying the resource allocation result, and/or displaying the statistical result after performing statistics according to the acquired resource allocation result.
4. The method of claim 1, wherein the preset code is injected into the process of the social application through an auxiliary application; the method further comprises the following steps:
acquiring version information of the social application through the auxiliary application;
downloading configuration information matched with the version information from an auxiliary application server;
and transmitting the configuration information to the process, so that the process is executed according to the configuration information when at least one of acquiring the resource identifier in the message through the preset code, generating a resource acquisition request according to the user identifier currently logged in the social application and the resource identifier, and sending the resource acquisition request to a social application server to which the social application belongs is executed.
5. The method of claim 1, further comprising:
acquiring a random delay time length within a preset delay time length range, and performing one of the following steps according to the random delay time length in a delayed manner:
judging whether the acquired message is a resource sharing message;
acquiring a resource identifier in the message;
generating a resource acquisition request according to the user identifier currently logging in the social application and the resource identifier;
and sending the resource acquisition request to a social application server to which the social application belongs.
6. The method according to claim 1, wherein if the obtained message is a resource sharing message, obtaining a resource identifier in the message comprises:
and if the acquired message is a resource sharing message and the resource sharing user to which the resource corresponding to the resource identifier belongs is configured to allow the acquisition of the shared resource, acquiring the resource identifier in the message.
7. The method of claim 1, wherein the sending the resource obtaining request to a social application server to which the social application belongs, so that the social application server allocates a resource corresponding to the resource identifier to the user identifier comprises:
and sending the resource acquisition request to a social application server to which the social application belongs, so that the social application server divides numerical value resources from the residual numerical value resources corresponding to the resource identification and allocates the numerical value resources to the numerical value resource account corresponding to the user identification.
8. The method of claim 7, wherein the resource corresponding to the resource identifier is a numerical resource of a virtual red packet.
9. A shared resource processing apparatus, the apparatus comprising:
the code injection module is used for injecting preset codes into the process of the social application;
the message acquisition module is used for acquiring messages generated in the social conversation through the preset codes in the process;
the message analysis module is used for calling a message analysis interface appointed by the preset code through the preset code to analyze the message to obtain data of a message type field, judging whether the message is a resource sharing message or not according to the data of the message type field, and if the obtained message is the resource sharing message, obtaining a resource identifier in the message;
the request generation module is used for calling a resource acquisition request generation interface appointed by the preset code through the preset code so as to generate a resource acquisition request according to the user identifier currently logging in the social application and the resource identifier;
and the request sending module is used for calling a communication interface appointed by a preset code through the preset code so as to send the resource obtaining request to a social application server to which the social application belongs, so that the social application server allocates resources corresponding to the resource identifiers for the user identifiers.
10. The apparatus of claim 9, wherein the code injection module comprises:
the storage space allocation module is used for remotely calling a system call function used for allocating the storage space of the process of the social application to allocate the storage space and writing a path of a dynamic link library in the storage space;
the dynamic link library loading module is used for remotely calling a system calling function of the process for loading the dynamic link library so as to load the dynamic link library according to the path;
a function address obtaining module, configured to remotely call a system call function of the process, which is used to operate a dynamic link library, to obtain a function address of a function in the dynamic link library, which is used to process a shared resource;
and the function execution module is used for executing the corresponding function according to the acquired function address.
11. The apparatus of claim 9, wherein the preset code is injected into the process of the social application through an auxiliary application; the device further comprises:
a resource allocation result receiving module, configured to receive, through the process, a resource allocation result fed back by the social application server;
a resource allocation result obtaining module, configured to obtain the resource allocation result from the process through the auxiliary application;
and the resource allocation result processing module is used for displaying the resource allocation result and/or displaying the statistical result after statistics is carried out according to the acquired resource allocation result.
12. The apparatus of claim 9, wherein the preset code is injected into the process of the social application through an auxiliary application; the device further comprises:
the version information acquisition module is used for acquiring the version information of the social application through the auxiliary application;
the configuration information downloading module is used for downloading configuration information matched with the version information from the auxiliary application server;
and the configuration information sending module is used for transmitting the configuration information to the process, so that the process is executed according to the configuration information when at least one of the resource identification in the message is obtained through the preset code, a resource obtaining request is generated according to the user identification currently logged in the social application and the resource identification, and the resource obtaining request is sent to a social application server to which the social application belongs.
13. The apparatus of claim 9, further comprising:
the random delay time length acquisition module is used for acquiring the random delay time length within the range of the preset delay time length; one of the message analysis module, the request generation module and the request sending module is used for executing corresponding functions according to the random delay time length delay.
14. The apparatus according to claim 9, wherein the message parsing module is specifically configured to, if the obtained message is a resource sharing message, and a resource sharing user to which a resource corresponding to the resource identifier belongs is configured to allow obtaining of the shared resource, obtain the resource identifier in the message.
15. The apparatus of claim 9, wherein the request sending module is specifically configured to send the resource obtaining request to a social application server to which the social application belongs, so that the social application server divides a value resource from remaining value resources corresponding to the resource identifier and allocates the value resource to a value resource account corresponding to the user identifier.
16. The apparatus of claim 15, wherein the resource corresponding to the resource identifier is a numerical resource of a virtual red packet.
17. A computer-readable storage medium, storing a computer program which, when executed by a processor, causes the processor to carry out the steps of the method according to any one of claims 1 to 8.
18. A terminal comprising a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of the method according to any one of claims 1 to 8.
CN201510882222.5A 2015-12-03 2015-12-03 Shared resource processing method and device Active CN106844061B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510882222.5A CN106844061B (en) 2015-12-03 2015-12-03 Shared resource processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510882222.5A CN106844061B (en) 2015-12-03 2015-12-03 Shared resource processing method and device

Publications (2)

Publication Number Publication Date
CN106844061A CN106844061A (en) 2017-06-13
CN106844061B true CN106844061B (en) 2020-02-14

Family

ID=59149936

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510882222.5A Active CN106844061B (en) 2015-12-03 2015-12-03 Shared resource processing method and device

Country Status (1)

Country Link
CN (1) CN106844061B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107241335B (en) * 2017-06-16 2020-01-31 上海闻泰信息技术有限公司 Information sharing method and device
CN107608790A (en) * 2017-09-06 2018-01-19 阿里巴巴集团控股有限公司 Resource allocation methods and device and electronic equipment
CN109862049B (en) * 2017-11-29 2022-05-24 Tcl科技集团股份有限公司 Resource sharing method, intelligent terminal and storage medium
CN108322465B (en) * 2018-01-31 2021-09-24 腾讯科技(深圳)有限公司 Resource sharing, requesting and processing method and device, storage medium and equipment
CN110879747B (en) * 2018-09-05 2022-08-05 杭州海康威视系统技术有限公司 Resource management method and device
CN109634741A (en) * 2018-11-09 2019-04-16 天津五八到家科技有限公司 Resource allocation methods and device
CN112070608B (en) * 2020-08-20 2024-03-19 财付通支付科技有限公司 Information processing method, device, medium and electronic equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102722403A (en) * 2012-05-30 2012-10-10 福建天晴数码有限公司 Method for taking over Windows desktop
CN103268434A (en) * 2013-06-07 2013-08-28 四川九洲电器集团有限责任公司 Embedded type system and remote injection running method thereof
CN103973769A (en) * 2014-01-29 2014-08-06 腾讯科技(深圳)有限公司 Virtual item transmitting method, receiving method, device and system
CN104217163A (en) * 2014-09-10 2014-12-17 珠海市君天电子科技有限公司 Method and device for detecting structured exception handling (SEH) attacks
CN104615747A (en) * 2015-02-11 2015-05-13 腾讯科技(深圳)有限公司 Information processing method, client side and server
CN105120053A (en) * 2015-06-24 2015-12-02 惠州Tcl移动通信有限公司 Intelligent terminal and information identification method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102722403A (en) * 2012-05-30 2012-10-10 福建天晴数码有限公司 Method for taking over Windows desktop
CN103268434A (en) * 2013-06-07 2013-08-28 四川九洲电器集团有限责任公司 Embedded type system and remote injection running method thereof
CN103973769A (en) * 2014-01-29 2014-08-06 腾讯科技(深圳)有限公司 Virtual item transmitting method, receiving method, device and system
CN104217163A (en) * 2014-09-10 2014-12-17 珠海市君天电子科技有限公司 Method and device for detecting structured exception handling (SEH) attacks
CN104615747A (en) * 2015-02-11 2015-05-13 腾讯科技(深圳)有限公司 Information processing method, client side and server
CN105120053A (en) * 2015-06-24 2015-12-02 惠州Tcl移动通信有限公司 Intelligent terminal and information identification method

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
Android中微信抢红包插件原理解析和开发实现;尼古拉斯_赵四;《https://blog.csdn.net/jiangwei0910410003/article/details/48895153》;20151004;1-12 *
代码注入之远程线程篇;小宝马的爸爸;《https://www.cnblogs.com/BoyXiao/archive/2011/08/11/2134367.html》;20110811;正文第10-20页 *

Also Published As

Publication number Publication date
CN106844061A (en) 2017-06-13

Similar Documents

Publication Publication Date Title
CN106844061B (en) Shared resource processing method and device
CN110428257B (en) Password cracking task processing method, equipment and storage medium
US9448781B2 (en) Application installer transmission system, server, and program
CN109413043B (en) Method and device for realizing dynamic configuration of database, electronic equipment and storage medium
US10542422B2 (en) Data backup method, storage medium and electronic device
US20150207893A1 (en) Push message service system and method
US11245725B2 (en) Dynamically updating policy controls for mobile devices and applications
CN105302598B (en) A kind of time control method and device of application operation
CN111355723B (en) Single sign-on method, device, equipment and readable storage medium
CN110888858A (en) Database operation method and device, storage medium and electronic device
CN108132832B (en) Application program starting method and device
CN111782988A (en) Method, device, computer system and storage medium for determining source of application program
CN112199151B (en) Application program running method and device
CN112732659B (en) Application sharing method and device
CN108241616B (en) Message pushing method and device
US9900756B2 (en) Dynamically updating policy controls for mobile devices and applications via policy notifications
US10248790B2 (en) Information processing system, controlling method, and controlling computer program
CN109815202B (en) Log editing method and related device
CN108345508B (en) Interface call testing method and device
CN106681801B (en) The execution method and apparatus of event
CN106708737B (en) Test method and device
CN108521349A (en) A kind of method and system of the installation number of statistics installation kit
CN110286956B (en) Plug-in operation method and device and electronic equipment
CN108829824B (en) Resource processing method and device in internet operation activity
CN113434234A (en) Page jump method, device, computer readable storage medium and processor

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant