CN112631635A - Live broadcast client updating method and device, electronic equipment and storage medium - Google Patents

Live broadcast client updating method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN112631635A
CN112631635A CN202110258499.6A CN202110258499A CN112631635A CN 112631635 A CN112631635 A CN 112631635A CN 202110258499 A CN202110258499 A CN 202110258499A CN 112631635 A CN112631635 A CN 112631635A
Authority
CN
China
Prior art keywords
code block
live
picture acquisition
data
live broadcast
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.)
Granted
Application number
CN202110258499.6A
Other languages
Chinese (zh)
Other versions
CN112631635B (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.)
Wuhan Ouyuan Network Video Co ltd
Original Assignee
Wuhan Ouyuan Network Video 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 Wuhan Ouyuan Network Video Co ltd filed Critical Wuhan Ouyuan Network Video Co ltd
Priority to CN202110258499.6A priority Critical patent/CN112631635B/en
Publication of CN112631635A publication Critical patent/CN112631635A/en
Application granted granted Critical
Publication of CN112631635B publication Critical patent/CN112631635B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates

Landscapes

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

Abstract

The embodiment of the invention discloses a live client updating method and device, electronic equipment and a storage medium. The method comprises the following steps: in response to receiving update data sent by a live broadcast platform server, detecting the running state of a live broadcast code block and the running state of a picture acquisition code block, wherein the picture acquisition code block comprises an acquisition subcode block; when the running state of the live code block is detected to be the live state and the running state of the picture acquisition code block is detected to be the state of the injected target process, determining the data type of the update data; when the data type of the updated data is the data type corresponding to the picture acquisition code block, the live broadcast client is updated, and when the live broadcast client is in a game live broadcast state, the new function of the live broadcast client can be updated in real time, so that a user can experience the newly added function of the live broadcast client in time, and the user experience is greatly improved.

Description

Live broadcast client updating method and device, electronic equipment and storage medium
Technical Field
The embodiment of the invention relates to the technical field of computers, in particular to a live client updating method and device, electronic equipment and a storage medium.
Background
In the existing live broadcast client updating method, when a main broadcast is live broadcasting a game, some new experience functions are newly added to the live broadcast client, for example, the live broadcast client newly adds a function of interactively sending a barrage or displaying the barrage in the game, or can acquire attribute information of a certain role in the live broadcast game, and the like. The anchor is usually required to close the game being live and close the live client, and update the live client after the live client is closed. After the live client is updated, a series of operations such as opening the updated live client and re-opening the live game are needed to play the live game or watch the live game. However, the live game is closed, the live client is closed, and the live client is updated, so that the problem that the experience real-time performance of the new function of the live client is poor exists, a user cannot experience the newly added function of the live client in time, and the user experience is greatly influenced.
Disclosure of Invention
The embodiment of the invention provides a live client updating method and device, electronic equipment and a storage medium, so that a new function of a live client can be updated in real time when the live client is in a game live state, a user can experience the newly added function of the live client in time, and the user experience is greatly improved.
In a first aspect, an embodiment of the present invention provides a live client update method, where the method includes:
responding to the received update data sent by a live broadcast platform server, detecting the running state of a live broadcast code block and the running state of a picture acquisition code block, wherein the picture acquisition code block comprises an acquisition sub-code block;
when the operation state of the live code block is detected to be a live state and the operation state of the picture acquisition code block is detected to be a state of being injected into a target process, determining the data type of the update data;
when the data type of the updated data is the data type corresponding to the image acquisition code block, copying the code corresponding to the acquired sub-code block into a target process so that the target process executes the code corresponding to the acquired sub-code block, and removing the image acquisition code block from the target process based on a preset resource management logic of a live broadcast client;
when the fact that the picture acquisition code block is completely removed from the target process is detected, the updating data are covered into the storage directory corresponding to the picture acquisition code block, the updating data covered into the storage directory corresponding to the picture acquisition code block are injected into the target process based on the preset resource management logic, and the code in the execution state is removed from the target process.
In a second aspect, an embodiment of the present invention further provides a live client update apparatus, where the apparatus includes:
the operation state detection module is used for responding to the received updated data sent by the live broadcast platform server, detecting the operation state of a live broadcast code block and the operation state of a picture acquisition code block, wherein the picture acquisition code block comprises an acquisition subcode block;
the data type determining module is used for determining the data type of the updating data when the running state of the live code block is detected to be the live state and the running state of the picture acquisition code block is detected to be the state of the injected target process;
a picture acquisition code block removal module, configured to copy, when the data type of the update data is a data type corresponding to a picture acquisition code block, a code corresponding to the acquired sub-code block to a target process, so that the target process executes to acquire a code corresponding to the sub-code block, and remove, based on a preset resource management logic of a live broadcast client, the picture acquisition code block from the target process;
and the update data injection module is used for covering the update data into the storage directory corresponding to the picture acquisition code block when the picture acquisition code block is detected to be completely removed from the target process, injecting the update data covered into the storage directory corresponding to the picture acquisition code block into the target process based on the preset resource management logic, and removing the code in an execution state from the target process.
In a third aspect, an embodiment of the present invention further provides an electronic device, where the electronic device includes:
one or more processors;
a storage device for storing one or more programs which, when executed by the processor, cause the processor to implement a live client update method as provided by any embodiment of the invention.
In a fourth aspect, embodiments of the present invention also provide a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform a live client update method as provided in any of the embodiments of the present invention.
According to the technical scheme of the embodiment, the running state of the live broadcast code block and the running state of the picture acquisition code block are detected by responding to the received update data sent by the live broadcast platform server, and the picture acquisition code block comprises the acquisition sub-code block. And when the running state of the live code block is detected to be the live state and the running state of the picture acquisition code block is detected to be the state of the injected target process, determining the data type of the update data.
And when the data type of the updated data is the data type corresponding to the image acquisition code block, copying the code corresponding to the acquired sub-code block into the target process so that the target process executes the code corresponding to the acquired sub-code block, and removing the image acquisition code block from the target process based on the preset resource management logic of the live broadcast client. Before the picture acquiring code block is removed from the target process, the code corresponding to the acquiring sub code block is copied to the target process and executed, so that the live code block in the live broadcast state can acquire the picture in the target process in real time. Meanwhile, the method plays a role in carrying in the updating process of the live client.
And when the fact that the picture acquisition code block is completely removed from the target process is detected, the updating data is covered into the storage directory corresponding to the picture acquisition code block, the updating data covered into the storage directory corresponding to the picture acquisition code block is injected into the target process based on the preset resource management logic, and the code in the execution state is removed from the target process. Before the codes in the execution state are removed from the target process, the updating data are injected into the target process to update the live client, so that the new functions of the live client can be updated in real time when the live client is in the game live state, the user can experience the newly added functions of the live client in time, and the user experience effect is greatly improved.
Drawings
In order to more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, a brief description is given below of the drawings used in describing the embodiments. It should be clear that the described figures are only views of some of the embodiments of the invention to be described, not all, and that for a person skilled in the art, other figures can be derived from these figures without inventive effort.
Fig. 1 is a schematic flowchart of a live client update method according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating a live client updating method according to a second embodiment of the present invention;
fig. 3 is a schematic flowchart of a live client update method according to a third embodiment of the present invention;
fig. 4 is a flowchart illustrating a live client updating method according to a fourth embodiment of the present invention;
fig. 5 is a schematic block diagram of a live client update apparatus according to a fifth embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device according to a sixth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a schematic flow chart of a live client update method according to an embodiment of the present invention, where the method is applicable to a live client in a game live state, where a live client is updated without interruption of a live state of the live client, and the method may be executed by a live client update device, where the live client update device may be implemented in a software and/or hardware manner, and the live client update device may be integrated in a client system and installed in an electronic device such as a mobile phone and a computer along with the client system.
As shown in fig. 1, the method of the present embodiment includes:
s110, responding to the received updated data sent by the live broadcast platform server, detecting the running state of the live broadcast code block and the running state of the picture acquisition code block, wherein the picture acquisition code block comprises an acquisition subcode block.
Wherein, the live client can be understood as a live software application. The live client may include a live code block and a picture taking code block. The functions that the live code block may provide may include: the interface display function of the live broadcast client side, the function of sending the received data sent by the picture acquisition code block to a live broadcast platform server, and the function of detecting the state of the picture acquisition code block. The picture acquisition code block may provide a function of acquiring picture data corresponding to other applications, such as acquiring picture data of the game 1 in real time. The picture capture code block does not have an executable function, that is, the function in the picture capture code block is a function of functional nature, and it is necessary to obtain picture data corresponding to another application depending on the live code block. The relationship between the live code block and the picture taking code block may be: the live code block controls or calls the picture acquisition code block.
Wherein the picture acquisition code block may comprise an acquisition sub-code block and a control sub-code block. The acquisition sub-code block may be understood as a core and a basic code when the live client is in a live state, that is, the acquisition sub-code block may be one or more function functions for acquiring picture data. Specifically, the functions of the live client in the live state may include: the method comprises the steps of a function of communicating with a process corresponding to a live client, a function of hooking processes of other application programs (hook) so as to obtain a rendering handle of the process, a function of obtaining a game picture through shared textures of a game, and a function of encoding the game picture and sending picture data to the live client through inter-process communication. Here, the control sub-code block can be understood as a code of a main function in the picture taking code block, that is, the control sub-code block is a function of a control function. The control sub-code block may be used for controlling and scheduling the picture acquisition code block, i.e. a function in the control sub-code block may call the control sub-code block. The control subcode block may also include preset control logic code. Specifically, the function of controlling the sub-code block may include: the interface control can be drawn in the process of other application programs, so that the game live interface display data (such as drawing bullet screen content) can be conveniently drawn, the acquisition subcode block can be called to acquire live picture data, the coded picture data can be sent, and the like.
It should be noted that the coupling degree between the sub-code block and the other code blocks is low, so as to facilitate the update of the other code blocks.
The live platform server may be a video and audio encoding device. The live platform server may be used to store update data for the live client. The update data may include: and updating the code block to be updated, and the name, the version identification and the hash (hash) value corresponding to the code block to be updated.
Wherein, the code block to be updated may include: and the picture to be updated acquires a code block and a bug (bug) repair code block to be updated. The picture to be updated acquiring code block can be understood as a code corresponding to a newly added function of the live broadcast client, for example, when the anchor broadcast is live broadcast in a game, the live broadcast can interact with a user in a live broadcast game interface to send a bullet screen or a function code corresponding to the operation of displaying the bullet screen. The bug fix code block to be updated can be used for further patching bugs existing in the live broadcast client, namely, can be used for fixing bugs in the live broadcast client, so that the live broadcast client is further optimized, and the safety of the live broadcast client is improved.
The name corresponding to the code block to be updated may be a predefined name, for example, a picture capture code block. The version identifier corresponding to the code block to be updated may be a data type for identifying data to be updated. The naming rule of the version identification may be preset. The hash value corresponding to the code block to be updated can be used for judging whether the picture acquisition code block downloaded by the live broadcast client is consistent with the picture acquisition code block sent by the live broadcast platform server.
The running state of the live code block in the live client can comprise a live state and an off-live state. The running state of the picture taking code block may include a state in which the target process has been injected and a state in which the target process has not been injected.
The target process may be understood as a process corresponding to another application, which may be a game process, a process of a drawing application, and the like, and is not limited herein.
Specifically, a storage directory of the update data is set in advance. And when receiving the update data sent by the live broadcast platform server, storing the update data into a preset storage directory. And when the update data is detected to be stored in a preset storage directory, detecting the running state of a live broadcast code block and the running state of a picture acquisition code block in the current live broadcast client.
And S120, when the running state of the live code block is detected to be the live state and the running state of the picture acquisition code block is detected to be the state of the injected target process, determining the data type of the update data.
The live broadcast state can be understood as a state in which a live broadcast code block in a live broadcast client is in execution. The target process may be a game process. The injecting of the picture acquisition code chunks into the target process may be injecting the picture acquisition code chunks into the game process. Injecting the picture taking code blocks into the game progress can be understood as: and operating the corresponding code of the picture acquisition code block in the address space of the game process. Determining the data type of the update data may be understood as: and judging the data type of the updating data sent by the live platform server. The data types of the update data may include: and the picture to be updated acquires the type corresponding to the code block and the type corresponding to the bug (bug) repair code block to be updated.
Specifically, a judgment rule of the data type of the update data is set in advance. And when detecting that the codes corresponding to the live broadcast code blocks are in an execution state and the pictures acquire that the codes corresponding to the code blocks run in the address space of the game process, judging the data types of the updated data sent by the live broadcast platform server, thereby determining the data types of the updated data.
S130, when the data type of the updated data is the data type corresponding to the image acquisition code block, copying the code corresponding to the acquired sub-code block into the target process so that the target process executes the code corresponding to the acquired sub-code block, and removing the image acquisition code block from the target process based on the preset resource management logic of the live broadcast client.
The preset resource management logic may be a resource release logic for releasing the picture acquisition module code blocks, and is configured to release resources of the game process occupied by the picture acquisition code blocks. The resources of the picture taking code block using the game process may include the following resources: thread resources, memory resources, window resources, memory mapping files, named pipes, texture handles, hook for hook games. Removing the picture taking code block from the target process may be understood as deleting the picture taking code block stored in the text area in the address space corresponding to the target process.
The reason for presetting the resource management logic is that: after the picture acquiring code block is injected into the game process, the resources of the game process are used, and the resources used when the picture acquiring code block is injected into the game process are the resources of the game process, so the resources need to be accurately released before and after the resources are used, and the game is prevented from being crashed due to the leakage of the game resources. The advantages of presetting the resource management logic are that: when the running state of the picture acquiring code block is the state of the injected game process, the resource of the game process used by the current picture acquiring code block is indicated, and when some game live broadcast functions need to be added to the live broadcast client, namely, when the picture acquiring code block in the live broadcast client is updated, the resource used by the current picture acquiring code block can be accurately released, so that the picture acquiring code block can be removed from the game process, and the picture acquiring code block can be updated conveniently.
In order to improve the software development efficiency and avoid that a software developer writes resources required to be used into other resources in the code development process, optionally, a resource import table corresponding to the picture acquisition code block is preset, after the picture acquisition code block is compiled, a file corresponding to the picture acquisition code block can be analyzed, and the resource import table corresponding to the current picture acquisition code block can be scanned, so that the resources used by the current picture acquisition code block are judged.
In order to improve the accuracy of developing the picture acquisition code block in the live broadcast client, optionally, when it is detected that the resource used by the picture acquisition code block in the resource import table is inconsistent with the target used resource corresponding to the picture acquisition code block, the prompt information that the resource used by the current picture acquisition code block is incorrect is sent, so as to improve the accuracy of software development.
The reason for copying the codes corresponding to the acquired sub-code blocks into the target process is as follows: the image acquisition code block injected into the target process forms a module chain corresponding to the image acquisition code block in a system of a live broadcast client, the image acquisition code block is registered in the system of the live broadcast client, and the image acquisition code block is injected into the target process because the code blocks with the same name cannot exist in the target process at the same time. The benefits of such a process are: the live client can be used normally, and the game breakdown can be avoided.
Specifically, a code space is allocated in the target process in advance, and when the data type of the update data received by the live broadcast client and sent by the live broadcast platform server is the data type corresponding to the picture acquisition code block, the code corresponding to the acquisition sub-code block in the current update data is copied to the preset code space. When detecting that the code is copied to the preset code space of the target process, the target process executes the code copied to the preset code space, that is, the target process executes the code corresponding to the acquiring sub-code block in the code space, so as to remove the image acquiring code block being executed in the live broadcast client. And when detecting that the execution of codes in a preset code space in the target process is finished, presetting resource management logic according to the quota of the live broadcast client, and deleting the picture acquisition code blocks from the picture acquisition code blocks stored in a text area in the address space corresponding to the target process.
S140, when the picture acquisition code block is detected to be completely removed from the target process, the updating data is covered in the storage directory corresponding to the picture acquisition code block, the updating data covered in the storage directory corresponding to the picture acquisition code block is injected into the target process based on the preset resource management logic, and the code in the execution state is removed from the target process.
The overlaying of the update data into the storage directory corresponding to the picture acquisition code block can be understood as: and copying the updating data to a storage directory corresponding to the picture acquisition code block, and replacing the picture acquisition code block stored in the current live client so as to enable the updating data stored in the current live client, namely the picture acquisition code block stored in the current client, to be the updated picture acquisition code block.
Specifically, the update data is set in advance to be covered to the storage directory corresponding to the acquired sub-code block. And preset resource management logic. And when the picture acquisition code block is detected to be completely removed from the target process, acquiring a storage directory of the update data in the live client. And according to the storage directory of the update data, the update data stored in the live broadcast client is covered in the storage directory corresponding to the acquired code block. When detecting that the update data in the live client is covered to the storage directory corresponding to the acquired code block, according to a preset resource management logic, injecting the update data covered to the storage directory corresponding to the picture acquisition code block into a target process, namely, into a game process, and simultaneously removing a code corresponding to an acquisition sub-code block in an execution state in the target process from the target process. The benefits of such a process are: when the anchor plays the game directly, some live interactive functions are newly added to the live client, the anchor can update the live client in real time and experience the newly added functions of the live client in real time, and user experience is improved.
Optionally, on the basis of this embodiment, the method further includes: when the running state of the live broadcast code block is detected to be a non-live broadcast state and the running state of the picture acquisition code block is detected to be a state of not injecting a target process, determining a storage directory corresponding to the picture acquisition code block; and according to the storage directory corresponding to the picture acquisition code block, carrying out merging and/or replacement operation on the storage directory corresponding to the picture acquisition code block of the direct broadcasting client.
The running state of the live code block is a non-live state, which can be understood as: the live code block in the live client is in an unexecuted state. The state in which the running state of the picture capture code block is not injected into the target process may be a state in which the picture capture code block in the live client is not injected into the game process.
Specifically, when the running state of a live code block in a live client is detected to be a non-live state and the running state of a picture acquisition code block is detected to be a state that the picture acquisition code block is not injected into a target process, a storage directory of the picture acquisition code block in the live client is determined. According to the storage directory of the image acquisition code block, the update data sent by the live broadcast platform server is stored in the storage directory of the image acquisition code block, and the update data is merged with the image acquisition code block in the live broadcast client, or the image acquisition code block in the live broadcast client is replaced by the update data, or the update data is merged and replaced with the image acquisition code block in the live broadcast client, so that the image acquisition code block in the live broadcast client is updated, and the live broadcast client is updated.
Optionally, on the basis of this embodiment, the method further includes: and when the completion of the updating of the live client is detected, displaying prompt information corresponding to the completion of the updating of the live client.
The prompt information can be used for prompting that the live client of the user of the live client is updated. The method for displaying the update completion of the live client can be short message communication, voice broadcast prompt or information window prompt of the live client.
Specifically, when the update of the live client is detected to be completed, the prompt information of the update completion of the live client is displayed according to a preset update completion prompt mode of the live client, and the anchor is informed to experience the newly added function of the live client.
According to the technical scheme of the embodiment, the running state of the live broadcast code block and the running state of the picture acquisition code block are detected by responding to the received update data sent by the live broadcast platform server, and the picture acquisition code block comprises the acquisition sub-code block. And when the running state of the live code block is detected to be the live state and the running state of the picture acquisition code block is detected to be the state of the injected target process, determining the data type of the update data.
And when the data type of the updated data is the data type corresponding to the image acquisition code block, copying the code corresponding to the acquired sub-code block into the target process so that the target process executes the code corresponding to the acquired sub-code block, and removing the image acquisition code block from the target process based on the preset resource management logic of the live broadcast client. Before the picture acquiring code block is removed from the target process, the code corresponding to the acquiring sub code block is copied to the target process and executed, so that the live code block in the live broadcast state can acquire the picture in the target process in real time. Meanwhile, the method plays a role in carrying in the updating process of the live client.
And when the fact that the picture acquisition code block is completely removed from the target process is detected, the updating data is covered into the storage directory corresponding to the picture acquisition code block, the updating data covered into the storage directory corresponding to the picture acquisition code block is injected into the target process based on the preset resource management logic, and the code in the execution state is removed from the target process. Before the codes in the execution state are removed from the target process, the updating data are injected into the target process to update the live client, so that the new functions of the live client can be updated in real time when the live client is in the game live state, the user can experience the newly added functions of the live client in time, and the user experience effect is greatly improved.
Example two
Fig. 2 is a flowchart illustrating a live broadcast client updating method according to a second embodiment of the present invention, where on the basis of the above-described embodiment of the present invention, before removing the picture acquisition code block from the target process, a creation resource corresponding to the picture acquisition code block and a release resource corresponding to the picture acquisition code block may be determined, and when it is detected that the creation resource is consistent with the release resource, the resource corresponding to the picture acquisition code block is released. And before the code in the execution state is removed from the target process, the created resource corresponding to the code in the execution state and the released resource corresponding to the code in the execution state can be determined, and when the created resource is detected to be consistent with the released resource, the resource corresponding to the code in the execution state is released.
As shown in fig. 2, the method of the embodiment may specifically include:
s210, responding to the received updated data sent by the live broadcast platform server, detecting the running state of the live broadcast code block and the running state of the picture acquisition code block, wherein the picture acquisition code block comprises an acquisition subcode block.
S220, when the running state of the live code block is detected to be the live state and the running state of the picture acquisition code block is detected to be the state of the injected target process, determining the data type of the update data.
And S230, when the data type of the updated data is the data type corresponding to the picture acquisition code block, copying the code corresponding to the acquired sub-code block into the target process so that the target process executes the code corresponding to the acquired sub-code block, and determining a created resource corresponding to the picture acquisition code block and a released resource corresponding to the picture acquisition code block based on a preset resource management logic of the live broadcast client.
Copying the code corresponding to the acquired sub-code block to the target process may be: and storing the codes corresponding to the acquired sub-code blocks into a preset memory of the target process. Correspondingly, the code corresponding to the target process executing and acquiring the sub-code block may be: and executing copying to the target process to acquire codes corresponding to the sub-code blocks in a preset memory of the target process.
The specific function of executing and acquiring the code corresponding to the sub-code block in the target process may include: creating a named pipeline, creating a memory mapping file of a process, creating a thread, carrying out hook on a game, acquiring a texture handle of the game, acquiring texture data of the game, encoding the texture data of the game, and sending the encoded data to a live broadcast code block through communication among the processes, thereby carrying out live broadcast.
The copied code corresponding to the acquired sub-code block is executed in the target process, so that the processing has the advantages that: when the picture acquisition code block in the live client is removed from the target process, the linking effect is achieved, and therefore the live picture of the live client is not affected.
Specifically, when the data type of the updated data is the data type corresponding to the picture acquisition code block, copying the code corresponding to the acquisition sub-code block in the updated data, and copying the copied code to the target process, that is, copying the copied code to the game process. When the copied code is detected to be copied into the game process, the game process executes the copied code, namely, the game process executes the copied code corresponding to the acquired sub-code block. When the execution of the copied codes corresponding to the acquired sub-code blocks is finished, determining the release resources corresponding to the picture acquisition code blocks according to the preset resource management logic of the live broadcast client, scanning the resource import table corresponding to the picture acquisition code blocks, and determining the creation resources corresponding to the picture acquisition code blocks.
S240, when the created resources are detected to be consistent with the released resources, releasing the resources corresponding to the image acquisition code blocks, and removing the image acquisition code blocks from the target process.
The method for detecting whether the created resources are consistent with the released resources may be to detect whether the number of created resources is consistent with the number of released resources. Whether the created resources are consistent with the released resources is detected, and the processing has the advantages that: prevent the game program from crashing and the live broadcast from being interrupted.
The specific process of releasing the resources corresponding to the picture acquisition code block may be: according to the preset resource management logic, suspending a thread corresponding to an acquisition sub-code block in the picture acquisition code block, removing hook of a game process handle, exiting a coding thread of a game picture, releasing used memory resources, releasing a created named pipeline, releasing a created shared memory, releasing a created window handle, releasing a shared texture handle of a game, and releasing resources corresponding to the picture acquisition code block in the live client so as to remove the picture acquisition code block from the memory. It is to be noted that the operation of releasing the picture taking code block has to be performed in the picture taking code block.
The created window HANDLE is released, so that a system function getmodulewandex can be called to obtain a HANDLE corresponding to the picture acquisition code block, and meanwhile, parameters of the getmodulewandex function include GET _ MODULE _ HANDLE _ EX _ FLAG _ FROM _ ADDRESS, a name of the picture acquisition code block, and (& hmodel) an ADDRESS of the HANDLE corresponding to the picture acquisition code block. The system function getmoduleuhandleex (GET _ MODULE _ HANDLE _ EX _ FLAG _ FROM _ ADDRESS, MODULE name, & hmodel).
The parameter GET _ MODULE _ portable _ EX _ FLAG _ FROM _ ADDRESS has the following advantages: when the handle corresponding to the picture taking code block is obtained, the reference count of the handle corresponding to the picture taking code block is prevented from increasing, thereby facilitating the removal of the picture taking code block in the later period.
Specifically, the release of the created window handle may call a system function getmodulehleex to obtain a handle corresponding to the picture acquisition code block. After the handle corresponding to the picture acquisition code block is acquired, according to the preset resource management logic, when the created resource corresponding to the picture acquisition code block is detected to be consistent with the released resource, the picture acquisition code block is removed from the target process. Optionally, when it is detected that the created resource corresponding to the picture acquisition code block is inconsistent with the released resource, it is detected whether the release of the created handle corresponding to the picture acquisition code block is completed, and if not, the release is performed according to a preset resource management logic. When the release of the created handle corresponding to the picture acquiring code block is detected to be finished, a system function FreeLibrary (hmodel) taking the created handle as a formal parameter is called to release the picture acquiring code block, and then the code corresponding to the picture acquiring code block in the executing state is quitted to be executed by calling the system function FreeLibraryAndExitThread (hmodel,0) taking the created handle and 0 as the formal parameter.
And S250, when the picture acquisition code block is detected to be completely removed from the target process, covering the update data in the storage directory corresponding to the picture acquisition code block, and injecting the update data covered in the storage directory corresponding to the picture acquisition code block into the target process based on the preset resource management logic.
S260, when the update data is detected and injected into the target process, determining the created resources corresponding to the codes in the execution state and the released resources corresponding to the codes in the execution state.
When it is detected that the update data is injected into the target process, that is, when it is detected that the picture acquisition code block to be updated is injected into the game process, the control sub-code block in the picture acquisition code block to be updated controls the memory execution of the acquisition sub-code block in the picture acquisition code block to be updated in the game process. When the memory of the sub-code block to be updated is executed in the game process, the inter-process communication and hook game process can be established, the game texture can be obtained, the game picture data can be coded, and the game picture can be sent to the process of the live client through the inter-process communication, so that the update of the live client and the acquisition of the game picture can be realized.
Specifically, when it is detected that the execution of the acquired subcode to be updated in the memory of the game process is completed, according to the preset resource management logic, a created resource corresponding to the copy code in the execution state in the game process is determined, and a released resource corresponding to the copy code in the execution state in the game process is determined.
S270, when the created resources are detected to be consistent with the released resources, releasing the resources corresponding to the codes in the execution state, and removing the codes in the execution state from the target process.
The creation resource may be a creation resource corresponding to the copy code in the execution state in the game process. The released resource can be a released resource corresponding to the copy code in the executing state in the game process
Specifically, when it is detected that a created resource corresponding to a copy code in an execution state in the game process is consistent with a released resource corresponding to a copy code in an execution state in the game process, the created resource corresponding to the copy code in the execution state is released according to a preset resource management logic, and when it is detected that the release of the created resource corresponding to the copy code in the execution state is completed, the code in the execution state is removed from the game process.
According to the technical scheme of the embodiment, before the picture acquisition code block is removed from the target process, the creation resource corresponding to the picture acquisition code block and the release resource corresponding to the picture acquisition code block are determined, and when the fact that the creation resource is consistent with the release resource is detected, the resource corresponding to the picture acquisition code block is released. And before the code in the execution state is removed from the target process, the establishment resource corresponding to the code in the execution state and the release resource corresponding to the code in the execution state are determined, and when the establishment resource is detected to be consistent with the release resource, the resource corresponding to the code in the execution state is released, so that the effects of accurately releasing the establishment resource, avoiding game collapse and avoiding live broadcast interruption are achieved.
EXAMPLE III
Fig. 3 is a schematic flow chart of a live broadcast client updating method according to a third embodiment of the present invention, where on the basis of the third embodiment of the present invention, before responding to receiving update data sent by a live broadcast platform server, an update request may be sent to the live broadcast platform server, where the update request carries an identifier of the live broadcast client; and receiving the update data which is sent by the live broadcast platform server and corresponds to the identification of the live broadcast client.
As shown in fig. 3, the method of the present embodiment may specifically include:
s310, sending an updating request to the live broadcast platform server, wherein the updating request carries the identification of the live broadcast client.
The update request can be a request of updating the live broadcast client sent by the live broadcast client to the live broadcast platform server. The manner of sending the update request to the live platform server may be: the time interval for sending the update request is set in advance, such as 10S. The advantages of such an arrangement are: whether the live client to be updated exists in the live client can be determined in time. The identity of the live client may be understood as the version number of the live client. The advantages of the setting of the identity of the live client are that: when the fact that the identification of the live client is inconsistent is detected, the live client can be determined to have the updated data.
Specifically, the time interval for sending the request is set in advance. And sending an updating request carrying the identification of the live broadcast client to a live broadcast platform server according to a preset time interval for sending the request.
And S320, receiving the updating data which is sent by the live broadcast platform server and corresponds to the identification of the live broadcast client.
Before receiving the update data corresponding to the identification of the live broadcast client sent by the live broadcast platform server, the live broadcast platform server determines whether the identification of the live broadcast client has the identification of the live broadcast client to be updated or not according to the received identification of the live broadcast client, and if the identification of the live broadcast client has the identification of the live broadcast client to be updated, the information of the update data is sent to the live broadcast client. The information of the update data may include the update data, and an identifier and a hash value of the update data.
The manner of receiving the update data corresponding to the identifier of the live broadcast client sent by the live broadcast platform server may be: and presetting a corresponding relation between the identification of the live client and the type of the updated data.
Illustratively, the identifier of the live broadcast client is 1.0.4, and when the data type of the update data corresponding to the live broadcast client is the data type corresponding to the picture acquisition code block, the identifier of the update data is 1.0.5; when the data type of the update data corresponding to the live broadcast client is the data type corresponding to the bug fix code block of the picture acquisition code block, the identifier of the update data is 1.0.4.1.
Illustratively, the identifier of the live broadcast client is 1.0.4.1, and when the data type of the update data corresponding to the live broadcast client is the data type corresponding to the bug fix code block of the picture acquisition code block, the identifier of the update data is 1.0.4.2.
Specifically, the identifier of the update data is determined according to the information of the update data sent by the live broadcast platform server. And receiving the update data which is sent by the live broadcast platform server and corresponds to the identification of the live broadcast client according to the identification of the update data and the identification of the live broadcast client.
S330, responding to the received updated data sent by the live broadcast platform server, detecting the running state of the live broadcast code block and the running state of the picture acquisition code block, wherein the picture acquisition code block comprises an acquisition subcode block.
S340, when the running state of the live code block is detected to be the live state and the running state of the picture acquisition code block is detected to be the state of the injected target process, determining the data type of the update data.
And S350, when the data type of the updated data is the data type corresponding to the image acquisition code block, copying the code corresponding to the acquired sub-code block into the target process so that the target process executes the code corresponding to the acquired sub-code block, and removing the image acquisition code block from the target process based on the preset resource management logic of the live broadcast client.
S360, when the picture acquisition code block is detected to be completely removed from the target process, the updating data is covered in the storage directory corresponding to the picture acquisition code block, the updating data covered in the storage directory corresponding to the picture acquisition code block is injected into the target process based on the preset resource management logic, and the code in the execution state is removed from the target process.
According to the technical scheme of the embodiment, before responding to and receiving the update data sent by the live broadcast platform server, the update request can be sent to the live broadcast platform server, and the update request carries the identification of the live broadcast client; the method and the device receive the update data which are sent by the live broadcast platform server and correspond to the identification of the live broadcast client, and achieve the effects of improving the accuracy of the live broadcast client for receiving the update data and timely acquiring the update data corresponding to the live broadcast client.
Example four
Fig. 4 is a schematic flow chart of a live client update method provided in the fourth embodiment of the present invention, where the embodiment of the present invention further includes, on the basis of the foregoing embodiment: and when the data type of the updated data is the data type corresponding to the bug fix code block of the picture acquisition code block, updating the live broadcast client.
As shown in fig. 4, the method of this embodiment may specifically include:
s410, responding to the received updated data sent by the live broadcast platform server, detecting the running state of the live broadcast code block and the running state of the picture acquisition code block, wherein the picture acquisition code block comprises an acquisition subcode block.
S420, when the running state of the live broadcast code block is detected to be the live broadcast state and the running state of the picture acquisition code block is detected to be the state of being injected into the target process, determining the data type of the updating data, and executing S430 when the data type of the updating data is the data type corresponding to the picture acquisition code block; and when the data type of the updated data is the data type corresponding to the bug fix code block of the picture acquisition code block, executing S450.
S430, copying codes corresponding to the acquired sub-code blocks into the target process so that the target process executes the image acquisition codes, removing the image acquisition code blocks from the target process based on preset resource management logic of the live broadcast client, and executing S440 when detecting that the removal of the image acquisition code blocks from the target process is finished.
S440, the updating data is covered into the storage directory corresponding to the picture acquisition code block, the updating data covered into the storage directory corresponding to the picture acquisition code block is injected into the target process based on the preset resource management logic, and the code in the execution state is removed from the target process.
S450, determining a storage directory of the update data, copying the update data to the storage directory corresponding to the picture acquisition code block, and executing S460 when detecting that the update data is copied to the storage directory corresponding to the picture acquisition code block.
The data type of the update data corresponding to the bug fix code block of the picture acquisition code block may be: and the picture in the live broadcast client acquires the data type corresponding to the bug repair code block of the code block, or the data type corresponding to the bug repair code block of the live broadcast code block in the live broadcast client. When the data type of the updated data is the data type corresponding to the bug fix code block of the picture acquisition code block, the reason why the updated data can be copied to the storage directory corresponding to the picture acquisition code block is that: when the updated data is the repair code, the picture acquisition code block in the live client does not need to be updated, so that the picture acquisition code block does not need to be removed from the game process. The benefits of this are: the processing efficiency is improved.
Specifically, when the data type of the updated data is a data type corresponding to the bug fix code block of the picture acquisition code block, the storage directory of the updated data is determined. And copying the updated data to a storage directory corresponding to the picture acquisition code block in the live client according to the storage directory of the updated data.
And S460, suspending the resources corresponding to the picture acquisition code block, creating a thread for executing the codes corresponding to the updating data, and executing S470 when detecting that the execution of the codes corresponding to the updating data is completed.
The thread is included in the process and is the actual operation unit of the process. A process may have many threads, each performing a different task in parallel. In the embodiment of the invention, the thread is used for executing codes corresponding to the updating data.
Specifically, when it is detected that the update data is copied to the storage directory corresponding to the picture acquisition code block, the resource corresponding to the picture acquisition code block is determined. And pausing the resources corresponding to the image acquisition codes according to the resources corresponding to the image acquisition codes, creating a thread for executing the codes corresponding to the updating data in the target process, and executing the codes corresponding to the updating data in the thread.
S470, restoring the resources corresponding to the picture acquisition code blocks, and quitting the created threads.
The resource recovery corresponding to the picture acquisition code block can be understood as: and modifying the state of the resource corresponding to the picture acquisition code block in the pause state into a working state.
Specifically, when detecting that the execution of the code corresponding to the update data is completed, the state of the resource corresponding to the picture acquisition code block in the suspended state is modified to the working state according to the preset resource management logic, and meanwhile, the thread for executing the code corresponding to the update data is exited.
According to the technical scheme, when the data type of the updated data is the data type corresponding to the bug fixing code block of the picture acquisition code block, the live broadcast client is updated, the bug fixing problem of the live broadcast client is solved, and the effect of improving the safety of the live broadcast client is achieved.
EXAMPLE five
Fig. 5 is a schematic block diagram of a live client update apparatus according to a fifth embodiment of the present invention, where the present invention provides a live client update apparatus, and the apparatus includes: a running state detection module 510, a data type determination module 520, a picture acquisition code block removal module 530, and an update data injection module 540.
The running state detection module 510 is configured to detect a running state of a live broadcast code block and a running state of a picture acquisition code block in response to receiving update data sent by a live broadcast platform server, where the picture acquisition code block includes an acquisition subcode block.
A data type determining module 520, configured to determine a data type of the update data when it is detected that the running state of the live code block is a live state and the running state of the picture acquisition code block is a state in which a target process has been injected.
A picture acquiring code block removing module 530, configured to copy, when the data type of the update data is a data type corresponding to the picture acquiring code block, a code corresponding to the acquired sub-code block to a target process, so that the target process executes to acquire a code corresponding to the sub-code block, and remove, based on a preset resource management logic of the live broadcast client, the picture acquiring code block from the target process.
An update data injection module 540, configured to, when it is detected that the image capture code block is completely removed from the target process, overwrite the update data in the storage directory corresponding to the image capture code block, inject the update data overwritten in the storage directory corresponding to the image capture code block into the target process based on the preset resource management logic, and remove the code in the execution state from the target process.
According to the technical scheme of the embodiment, the running state of the live broadcast code block and the running state of the picture acquisition code block are detected by the running state detection module in response to receiving the update data sent by the live broadcast platform server, and the picture acquisition code block comprises an acquisition subcode block. And determining the data type of the update data when the data type determining module detects that the running state of the live code block is the live state and the running state of the picture acquisition code block is the state of being injected into the target process.
And when the data type of the updated data is the data type corresponding to the picture acquisition code block, copying the code corresponding to the acquired sub-code block into the target process by the picture acquisition code block removing module so that the target process executes to acquire the code corresponding to the sub-code block, and removing the picture acquisition code block from the target process based on the preset resource management logic of the live broadcast client. Before the picture acquiring code block is removed from the target process, the code corresponding to the acquiring sub code block is copied to the target process and executed, so that the live code block in the live broadcast state can acquire the picture in the target process in real time. Meanwhile, the method plays a role in carrying in the updating process of the live client.
And when detecting that the picture acquisition code block is completely removed from the target process, the update data injection module covers the update data into the storage directory corresponding to the picture acquisition code block, injects the update data covered into the storage directory corresponding to the picture acquisition code block into the target process based on the preset resource management logic, and removes the code in the execution state from the target process. Before the codes in the execution state are removed from the target process, the updating data are injected into the target process to update the live client, so that the new functions of the live client can be updated in real time when the live client is in the game live state, the user can experience the newly added functions of the live client in time, and the user experience effect is greatly improved.
Optionally, before the removing the picture taking code block from the target process, the method may include: a resource releasing module of the first code block, configured to determine a creation resource corresponding to the picture acquisition code block and a release resource corresponding to the picture acquisition code block; and when the created resources are detected to be consistent with the released resources, releasing the resources corresponding to the picture acquisition code blocks.
Optionally, before the removing the code in the execution state from the target process, the method may include: a resource releasing module of the second code block, configured to determine a creation resource corresponding to the code in the execution state and a release resource corresponding to the code in the execution state; and when the created resources are detected to be consistent with the released resources, releasing the resources corresponding to the codes in the execution state.
Optionally, before the responding to receive the update data sent by the live platform server, the method may include: the update data request module is used for sending an update request to the live broadcast platform server, wherein the update request carries the identification of the live broadcast client; and receiving update data which is sent by a live broadcast platform server and corresponds to the identification of the live broadcast client.
Optionally, the apparatus further comprises: when the data type of the update data is a data type corresponding to a bug fix code block of the picture acquisition code block, the apparatus further includes: the code execution module corresponding to the update data is used for determining a storage directory of the update data and copying the update data to the storage directory corresponding to the picture acquisition code block; when the fact that the updating data are copied to the storage directory corresponding to the picture acquiring code block is detected, pausing resources corresponding to the picture acquiring code block, creating a thread for executing a code corresponding to the updating data, and executing the code corresponding to the updating data; and when detecting that the execution of the code corresponding to the updating data is finished, restoring the resource corresponding to the picture acquisition code block, and exiting the created thread.
Optionally, when it is detected that the running state of the live code block is a non-live state and the running state of the picture acquisition code block is a state in which a target process is not injected, the apparatus further includes: a merging and/or replacing sub-code block module, configured to determine a storage directory corresponding to the picture acquisition code block; and merging and/or replacing the acquired sub-code blocks of the live broadcast client according to the storage directory corresponding to the picture acquisition code blocks.
Optionally, the apparatus further comprises: and the information prompt module is used for displaying prompt information corresponding to the completion of the update of the live client when the completion of the update of the live client is detected.
The device can execute the live client updating method provided by any embodiment of the invention, and has the corresponding functional modules and beneficial effects of executing the live client updating method.
It should be noted that, the units and modules included in the apparatus are merely divided according to functional logic, but are not limited to the above division as long as the corresponding functions can be implemented; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the embodiment of the invention.
EXAMPLE six
Fig. 6 is a schematic structural diagram of an electronic device according to a sixth embodiment of the present invention. FIG. 6 illustrates a block diagram of an exemplary electronic device 12 suitable for use in implementing any of the embodiments of the present invention. The electronic device 12 shown in fig. 6 is only an example and should not bring any limitation to the function and the scope of use of the embodiment of the present invention. The device 12 is typically an electronic device that undertakes the processing of configuration information.
As shown in FIG. 6, electronic device 12 is embodied in the form of a general purpose computing device. The components of electronic device 12 may include, but are not limited to: one or more processors or processing units 16, a memory 28, and a bus 18 that couples the various components (including the memory 28 and the processing unit 16).
Bus 18 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MCA) bus, an enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.
Electronic device 12 typically includes a variety of computer-readable media. Such media may be any available media that is accessible by electronic device 12 and includes both volatile and nonvolatile media, removable and non-removable media.
Memory 28 may include computer device readable media in the form of volatile Memory, such as Random Access Memory (RAM) 30 and/or cache Memory 32. The electronic device 12 may further include other removable/non-removable, volatile/nonvolatile computer storage media. By way of example only, storage system 34 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 6, and commonly referred to as a "hard drive"). Although not shown in FIG. 6, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a Compact disk-Read Only Memory (CD-ROM), a Digital Video disk (DVD-ROM), or other optical media) may be provided. In these cases, each drive may be connected to bus 18 by one or more data media interfaces. Memory 28 may include at least one program product 40, with program product 40 having a set of program modules 42 configured to carry out the functions of embodiments of the invention. Program product 40 may be stored, for example, in memory 28, and such program modules 42 include, but are not limited to, one or more application programs, other program modules, and program data, each of which examples or some combination may comprise an implementation of a network environment. Program modules 42 generally carry out the functions and/or methodologies of the described embodiments of the invention.
Electronic device 12 may also communicate with one or more external devices 14 (e.g., keyboard, mouse, camera, etc., and display), one or more devices that enable a user to interact with electronic device 12, and/or any devices (e.g., network card, modem, etc.) that enable electronic device 12 to communicate with one or more other computing devices. Such communication may be through an input/output (I/O) interface 22. Also, the electronic device 12 may communicate with one or more networks (e.g., a Local Area Network (LAN), Wide Area Network (WAN), and/or a public Network such as the internet) via the Network adapter 20. As shown, the network adapter 20 communicates with other modules of the electronic device 12 via the bus 18. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with electronic device 12, including but not limited to: microcode, device drivers, Redundant processing units, external disk drive Arrays, disk array (RAID) devices, tape drives, and data backup storage devices, to name a few.
The processor 16 executes various functional applications and data processing by executing programs stored in the memory 28, for example, to implement the live client update method provided by the above-mentioned embodiment of the present invention, and the method includes:
responding to the received update data sent by a live broadcast platform server, detecting the running state of a live broadcast code block and the running state of a picture acquisition code block, wherein the picture acquisition code block comprises an acquisition sub-code block;
when the operation state of the live code block is detected to be a live state and the operation state of the picture acquisition code block is detected to be a state of being injected into a target process, determining the data type of the update data;
when the data type of the updated data is the data type corresponding to the image acquisition code block, copying the code corresponding to the acquired sub-code block into a target process so that the target process executes the code corresponding to the acquired sub-code block, and removing the image acquisition code block from the target process based on a preset resource management logic of a live broadcast client;
when the fact that the picture acquisition code block is completely removed from the target process is detected, the updating data are covered into the storage directory corresponding to the picture acquisition code block, the updating data covered into the storage directory corresponding to the picture acquisition code block are injected into the target process based on the preset resource management logic, and the code in the execution state is removed from the target process.
Of course, those skilled in the art can understand that the processor may also implement the technical solution of the live client update method provided in any embodiment of the present invention.
EXAMPLE seven
An embodiment of the present invention further provides a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform a live client update method.
The method comprises the following steps:
when the opening of a live broadcast page is detected, calling a preset initialization method encapsulated in a live broadcast stream management class, and instantiating a predefined live broadcast stream interface object, a predefined live broadcast stream playing object and an interface display object in the live broadcast stream management class;
calling a live stream connection method taking the address of the live stream as an entry parameter through an instantiated live stream interface object, and acquiring the live stream of the live stream page;
calling a decoding method which takes the height and width corresponding to the decoded live stream as entry parameters through an instantiated live stream playing object, and decoding the live stream to obtain the decoded live stream;
and calling a live stream rendering method taking the instantiated interface display object as an entry parameter through the instantiated live stream playing object, and rendering the decoded live stream to a preset view of the live stream page.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for embodiments of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A live client updating method is characterized by comprising the following steps:
responding to the received update data sent by a live broadcast platform server, detecting the running state of a live broadcast code block and the running state of a picture acquisition code block, wherein the picture acquisition code block comprises an acquisition sub-code block;
when the operation state of the live code block is detected to be a live state and the operation state of the picture acquisition code block is detected to be a state of being injected into a target process, determining the data type of the update data;
when the data type of the updated data is the data type corresponding to the image acquisition code block, copying the code corresponding to the acquired sub-code block into a target process so that the target process executes the code corresponding to the acquired sub-code block, and removing the image acquisition code block from the target process based on a preset resource management logic;
when the fact that the picture acquisition code block is completely removed from the target process is detected, the updating data are covered into the storage directory corresponding to the picture acquisition code block, the updating data covered into the storage directory corresponding to the picture acquisition code block are injected into the target process based on the preset resource management logic, and the code in the execution state is removed from the target process.
2. The method of claim 1, prior to said removing said picture acquisition code block from said target process, comprising:
determining a creation resource corresponding to the picture acquisition code block and a release resource corresponding to the picture acquisition code block;
and when the created resources are detected to be consistent with the released resources, releasing the resources corresponding to the picture acquisition code blocks.
3. The method of claim 1, prior to said removing said code in an executing state from said target process, comprising:
determining a creating resource corresponding to the code in the executing state and a releasing resource corresponding to the code in the executing state;
and when the created resources are detected to be consistent with the released resources, releasing the resources corresponding to the codes in the execution state.
4. The method of claim 1, wherein prior to the responding to receive the update data sent by the live platform server, the method further comprises:
sending an update request to the live broadcast platform server, wherein the update request carries an identifier of the live broadcast client;
and receiving update data which is sent by a live broadcast platform server and corresponds to the identification of the live broadcast client.
5. The method of claim 1, further comprising:
when the data type of the updated data is the data type corresponding to the bug repair code block of the picture acquisition code block, determining a storage directory of the updated data, and copying the updated data to the storage directory corresponding to the picture acquisition code block;
when the fact that the updating data are copied to the storage directory corresponding to the picture acquiring code block is detected, pausing resources corresponding to the picture acquiring code block, creating a thread for executing a code corresponding to the updating data, and executing the code corresponding to the updating data;
and when detecting that the execution of the code corresponding to the updating data is finished, restoring the resource corresponding to the picture acquisition code block, and exiting the created thread.
6. The method of claim 1, further comprising:
when the operation state of the live broadcast code block is detected to be a non-live broadcast state and the operation state of the picture acquisition code block is detected to be a state of not injecting a target process, determining a storage directory corresponding to the picture acquisition code block;
and merging and/or replacing the acquired sub-code blocks of the live broadcast client according to the storage directory corresponding to the picture acquisition code blocks.
7. The method of claim 1, further comprising: and when detecting that the live client is updated, displaying prompt information corresponding to the update completion of the live client.
8. A live client update apparatus, comprising:
the operation state detection module is used for responding to the received updated data sent by the live broadcast platform server, detecting the operation state of a live broadcast code block and the operation state of a picture acquisition code block, wherein the picture acquisition code block comprises an acquisition subcode block;
the data type determining module is used for determining the data type of the updating data when the running state of the live code block is detected to be the live state and the running state of the picture acquisition code block is detected to be the state of the injected target process;
a picture acquisition code block removal module, configured to copy, when the data type of the update data is a data type corresponding to a picture acquisition code block, a code corresponding to the acquired sub-code block to a target process, so that the target process executes the picture acquisition code, and remove, based on a preset resource management logic of a live broadcast client, the picture acquisition code block from the target process;
and the update data injection module is used for covering the update data into the storage directory corresponding to the acquired sub-code block when the image acquisition code block is detected to be completely removed from the target process, injecting the update data covered into the storage directory corresponding to the image acquisition code block into the target process based on the preset resource management logic, and removing the code in an execution state from the target process.
9. An electronic device, characterized in that the electronic device comprises:
one or more processors;
storage means for storing one or more programs;
when executed by the processor, cause the processor to implement a live client update method as claimed in any one of claims 1-7.
10. A storage medium containing computer-executable instructions for performing the live client update method of any of claims 1-7 when executed by a computer processor.
CN202110258499.6A 2021-03-10 2021-03-10 Live broadcast client updating method and device, electronic equipment and storage medium Active CN112631635B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110258499.6A CN112631635B (en) 2021-03-10 2021-03-10 Live broadcast client updating method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110258499.6A CN112631635B (en) 2021-03-10 2021-03-10 Live broadcast client updating method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112631635A true CN112631635A (en) 2021-04-09
CN112631635B CN112631635B (en) 2021-06-22

Family

ID=75297817

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110258499.6A Active CN112631635B (en) 2021-03-10 2021-03-10 Live broadcast client updating method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112631635B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113347456A (en) * 2021-06-02 2021-09-03 网易(杭州)网络有限公司 Live broadcast information updating method and device and electronic equipment
CN114827652A (en) * 2022-05-18 2022-07-29 上海哔哩哔哩科技有限公司 Virtual image playing method and device

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030172372A1 (en) * 2001-12-18 2003-09-11 Adrian Crisan Hardware ROM upgrade through an internet or intranet service
CN105430448A (en) * 2015-11-24 2016-03-23 腾讯科技(深圳)有限公司 Control processing method for video player and video player client
CN108804126A (en) * 2018-05-22 2018-11-13 北京图森未来科技有限公司 A kind of method for upgrading software and device
CN111131851A (en) * 2019-12-31 2020-05-08 网易(杭州)网络有限公司 Game live broadcast control method and device, computer storage medium and electronic equipment
CN111309357A (en) * 2020-02-24 2020-06-19 腾讯科技(成都)有限公司 Cloud game software updating method and device, storage medium and cloud game system
US10795660B1 (en) * 2015-03-10 2020-10-06 Twitter, Inc. Live code updates
CN112243137A (en) * 2019-07-17 2021-01-19 北京密境和风科技有限公司 Live broadcast interface updating method, device, server and system
CN112416405A (en) * 2020-11-30 2021-02-26 厦门亿联网络技术股份有限公司 Method and device for upgrading gray level of audio and video software terminal, terminal equipment and medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030172372A1 (en) * 2001-12-18 2003-09-11 Adrian Crisan Hardware ROM upgrade through an internet or intranet service
US10795660B1 (en) * 2015-03-10 2020-10-06 Twitter, Inc. Live code updates
CN105430448A (en) * 2015-11-24 2016-03-23 腾讯科技(深圳)有限公司 Control processing method for video player and video player client
CN108804126A (en) * 2018-05-22 2018-11-13 北京图森未来科技有限公司 A kind of method for upgrading software and device
CN112243137A (en) * 2019-07-17 2021-01-19 北京密境和风科技有限公司 Live broadcast interface updating method, device, server and system
CN111131851A (en) * 2019-12-31 2020-05-08 网易(杭州)网络有限公司 Game live broadcast control method and device, computer storage medium and electronic equipment
CN111309357A (en) * 2020-02-24 2020-06-19 腾讯科技(成都)有限公司 Cloud game software updating method and device, storage medium and cloud game system
CN112416405A (en) * 2020-11-30 2021-02-26 厦门亿联网络技术股份有限公司 Method and device for upgrading gray level of audio and video software terminal, terminal equipment and medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
STEFAN ETIENNE: "How to upgrade your PS4 Pro hard drive without losing games", 《HTTPS://WWW.THEVERGE.COM/2019/3/8/18251935/HOW-TO-UPGRADE-YOUR-PS4-PRO-HARD-DRIVE-WITHOUT-LOSING-GAMES》 *
XIAOBANGSKY: "Webpack的热更新", 《HTTPS://BLOG.CSDN.NET/XIAOBANGSKY/ARTICLE/DETAILS/114600649》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113347456A (en) * 2021-06-02 2021-09-03 网易(杭州)网络有限公司 Live broadcast information updating method and device and electronic equipment
CN114827652A (en) * 2022-05-18 2022-07-29 上海哔哩哔哩科技有限公司 Virtual image playing method and device

Also Published As

Publication number Publication date
CN112631635B (en) 2021-06-22

Similar Documents

Publication Publication Date Title
CN112631635B (en) Live broadcast client updating method and device, electronic equipment and storage medium
CN106681811B (en) Multithreading scheduling method and device based on thread pool
CN110825456A (en) Loading time calculation method and device, computer equipment and storage medium
CN106681897B (en) Code debugging method and device
CN109698979B (en) Video playing method and device and electronic equipment
US20150006961A1 (en) Capturing trace information using annotated trace output
CN111954072B (en) Multimedia playing method, device, multimedia player and medium
CN114880159B (en) Data processing method, device, equipment and storage medium
CN112040312A (en) Split-screen rendering method, device, equipment and storage medium
CN111045824A (en) Application control method and device, electronic equipment and computer readable medium
CN111258850A (en) Method and device for updating software information based on Linux system
CN107742077B (en) Method and device for preventing information leakage in live game
WO2017219872A1 (en) Set top box upgrading and channel changing methods and systems
CN113780163A (en) Page loading time detection method and device, electronic equipment and medium
CN114184885A (en) Fault detection method, device and storage medium
CN110198481B (en) Program updating method and device, electronic equipment and storage medium
CN109522174B (en) Method, device, terminal and storage medium for controlling adb enabling
CN109413507B (en) Method, device, terminal and medium for processing reference relationship between barrage library and live broadcast room
KR101337077B1 (en) Method for operating android invisible system service
CN109634636B (en) Application processing method, device, equipment and medium
CN112181750A (en) Method, device and medium for testing stability of industrial control network equipment
CN117556395B (en) System application watermark generation method and device
CN112584237B (en) Image erasing method and device, electronic equipment and storage medium
CN111013156B (en) Scene detection method, device, terminal and medium based on robot
CN112584236B (en) Image erasing method and device, electronic equipment and storage medium

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